« first day (2413 days earlier)      last day (2527 days later) » 

12:03 AM
@KamilSolecki I learn more and more about you each time
 
anyone got the number to contact developer department of microsoft?
 
@Halie everyone there was killed
so they discontinued it
 
my problem is windows 10 mobile, groove music is shit, their phone app is shit
calendar app is buggy af
i want out of windows mobile T_T i want android again
 
@Halie why did you get windows phone in teh first place?
did you think it wouldnt suck or smoething?
 
it's easy for me to develop apps since ios/android xamarin does not have much support
i rather stick to what i know
 
12:11 AM
i loathe my galaxy s7
i much preferred my lumia 930
crap app support though
i think it's mainly the samsung bloatware that I dont like, though
 
take that back, you cant possibly prefer windows mobile after you are using android in s7
 
no
I have a lock screen installed
a highly rated one
for some reason, sometimes when I unlock my phone it shows the default Samsung one, then when I unlock that it loads my one. That sucks.
I want phone calls and text messages to flash the LED and light up the screen. No other apps should bother me. I can't easily configure that. In Windows Phone there is a system level notifications config screen that makes it dead simple to override individual app notifications.
Windows Phone's locations worked for me. When i got to work it knew I was at work and when I got home it knew I was at home. Android appears to only do this if there is Wifi. I do not connect to my work's wifi.
Windows Phone has a built in 'quiet time'. You can select contacts to override this. If my gf calls when I am asleep it rings. If anyone else calls, my phone is on silent. Android does not have a simple way to do this. There are some apps which provide the functionality, but nothing as simple and easy to use.
Android does not let me turn off vibrate for individual apps. It's either on or off. WP lets me disable vibrate on apps (follows on from my notificaiton point)
I, personally, like that WP has a lot of useful features in the OS, and apps do app stuff. Android is very customisable, like desktop Linux is. But I want my OS to do OS stuff and apps to do app stuff.
 
@KamilSolecki I'm back... Let me know when you're ready. :)
 
the downside to WP is the app support is very poor. Features rarely make it to WP. Even MS pushes Office and OneDrive updates to Android and iOS before WP.
this being said, I haven't used vanilla Android, I would like to try a phone without bloatware that you cannot remove. I can't even properly root my S7.
 
have you used WP app? it's fkn garbage
phone app*
 
12:20 AM
uh
it seemed fine last time I used it
I could make calls
 
try creating a contact
try adding numbers to contacts
 
I'd use People to do that, not Phone
 
you will need 3 minutes to figure it out, meanwhile on android, takes 5 seconds to learn
 
I havent used WP in over a year, but it didnt seem too bad to me
open people, tap + and enter details
I'm looking at getting a google pixel
 
please do, anything than WP
 
12:22 AM
over the s7
 
iPhone? :P
 
though, I do like the idea that there's the ability to run full x86 apps on WP coming soon
saw a video on it online
 
i phone is dog shit
please dont talk about iphone in this forum, thanks
android has game emulators, WP has 0
 
a game emulator doesnt interest me
 
android has everythign WP has but better
il leave it like that, simple
 
12:26 AM
okay
 
12:39 AM
sorry... I got sidetracked by a dating site.
with my ADHD, it's almost instant squirrels for me.
What's wrong with the fruity phone?
 
nothing
just people with odd attachments to technology and feel they need to browbeat others into agreeing with them
I'm not a fan of the UI on the iPhone so I don't have one, but my kid's mum is useless with tech, yet can operate an iPhone with ease. So it's the appropriate device for some people.
 
I'm not a huge fan of the UI. I feel some apps could be hidden from the screen, but it seems reliable lately.
Anyway...
Has anyone been working on fun projects lately?
 
12:56 AM
im writing a small application which accepts data from borehole drilling rigs and displays the information for geo tech engineers to view
then, down the line, we will pass the info to a machine learning mob and they'll help us make the drill smart
 
