« first day (2460 days earlier)      last day (2490 days later) » 

mr5
5:14 AM
how do you reconstruct this into a valid sentence: "visual studio mac xamarin android cannot find device"
 
5:35 AM
good morning
 
6:16 AM
@mr5 Seems simple enough. "Visual Studio McXamarin" is the full name. First name Visual, last name McXamarin (Scots-Chinese). "Studio" is the nickname.
 
mr5
@AvnerShahar-Kashtan lol. It's really bugging me not to include every details in google search. I wish there is some kind of tagging like SO does
 
Now, our fellow Studio here builds robots. Humanoid robots. One of them - his Android - couldn't find the device.
 
6:32 AM
Hey guys, could someone help me with the Sort() or Compare() method? I don't understand why it doesn't work on my code :c
 
@Sanimys Your terminology suggests that you're not entirely sure on where and how to use it.
What doesn't work?
 
I have tried to write whatever.OrderBy(smthg => sthmg.part1).ThenBy(smthg => smthg.part2), with part1 and part2 being int numbers, but it sorts nothing :C
 
@Sanimys I assume you expected it to sort whatever in-place. What it does is return a new IEnumerable object, sorted.
 
oohhh, alright, I think I understand, thanks :D
I will try that
 
var sorted = myList.OrderBy(x => x.Prop);
 
6:37 AM
Stupid question, but is there a simple way to convert from an IEnumerable to a List?
 
mr5
@Sanimys also, bear in mind that all linq operations are immutable
 
.ToList() ?
 
@Sanimys myEnumerable.ToList();
 
Oh, yeah, true x)
 
Are you sure you need a list, though?
 
6:39 AM
Sorry, I've just wake up, my mind isn't really clear x')
yup
 
If you need to pass it to a method that expects a List, sure. But if you just need to iterate over it, keep it as IEnumerable.
 
Thanks for your help :)
 
Hellou
 
6:57 AM
ohayou
 
quick question I have a list of a and a list of b both of them inherit from c. Is there anyway I could add stuff from a list to b list without creating a new object?
 
@misha130 *blink*.
Too early. Try again.
Ok, got it.
No, A isn't B.
 
I dont want to a and b to be lists of c too
b...but this is stupid why do I have to create a whole new object for one property
 
 
What property?
I'm not following.
 
7:07 AM
the difference between a and b is just one property
now I am just ranting
 
No, it isn't. The different is that one is A and one is B.
 
sigh
 
That's what you get for using a strictly typed language.
 
cant the compiler magically convert it to C and remove the extras.......
oh well
 
Again, I'm not following. A is a C.
But listA isn't a list of C's.
 
7:08 AM
Yes
Yes...
again I am just ranting
@Proxy are you opening this morning with a flat earth conspiracy
 
damn right i am
playing hard this morning
 
what a gangsta
 
that guy blowing the wind would be a nice welcome last few days
 
I honestly am not familiar with any mythology that says the earth is on the back of a large dragon
 
I want to rebuild a project called Aproject and will start a new project for it
Any advises of the naming? Aproject2 ?
 
7:11 AM
yeah neither am i
i always though james was carrying our earth
 
yeah i heard that one before x
xd
 
It's not actually on the back of the dragon. The dragon simply waits there to eat ships that fall off the edge.
 
thats an interesting thought
 
i think most of those "believers" are just trolling
but i suppose there are a few who actually believe it
 
7:15 AM
shaquille o'neal was trolling
atleast
 
No, I really don't think they are. :(
Check out places like this:
 
yeah but still... i think its mostly fun only
i hope
 
tinfoils hats are also...for fun
 
7:58 AM
@Proxy I think it's pretty cool that we can simulate the earth physics on a flat version.
 
I thought about it and magneto is the biggest tin foil hat wearer ever
2
 
flatness to the end
 
8:36 AM
aloha aloha
 
9:13 AM
o/
how do we do
 
this is how we do
 
\o/
Is dancing how you do?
 
mr5
9:34 AM
this is how we do it - Illidan
 
@RoelvanUden senpai daijobu?
 
mr5
ogenki desu ka
 
@misha130 Honestly, I've never thought of it that way
 
mr5
boku no pico
 
9:47 AM
@TomW well i looked into it well in java you need base64 encoding when you are implementing some authentication/authorization however it is not needed when you arnt securing your web service :)
 