Mob? As in the mafia or the gang of monsters? :P
 
lol
as in a bunch of people
 
:P
I figured.... I played too many games so I like to joke around a little.
 
I was playing mass effect andromeda this morning before work
twas fun
 
I haven't played that game
 
1:00 AM
it's fun
people crapped on it because the models werent very good, and they are pretty low budget, lots of clipping issues
but the game itself is good
 
Paperclips can be useful...
Damn.... formatting doesn't work here... leoniehallatinnovationiq.wordpress.com/2012/11/21/… :D
Ok I'll stop being silly today...

I gotcha.
Makes me wonder what defines the budget for the games
@KamilSolecki It seems like I have to position everything in its place on the windows form and render them invisible.

On startup, one set of objects, lets say Inventory in this case, will fire up -- become visible.

When View >> Buildings is selected, the Inventory objects are made invisible again while Buildings are now visible.

Am I getting this right?
@hsimah
er...
 
?
 
@hsimah I'm working on personal inventory application to keep track of inventories between individuals, buildings, and rooms, in addition with some information people can use for renter's or homeowner's insurance.
 
ok
 
1:15 AM
Dunno... Just thought you might like to know since I asked the question. I figured it would be fair if I answered it, too.
 
 
1 hour later…
2:32 AM
does anyone have tips for writing an ApiController GET endpoint which accepts some sort of query string to limit returned values? I have a Get(int id) to get one object and a Get() to get all objects. I'd like to pass in some parameters to get on other key fields, like parentId
I can write new endpoints, or parse the query string, or change the whole thing to use odata
any other options, or pros and cons for each? I dont wanna write lots of end points I dont think, I can see that getting out of hand
 
@hsimah I don't understand, you want an endpoint to do many functions pending on the querysting sent over?
 
yeah, I would like my Get() to be able to return all objects, or if the query string contains a valid property to limit on that. I googled and found GetQueryNameValuePairs() which will get me the query string key/values
I might use reflection to map those to the object properties and use linq to limit them
just wondering if I am reinventing the wheel or if there's a library out there I should use
I've used OData before, but I would have to redo a lot of my front end to change to use it
 
I would think there is a lib out there that someone made to do it, But I have never used it like that
 
how would you solve my issue?
 
2:50 AM
well what is the problem
you need an end point or more then 1 end point for the problem and you don't want to write all the end points
 
if I do a GET on /API/Job I get all my Jobs. If I do a GET on /API/Job?id=1 I get Job with id = 1
I'd like to do GET /API/Job?name=hsimah and get the Job with a Name of hsimah
I dont wanna write a million endpoints, I have been down that road before.
what I need is something that maps the key value pairs and builds a linq expression from them
looks like it's fairly simple to implement
 
humm let me take a look at my api book
 
but, I was mostly asking in case anyone knew of a better way to accomplish this, I have been known to overengineer things I do not need to
 
How would you do this in a MVC app?
 
lol the how is what I am considering now
 
3:01 AM
ya I know, I am just taking away the api part and saying how would you do this in a normal mvc web app
if I had one action, and I wanted it to do 2 things what template would I used
the pagenation?
 
last time I was on a project that dealt with this we used OData to do the querying
 
was reading up on that and sounds like that is the only option
 
thanks
I thought so, but sometimes you're just searching for the wrong thing
 
ya that is what the book says to use odata other then it exposes your domain models to the world
that is usually a no no
 
yeah
 
3:28 AM
MeowMeowMeowMeowMeow
 
mr5
o/
string.Where(), IEnumerable.Any() and using as an alias cannot be recognized by my compiler. I'm using VS2017 in Xamarin
 
using System.Linq; ?
using System.Collections.Generic; ?
maybe some reference missing.
 
mr5
yep. not working still
even if try in some simple C# console dekstop app.
 