It's not really about Java. Encoding username/password in base64 is a standard (and non-recommended) method of doing basic HTTP authentication.
In the context of a HTTP transaction, basic access authentication is a method for a HTTP user agent to provide a user name and password when making a request. == Features == HTTP Basic authentication (BA) implementation is the simplest technique for enforcing access controls to web resources because it doesn't require cookies, session identifiers, or login pages; rather, HTTP Basic authentication uses standard fields in the HTTP header, obviating the need for handshakes. == Security == The BA mechanism provides no confidentiality protection for the transmitted credentials. They are merely encoded...
 
@AvnerShahar-Kashtan thats true but he was saying yesterday that we have to do this in every webservice but that is partly true we need to do that kind of encoding only when we are securing the rest service .... right
and I understand why base64 is not recommended it is because it is not secure people can always decode it easily
 
10:03 AM
@AtharvaPandey It's not "not secure". It's not a security measure at all. It's just like putting something in the POST payload rather than in the connection string isn't a security measure.
 
I know we use base64 encoding is so as to fix the issue with non http supported characters. @AvnerShahar-Kashtan the purpose of the base64 encoding is not securing but i just referred it like it is mainly used in rest during basic authentication
 
I just wanted to stress the point. Too many people confuse "encoding" with "encrypting".
 
you are right even when i started exploring rest I used to asume encoding as encryption :P later i realised that these are completely different from each other
 
10:22 AM
wait until you start comparing good algorithms between storage and communication :D
your head will probably blow up
 
ello
 
o/
 
it will be glorious either way
 
Ive finally hit 1000rep in SO. My life is complete, I'm packing up my life, selling the wife and moving to Cuba! :D
 
why cuba?
 
10:24 AM
don't know - Sounds fun
 
if your life is complete, middle east is best for you
 
2000 rep lets you edit without review. Stick around a little longer. You know you want to. :)
 
i wanted to
then i got bored
 
Yeah doesn't 1500 allow you to create Chat Rooms?
 