System.Linq.Enumerable.Where in Assembly System.Core 2.0.5.0 7cec85d7bea7798e (igore this, this is mono.android)
check .Net Framework version
 
mr5
okay wait
Oh wait
IEnumerable.Any() does not work in Xamarin
it works when I try it on console app
and others still don't work
 
3:36 AM
no. "".Any(); works in mono environment
check NUGET pakages
 
mr5
what should I check there?
 
all .NET framework are installed by NUGET pakages in Mono environment
Project > Manage NUGET pakages
make sure System.Linq is installed.
 
mr5
it is installed as I can see other Linq other than *.Any()
 
Any() in IEnumerable
and string are Enumerable
only Enumerable got Any() as Linq method
did you get the method?
 
mr5
4:18 AM
@nyconing I have managed to make the other two works with the help of my colleague. Now, I have found out that you cannot use *.Any() on an unspecified IEnumerable that is, the type is still pending
for the using as an alias, I have also found out that the right hand side should be explicit, i.e include the namespace where it is as well
@Kramb lol
 
mr5
4:43 AM
Supposed I have this as a member variable IEnumerable DataSource { get; set; }
and I want to make a method to check if that IEnumerable is empty.
My preferred way would be IEnumerable.Any() as it is faster than others but it won't compile.
it should be <= 0 tf
this is the most useful error message I have ever read
 
5:26 AM
@mr5 this should not compiled.
you must declared the generic type
IEnumerable<MyClass>
or not to typed on interface
Enumerable DataSource { get; set; }
 
I call IEnumerable "unhelpful enumerable". Basically the only thing you can do with it, is to convert it to a "helpful enumerable", that is, IEnumerable<T>
and that one has all the useful LINQ operations
 
mr5
@milleniumbug that's because it's an interface?
@nyconing it's a valid code
 
@mr5 yes, I mean you not get Linq method compiled when you try to use linq method on this object.
all the thing you need to do is just add generic type as I said :P
IEnumerable<objectclass>
8 mins ago, by milleniumbug
I call IEnumerable "unhelpful enumerable". Basically the only thing you can do with it, is to convert it to a "helpful enumerable", that is, IEnumerable<T>
and you will get the Linq method.
 
6:30 AM
o/
 
Morning o/
 
g'morning.
Turns out my Powershell solution from yesterday was wrong.
The Powershell automation API lets you add parameters with no value (cmd.Parameters.Add("Force")), but that's not equivalent to adding a -Force parameter with no value in the PS syntax.
You have to do cmd.Parameters.Add("Force", SwitchParameter.Present).
Intuitive.
 
6:48 AM
what pissed me off the most about powershell in c# is the fact you cant do async tasks and have them write to the pipeline
 
Ah, I'm so not even remotely close to that. I just have a couple of scripts someone has developed for us, and we want to call them as part of a large execution process. I don't want to just hand the .ps1 file to an external powershell process because I want to be able to get more information about success and failure.
 
ah
its very easy to write cmdlets in c#
but the pipeline only exists on one thread
 
@hsimah So async actions lose the pipeline?
How about a cmdlet wrapper that uses await and marshals execution back to the original thread?
 
ohayou
 
well, you either let them run async and lose the pipeline, or you wait, in which case your output is held up by the longest running task
 
6:53 AM
Well, a pipeline, by definition, is executed sequentially, isn't it?
Commands depend on the output of previous commands.
 
yeah, but for example I want to query a ServiceController for three remote machines. I'd like the results to go down the pipeline as they come in
it's no big deal, not even the Get-Service cmdlet can do it
 
mr5
working on Windows with VS2017, I find this line helpful every time there's a build error:
taskkill /f /im msbuild.exe /t
 
@mr5 Add it to your pre-build script.
At various times, I had pre-build scripts that killed XDesProc (WPF designer process) and winword.exe (when developing office plugins).
XDesProc is a scourge upon humanity.
I was glad when VS2015 added an option to disable it permanently.
 