I'm close to 10k and access to the fabled moderator tools.
(I actually have access to them in other stacks, so I'm not that curious)
 
10:27 AM
can you ban people pls
 
I can create rooms now! Boom! Next i can create tags (not really interested in that).

Thanks @AvnerShahar-Kashtan
 
Seeing vote counts at 1k is useful.
 
I love chasing achievements, its why World of Warcraft hooks me everytime
 
I've been WoW-free since '07.
 
Since 15 for me - The wife threatened divorce so.....

But hey, lifes good - I have 1000 rep
 
10:30 AM
I'd work harder at getting to 10k, but a) Meaningless Internet Points are meaningless, and b) Getting rep on SO is frustrating.
 
MEANINGLESS?!
 
haha quick reply their @Kieran
MIP for short
 
@garfbradaz lmao, just so happened to be looking at chat
 
In other SE sites, a question sticks around the front page for a while and you have a chance to get upvotes for a decent answer.
In SO, even if you're filtering by tag, the sheer mass makes it hard.
 
the fun part about SO rep is the fact that you wake up in the morning and see it increasing on its own!
you dont even have to do anything
just brushing my ego, daily
 
10:33 AM
@AvnerShahar-Kashtan that's why it is up to us to cull the cr@p
 
@misha130 I have 5 year-old answer that still occasionally garner rep.
 
I want to answer more, but it can be a time sink sometimes composing a good answer (same with questions as well i suppose).
 
and just before you finish, Jon Skeet popped in
sink.drain(answer);
 
FYI for all you UK Prime users, some nice deals today. Check this out £179 for the Xbox One S, games and the chat pad

https://www.amazon.co.uk/Horizon-Minecraft-Controller-Chatpad-Headset/dp/B071W6TRN7/ref=gbps_img_m-3_4cf6_654b76af?smid=A3P5ROKL5A1OLE&pf_rd_p=3fe4b428-e741-4341-8704-df358e614cf6&pf_rd_s=merchandised-search-3&pf_rd_t=101&pf_rd_i=10407971031&pf_rd_m=A3P5ROKL5A1OLE&pf_rd_r=F4T4CV17HXX1KFF6HEFZ
 
@AvnerShahar-Kashtan which is the most secure authentication method for rest you would recommend ?
 
10:44 AM
@Wietlol: Love it
 
@AtharvaPandey OAuth 2.4?
authentication isnt that hard to do
making sure you do it correctly is hard
 
@satibel thank you for the reply. I think I forgot to mention the constraint that is causing problem for me. Though it is true that I can predict Next(), it only applies if the Next() API is available to me. In that case I can start collecting the whole seed array needed to predict the subsequent results. Imagine the application is behind a network endpoint, so the only API available to you is Next(int a, int b). In this case the result you observed is not the actual seed element
 
well I dont care if its hard but i want it to be absolutely secure
 
use Basic Auth izi pizi
 
Good luck with that
 
10:46 AM
lol :D
 
Nothing is absolutely secure
 
close to absolutely secure *
 
ah now we are talking
 
OAuth would probably be your best bet tbh
Unless you want to do more research into it
 
is it a one time requirest or a series?
where you can spend hours in one serie
(up to some limit)
 
10:48 AM
well OAuth has two versions 1a and 2 i dont know which to pick
also i dont want to involve any third party
in the authentication process
 
no party -_-
 
but "is it a one time requirest or a series?
where you can spend hours in one serie"?
 
well it will be a a series probably
unique for each user i dont know how to term it if
 
then you could use an encrypted message
 
10:50 AM
that i would be doing anyways encrypting messages using AES
 
first request will generate a key pair to encrypt, the server then provides the client with a public key
 
ohh that way
 
and it stores its public ip address or something else to link back to the private key it stored
 
okay what is this process called
 
the client then creates a key pair and sends his public key (encrypted) to the server
 
10:52 AM
is there some reference available
 
then the client has a private key of his own that noone knows and the sever has a public key that noone knows
 
@AtharvaPandey Is this an internet service or an internal intranet service?
 
then you need some footprint that will ensure that a message cannot be copied
 
Because if it's on a Windows-based intranet, you can simply use Windows Auth/Kerberos and solve your problem easily.
 
I think some AES libs can do this for you
 
10:53 AM
@AvnerShahar-Kashtan I cant answer it in those terms but it is something to be used within the company for a specific client
 
but you can program it yourself really easily
just take a good article about it and a cup of coffee
 
@AtharvaPandey What stack are you using?
 
@Wietlol What? No. Please don't. Don't do your own key exchange. You're 90% guaranteed to get it wrong, especially the first time.
 
Java from server end and vb.net from client side In java I am using the jax rs implementation @garfbradaz
 
Hi guys
I have a method like below :
 
10:55 AM
@AvnerShahar-Kashtan it is definitely not window based because we deploy our application on linux server I guess
 
private static List<SqlParameter> CreateSqlParameters()
        {
            var sqlParameters = new List<SqlParameter>();
            return sqlParameters;
        }
 
@AtharvaPandey Can you not use then Java's own authentication APIs? The first rule of security/encryption DO NOT roll your own :D
 
@AvnerShahar-Kashtan you dont make your own algorithm
 
OAuth is probably the wrong choice for an internal application. It's useful for a distributed scenario where you have different authentication providers and need to synchronize between them and the auth consumers, but that's rarely the case inside an intranet.
 
the exchange is pretty easy
 
10:56 AM
1
Q: Restful Web Service with Kerberos Authentication

ServerMonkeyStarting a new project to create a restful Web Service that requires callers to be Authenticated by Kerberos (Active Directory). The web service will be hosted by Tomcat and I was planning to use JAX-RS with JAAS but I'm not finding much information on this, does anyone have information or exper...

It's not a question of "easy" (although it isn't, really). Just like you won't be writing your own JSON parser or your own HTTP server. Don't waste time (and add potential bugs) by developing features that aren't really a part of your core product.
 
@AvnerShahar-Kashtan wow this looks pretty cool
 
I did write my own JSON parser
because I required parent-child storage
and because it was fun
 
well I dont want to write my own security stuff that may create some potential threats which i dont even know of
I ll just use whats available
 
that i can understand
but as I said, you can probably find some good libraries to do it for you
 
yea that is what i am looking into like this kerberos auth is something i heard for the first time
 
10:59 AM
what's the best approach to keep a serial per one user only? of products
 