Any Xamarin gurus around? :D
 
mr5
7:09 AM
And on top of that, I think VS can be the next candidate for generating randomness. You can't predict when will it throw a build error
 
Its a temperamental beast for sure
 
7:24 AM
I want to pass a list from C# to a dll written in vb6 .
how can I do it ?
 
@IccheGuri The VB6 DLL is a COM dll. You can add a COM reference to it, and the resulting wrapper will automatically marshal many common .NET types to COM types.
 
Can you please tell in a more easy language ?
In vb6 , there is a collections which is similar to list in C#
right ?
So suppose I have the following list in C#
List<Int> aList ;
FamIdentify in VB6 is defined as here :
 
I'm pretty sure a C# List<int> will be passed to VB as a Collection automatically.
 
ok . I am giving a try
 
Morn all
 
7:32 AM
Can you give any online link to clear my knowledge about this ?
 
1
A: Marshal a list of objects from VB6 to C#

Hans PassantYou don't have a lot of great options. You can't use generics, that leaves you with the olden ArrayList class. Or an array. The COM interop layer will automatically generate a COM enumerator for a C# class that implements IEnumerable, you can iterate it on the VB6 side with For Each. Similarl...

> The COM interop layer will automatically generate a COM enumerator for a C# class that implements IEnumerable, you can iterate it on the VB6 side with For Each.
My condolences for still having to support VB6.
 
Thank you
 
@KamilSolecki That's not really relevant.
 
oh wait not this one sorry
@AvnerShahar-Kashtan yeah I just noticed
 
mr5
7:39 AM
Is this even possible in XAML: <Image Source="{Binding Thumbnail, StringFormat={StaticResource ThumbnailFormat}}"
 
StringFormat?
Ah, you want to format the URI that's passed to Source?
 
Thank you man .
@KamilSolecki
 
No, that won't work. Source expects an ImageSource, not a string. There's an implicit converter, when you put a string there, that creates an image source from that URL.
 
mr5
Yep. And the format varies per platform
 
it is fair to make a test of 30 pages and all the questions are conceptual and i only have 1 hour
 
7:42 AM
But when you explicitly bind it to a string, I think it bypasses it.
 
for assessment test
 
mr5
It expects an image path though
@ARr0w think about this instead, how about ... you don't do it?
 
i just took one
couldn't finish
cos the first 10 pages were all conceptual and programming related (including maths)
i had to make recursive method that would multiply the base number with its power
these things take time. Unless you've memorized a specific scenario
 
mr5
@AvnerShahar-Kashtan I doubt that
 
took about my 10+ since it is the first time in life that i had such a scenario
takes time in first time always.
 
7:46 AM
11
A: WPF: "Value of type 'String' cannot be converted to 'System.Windows.Media.ImageSource'."

Quintin RobinsonWPF uses an implicit type converter to convert the xaml string to the expected type. In code you are statically bound by the object type... If you look at the example here it shows how to set the source property to a BitmapImage that is generated from a local uri programatically.

If you try setting it in code, like myImage.Source = "http://blah", you'll get the same error. Check out the type of the Source property - it's an ImageSource, not a string.
When you're binding the property, you're bypassing the implicit conversion. I think it's done by the XAML compiler, not even by the runtime.
 
good morning
 
kills ntohl
die man
for fun
morning
 
hey yall, I've made a huge mistake (at least I think it was me)
I've ran update-database on a production server from a dev branch (wrong branch) which had completely updated schema.

I'm struggling to get it back to the production branches schema, I've even created the database from scratch and tried to copy the data over but that doesn't work because the schema is fairly different.

Any ideas ?
Last resort would be for me to copy the data manually, record by record 😬
 
8:01 AM
oh cheers, I'll give that a read (y)
 
mr5
Aren't you guys doing any backups?
 
I think we are yes
I'm going to see what backups/transaction logs we have
 
I get following error: "The remote server returned an error: (401) Unauthorized" in this line:

using (HttpWebResponse httpResponse = request.GetResponse() as HttpWebResponse) {}, anyone knows why?
 
The last backup taken (27 March 2017 12:32:25)
Damn
 
mr5
o.O
 
8:03 AM
@wieblinger you arent authenticated
 
That was quite a while back and we've since made so many darn changes
 
mr5
you should start considering to backup your database every month
 
Is that it? Am I buggered then?
 
@wieblinger the failed response should also include the header which tells you how to auth
 
@KamilSolecki but I thought I was, I authenticated with:

const string ChargeUrl = "https://api.stripe.com/v1/charges?amount={0}&currency={1}&source={2}&description={3}"; string requestUrl = HttpUtility.UrlPathEncode(
String.Format(ChargeUrl, 1000, "usd", "tok_jgjgjjgg", "Test charge to text@example.com") );
HttpWebRequest request = WebRequest.Create(requestUrl) as HttpWebRequest; request.Headers.Add("Authorization", "sk_test_jjgjgjgjgjg"); request.ContentType = "application/x-www-form-urlencoded";
 
8:05 AM
Check the header and see if you are doing it correctly
 
@KamilSolecki I don't have much experience with C#, with Java I think it would be:

Stripe.apiKey = PLATFORM_SECRET_KEY;
RequestOptions requestOptions = RequestOptions.builder().setStripeAccount(CONNECTED_STRIPE_ACCOUNT_ID).build();

But I'm not sure how to do it in C#? Any ideas?
 
mr5
@JARRRRG just so you know I Googled what you have just said ...and I'm in the office rn
 
@wieblinger

you have your HttpRequest(). Lets call it request:
request.Credentials = new NetworkCredential(...., ....);
Or auth header:
public void SetBasicAuthHeader(WebRequest req, String userName, String userPassword)
{
    string authInfo = userName + ":" + userPassword;
    authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
    req.Headers["Authorization"] = "Basic " + authInfo;
}
Unless you have a different auth type, but you didnt specify.
 
@ARr0w negative emotions detected
 
I buy my furniture at:
 
mr5
8:21 AM
Why is that when devenv(Visual Studio) crashes, it pops up a dialog telling me which debugger I want to use. So do they want me to fix their shit?
 
No, Its so you can debug visual studio with visual studio
 
@KamilSolecki I have tried the function you gave but still I get the error, the username should be the email I use on stripe and the password just the password I used for stripe, right?
 
@mr5 - I fixed it buddy, had to rollback a bunch of migrations - some commented lines and manage to save the day!"
Thank you for your help and support
 
On the right side it says that 401 in stripe means that you didnt provide API key.
 
mr5
@JARRRRG it wasn't me who helped you, I think it's @KamilSolecki
he's da real MVP!
 
8:32 AM
yay mvp
 
Lol the old critplank with the retarded crit dmg
oneshot q - sure why not
 
@Proxy absolutely spiffing
 
Ive seen my friend do a quadra under base laser with him
@Proxy
Due to crazy dmg and lifesteal
 
what does he say? yohoho and a bottle of rum? now who has no rum? @Kieran
yeah
 
8:34 AM
THATS WHERE MY RUM WENT
 
but the old map looks so nostalgic now
that was 4 years ago
 
@Kieran you could probably be friends with this dude: youtube.com/channel/UCERpgysn81hv0c0FXIjXsTg
 
Nah, not the biggest fan of LoL tbh
 
mr5
ew LoL
 
fuck I just remembered im supposed to hit rank 5 in hearthstone
brb
 
8:43 AM
It's a context switch whiplash sort of day.
 
Oh I hate those days
especially when it's baking hot in the office
britains first and most likely only warm day this year and I'm here saving databases and now about to switch back to sql triggers to deal with business logic. DO IT IN THE DATABASE they said
 

« first day (2413 days earlier)      last day (2527 days later) »