@Wietlol Fun is good. But if I had a coworker who suggested we write our own JSON parser in our product for fun, I'd shoot it down.
Reinventing a wheel for fun is rarely the right choice, for both technical and business reasons.
2
And with security issues, it's also a potential for lawsuits and regulation.
 
@AvnerShahar-Kashtan: Agree. Fun belongs with the R&D team :D
 
@garfbradaz well I think everyone is a part of R & D team as long as you enjoy to code things :)
may be not inside of the company but in your own respective homes
 
@Wietlol ...but on the other hand i commend you. Protoyping is a good way of learning. And if you turned it into a proper parsing lib, then kudo to you
 
@garfbradaz I dont know if using java's default security thing is the right choice or not
 
11:05 AM
@AtharvaPandey I'm not saying don't have fun at work, definitely do so. And TBH more people need fun in their lives. But we all know that Newtonsoft.Json is an extraordinary good piece of kit. I would say extend that, and put a PR in or branch it off with your enhancements. But i agree, in your own time, then try and make something better if you can (or give it a bloody good go).
Newton for .NET anyways
 
Yeah. Writing your own is good for fun, good for learning, and potentially good as part of your online resumé. Not good for writing a product for work.
 
Hmm can anyone give me some help with how I would implement a system using MVVM paradigm?
 
@paul23 Ive heard of a great site, Stack Overflow, awesome for questions like that ;)
 
@garfbradaz thats what this room is here for also
 
i know i was being facetious :)
which obviously didn't work
 
11:12 AM
humour/sarcasm is hard to portray on the internets :)
 
ps - quick reply again :D
 
@trand in that case you have a more limited version, but I think in some cases (the higher the range, the better) and if you know the range you still can.
 
Just so happened to be looking ;)
 
haha
 
I have an object (Image) that, when clicked on it, becomes "selected". - The selection means that it gets an adorner and other stuff might happen (dragging it etc). Now I wonder where I would store this "selectedelements-list": the containing panel (View), or the viewmodel.
 
11:12 AM
@paul23: What stack you using for your App?
 
If I would put it in the modelview it means that my modelview gets direct information about the view (layout, size of the selected elements - basically a reference to the element.) - however if I don't, the (custom) image class has to communicate with the global panel.
 
@paul23: A good way of looking at it - will you be storing the state? i.e. if you reload the app/site/etc - will you want the "selectedelementslist" to remain selected across sessions?
 
There are multiple wrappanels that contain "images", in the overview grid is a selectionlist that creates adorners around the images that are selected. And handles the dragging around.
@garfbradaz No...
Basically, the idea is similar to a button: "I have a page that has to change layout based on which button is pressed - and the buttons update based on the model - as well as the state of the view. How would I communicate between those two: should it be direct or through events in a viewmodel.(At which point the problem becomes: how would I send layout data through the viewmodel while keeping the viewmodel agnostic of the view)
 
I'm not ignoring you @paul23 sorry, I'm just thinking out loud at work. If this is a WPF/UWP app, then usually if you want to react to state changes, then you implement INotifyPropertChanged events if i remember correctly. Doesn't the view send the commands to the VM and the VM figures out what to do?
 
11:30 AM
@garfbradaz Well yes that's what I'd think: however the idea of MVVM is also that the viewmodel has no idea what classes are used for the views - or how the view is build. Yet in this application I have to send a reference to the viewmodel so that it can tell the overview page to create an ardorner (and around which UI element).
So that would be a collision of the paradigm: an indication of code smell.
 
Below is my sql query :
string str = "select * from Table where col1 = @param1 and col2 = @param2";
 
@AvnerShahar-Kashtan @garfbradaz we have a policy at our company, we write everything that is "intelligent" ourselves, everything that has no "intelligence" we use from other companies
 
@paul23 What the VM does is set a property on the item, IsSelected.
 
How to extract all paremeters from sql query i.e @param1 and @param2?
 
not that a Json parser is intelligent, but writing things yourself has certain advantages
 
11:31 AM
@Wietlol "Intelligent", here means "has business logic" (as opposed to technical logic), I assume.
 
true
MsSql is not "intelligent" ;)
 
@paul23 Adding an adorner is something that the view does. The VM doesn't care. In WPF, this can be done with a trigger on a style, or with a behavior.
 
on a side note, I wrote something myself that I couldnt find on the internet
at least not in the way I wanted it to work
its a string parser
 
@Wietlol "Intelligent" is a confusing term here. "Core business/core competency" might be better.
@Wietlol Oh, sure. We're still here to write code, after all. You can't expect to have everything already out there, or there wouldn't really be a point in writing a new system.
 
it takes in some text and under certain conditions it parses a section from that text so that you can apply logic in your data
I searched for one, but couldnt find it, so I made my own
but the syntax pains me when larger files come to the point
 
11:33 AM
There's always a lot of business logic code. I have code that takes a user query, parses it into free-text elements and keyword=value elements, and builds an EF query from that. The actual business logic part is small, but I needed a specific parser for a specific scenario.
 
@satibel the range is [1, 10] (both inclusive) so Next(1, 11). that's a lot of rounding done behind the scene and I would lose a lot of precision. I wonder if it's actually worth it to guess the original integer, than just brute forcing it altogether
 
@AvnerShahar-Kashtan Hmm I guess that would solve the problem indeed. Quite a big of a rewrite but that would solve it. -- the only problem is then copy pasting. Since I do not wish to "recreate the image/whatever from the model when pasting, but actually copying the whole state of the image/thumbnail; IE in a gif I would not only copy the GIF data but also the currently viewed subimage. But that's next problem.
 
@Learning Why do you want to do this? expectation is that you are already aware of what parameters are to be passed to the query, when constructing the DbCommand object
 
@Wietlol: I commend you for it, I really do. We all get into this line of work because its a passion and the love of learning is there. But i agree with @AvnerShahar-Kashtan that if you are writing business applications, sometimes a tried and tested lib is better.

It could be that your JSON Parser is proven in various benchmarks against what we consider the best now. But they need to be proven.

But like you said, if you need specific use cases for then building your own could be the only way.
 
@paul23 I'm not sure I really got your scenario. Why would you need to recreate anything? You have an image whose data comes from the VM and rendered in the view. You have some logic that reacts to a property change (IsSelected) and adds a border/highlight.
@garfbradaz There are several different axes of "better", which are often in conflict. When I'm at work, my job is to write the best possible code for the product, for the project. If my JSON parser is 10% faster than JSON.NET, and handles more edge cases, but adds three days of development (and an unknown number of future bugs), then it's the wrong technical and product choice.
Even if it's provably better, while the out-of-the-box solution is good enough, you'll have to justify it.
 
11:39 AM
@garfbradaz I didnt say you had to write your own algorithms and stuff
 
Because even though I'm a developer, and love coding, and I work in an R&D team, the code is a means to an end, not the purpose of the work.
 
at least not for security reasons
 
What an interesting problem am looking into !!
 
0.o
 
@AvnerShahar-Kashtan I need to be able to "drag" the "image" to a different wrap panel. And logic dictates that during dragging the drag/copying image needs to be 100% equal to the original image (original image stays in spot until you release the mouse at a valid location): Same size, same filter etc (which is independent of the model)... So when I drag it I have to poll all the actual Image object to make a copy.
 
11:44 AM
@Wietlol ;)
 
I dont get your statement
 
But like I said: one problem at a time. I'm now rewriting the selection code. (I combined in the past the viewmodel into the window class, and wrote a special selectionlist not only kept track of the items selected: it would also draw the adorner around the selected items).
 
which one
 
"What an interesting problem am looking into !!"
 
@Wietlol Here you go then
0
Q: Waiting for condition to become true in parallel for 1 to X documents or items

MathematicsI am uploading documents to List-1 which triggers some events download documents do some business logic and upload them to List-2 in same web. What I need to do is wait for documents to be uploaded to List-2 or wait till 10 minutes before timing out. Below is what I have done so far, I am not s...

 
11:48 AM
Totally agree. I think in @Wietlol case - there was a specific use case that needed addressing which is why a parser was built for it.

In your team, do you regularly re-evaluate libraries you use in Projects to see if there are better solutions for the next solution? i.e. is "better" re-evaluated. Just curious.

off to lunch now - might even have a sneaky go on the Xbox lol
 
we look at what we need, then we look at what it takes to make it happen, if the subject is complex, then we look for libraries/third party tools to do the job for us, if it is relatively easy or we cannot find proper libraries/third party tools, then we write our own
 
@Mathematics Ooh, you're doing Sharepoint. I vowed to never do Sharepoint ever again. :)
 
(on a side note, the Json parser, my String parser and other stuff I ussually mention are not written for the company I work at, I wrote them at home for my personal projects)
 
@Mathematics Not sure what your question is exactly. You should have the code sample be leaner and more specific.
 
@Mathematics so, you upload y to a web service, then that service processes it and then you want to download it?
 
11:52 AM
And you haven't even included your WaitForDocumentToBeUploadedToList2 method.
 
I would suggest you do it in one request, if not, then you would have a request that either waits on the services' end or checks if the service is done processing
 
JRO
Hi all, Can I resize a form from a Base form?
 
second is called polling... which I generally despise
(not because it is bad, but mostly because it could ussually be better)
 
@AvnerShahar-Kashtan we are leaving it soon :)
@AvnerShahar-Kashtan that's where I am struggling
 
Right now, your Upload method is synchronous. It simply uploads them one after the other.
 
11:55 AM
Basically code is working for creating and uploading 1 document only,
I want to make it work with X number of documents
 
Nothing parallel there.
 
ah
you want multithreaded stuff
 
That's what the title says.
 
i dont read
 
yes, but I am not sure how I can do so
 
11:56 AM
you could use a parralel for
they offer quite good api, performance and ease of use
 
If you want to upload them concurrently, and SPS doesn't mind a lot of connections, simply take the inner parts of the foreach loop and extract them to a method that returns a new task. Then you can keep the list of tasks and do what you want with them - wait on all of them, wait for the first to finish, or whatever.
 
and ofcourse, I spelled "parralel" wrong
 
Parallel.For/Parallel.ForEach are also a fine choice if you just want to run them all and wait for them all to complete.,
 
Right, but for this method...

WaitForDocumentToBeUploadedToList2();

I will have to add try catch... but I am not sure how can I keep trying for X number of documents in parallel if that makes sense :)
 
@trand a range of 10 will be hard to guess, you'll probably need a few thousands to millions of results. (totally scientific wild ass guess.)
 
11:58 AM
@Mathematics Try/catch inside the parallel method.
Unless you want any error in any task to abort the whole process.
 
why try/catch?
 
If you don't want any failed upload to take everything down with it.
 
ok let me try it, Thank you :)
 
If you create a Task for each upload, you can then do Task.WhenAll on the list of tasks, which gives you a new Task, one that completes when all subtasks complete.
 
coming from javascript, multi threaded stuff is like porn
 
12:10 PM
javascript has decent promises libraries these days, too.
And ES7 (I think) has async/await too.
 
ES7 doesnt run on browsers
and promises are not quite the same
making a function that waits until a promise is done is not that easy
better yet, I havent been able to find or create one yet
and I really want to have it
 
async/await is supported by all recent eversions of FF, Chrome and Edge.
 
hmm...
lemme check
 
but how many people run those versions (in percentages, per region)
I had a website that told you, but I forgot which one it was
await 70% async 97%
in the netherlands
which is a bit higher than global
async could be used
 
12:24 PM
Hello
:)
 
o/
 
Hi kurdish mom @AvnerShahar-Kashtan
 
hya
 
Guys is there any way to draw Graphics with wizard?
is there any application
 
Define what you mean by Wizard.
 
12:26 PM
i mean by drag and drop
inseted of coding like DrawString
DrawSomething()
its really tedious to do that with code
lets explane more
for example i would like to design this paper to print by c#
what is the easiest way to do that?
i normally do that with Graphics
and then print
but thats really tedious
isnt there an easier way?
 
a gui designer
(iDunno, never use winforms)
 
12:52 PM
Use Winforms it's easier for newbies
 
doesnt he use winforms already?
 
report creator?
 
Sounds like something you would want to use a PDF writer
or Excel interloper
 
Could use word with a template
replace certain values with whatever you want
Worked well for me in the past
 
how?
can you explane more
i dont want use another application like MSword to print
 
12:59 PM
Just recently I learned that I can insert a Word object into Outlook and paste code into the word object, making it 100x easier to copy/paste code and have it look good
 
i want print the document in the c#
 
I want print document in C$$
 
derp
 
>@har
 

« first day (2460 days earlier)      last day (2490 days later) »