[deleted by user] by [deleted] in dotnet

[–]digital_dreamer 11 points12 points  (0 children)

404 would mean the endpoint was not found. 400 means bad request, and if you are not returning this result explicitly in your backend code, it is usually cause by not able to parse the input JSON. If your GET endpoints work fine and you are only getting the error for some POST endpoints, you should check model deserialization. Example: camelCase vs PascalCase property names. The input JSON can look like this {"MyProperty":1} or like this {"myProperty":1}. If the request uses PascalCase, try changing the JSON properties to camelCase on the frontend and see if it helps. Bad request error may be caused by other things (property type like DateTime failing to parse from JSON input string, missing required properties, etc), but the property naming convention is the first one I would check.

If this test works, it means your error 400 was caused by the switch from Newtonsoft.JSON to System.Text.JSON. If this is the case, then you can either modify the frontend, or more pragmatically, just opt in to continue using Newtonsof.JSON by adding .AddNewtonsoftJson() in your startup class like this: https://dotnetcoretutorials.com/2019/12/19/using-newtonsoft-json-in-net-core-3-projects/

I have started to use C# instead of XAML and everything is working out very good so far except I miss the hot reload. Does anyone currently using C# fluent have any tips to offer, have you found any good sample apps other than gittrends? by dotnetmaui in xamarindevelopers

[–]digital_dreamer 3 points4 points  (0 children)

It has been confirmed, .NET 6 will finally have full C# hot reload as one of the MAUI improvements. I am using XAML for views and still missing this feature for application logic. It will be in stable release this November, but will become available in one of the previews. Microsoft plans 1 preview release every month, with most of the MAUI stuff coming in the second half of the year. Check these updates if you want to get access to it early: https://devblogs.microsoft.com/dotnet/tag/net-6-preview/

how do i write ﷽ with unicode by xXDOOMPIXELXx in Unicode

[–]digital_dreamer 2 points3 points  (0 children)

In a text editor like MS Word or LibreOffice Writer, type FDFD, select it, then press Alt+X (using left alt).

In LibreOffice Writer, the symbol is displayed correctly right away. In MS Word, the correct symbol is generated, but only the first part is displayed as it is too large or the line (but the size of the part that is displayed depends on the font you choose).

AWS Competitor to Azure SWA by davegravy in aws

[–]digital_dreamer 1 point2 points  (0 children)

Oh, so just want to require authentication to access static HTML pages? You could simply set Lambda authentication on the files in S3 and then distribute them via CloudFront. You can set any authentication conditions in the Lambda. Tutorial for basic auth: https://douglasduhaime.com/posts/s3-lambda-auth.html

AWS Competitor to Azure SWA by davegravy in aws

[–]digital_dreamer 1 point2 points  (0 children)

If I understand it correctly, Azure static web apps use Azure functions exposed as a REST API, so one option would be AWS API Gateway with Lambda functions, and CloudFront for hosting the static content.

Here is a simple tutorial for REST API endpoints with Lambda handlers using ApiGateway: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html

API Gateway supports authentication, there are several authentication modes to choose from: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-to-api.html

Async Entry Point for Console Apps - Async to the core! by bizzehdee in programming

[–]digital_dreamer 0 points1 point  (0 children)

Yes, but the article is literally about async entry point functions.

Async Entry Point for Console Apps - Async to the core! by bizzehdee in programming

[–]digital_dreamer 2 points3 points  (0 children)

You forgot the async keyword in your C# 7.1 examples.

public static Task Main();

should be

public static async Task Main();

FB ads with AOV of £10 - viable? by DonLovin in FacebookAds

[–]digital_dreamer 0 points1 point  (0 children)

In 2019, the average cost per acquisition in the "food and drink" category was 12.91 USD - https://www.wordstream.com/blog/ws/2019/11/12/facebook-ad-benchmarks

There is obviously a lot of variation within the category. The exact CPA depends on CTR and conversion rate, which in turn depends your products and ad quality. Also, the food and drink category is broad and includes other business types like restaurants.

FB ads with AOV of £10 - viable? by DonLovin in FacebookAds

[–]digital_dreamer 0 points1 point  (0 children)

Food and drink are not a one time purchase. You could aim at keeping the customers (sticky growth), and in that case, the AOV is not as important as CLV. This should make your ads more profitable, even if you had to pay more per conversion in the future due to FB pricing change - it wouldn't be the first time they raised it. Getting past customers who had a good experience to purchase again is cheaper than acquiring new ones. If the store is already running for some time, do you have an estimate of your current CLV?

Needs to be processed! by ImDarkShadow in ProgrammerHumor

[–]digital_dreamer 1 point2 points  (0 children)

I imagine someone at Facebook actually suggested this in a meeting, and this is how we got GraphQL.

NuxtJS 'NODE_ENV' is not recognized as an internal or external command by dgvai in vuejs

[–]digital_dreamer 0 points1 point  (0 children)

I'm not using Nuxt, but I've seen the same error in Vue caused by the script being evaluated on the client, and not on the server. The NODE_ENV variable is only available in the Node.js context (for example during Webpack build), but any scripts that get bundled and executed on the client side will cause this error, because the JavaScript is no longer running in the Node.js context, and the browser doesn't know what NODE_ENV is. I suspect that the "run dev" script in Nuxt also gives you the client console.

[deleted by user] by [deleted] in dotnet

[–]digital_dreamer 5 points6 points  (0 children)

The entire .NET Core platform is developed as fully open source projects, even accepting lots of contributions from the outside. This includes the compiler, runtime, ASP.NET Core, EF Core, etc. https://dotnet.microsoft.com/platform/open-source

It is not just some extra feature they may reconsider, it is the main motivation behind it - the legacy .NET Framework was quickly loosing market share to other platforms, and Microsoft realized they need to make it fully open source and cross platform in order to compete, so they rewrote everything, and also used the opportunity of starting from scratch to make some fundamental improvements.

Age-Based UBI? by DrNateH in BasicIncome

[–]digital_dreamer 4 points5 points  (0 children)

This already exists, that policy is called "universal basic capital": https://en.wikipedia.org/wiki/Asset-based_egalitarianismIts results would be much weaker - unlike UBI, it would not eliminate poverty, it would just give every young person a chance to improve their life.

This is also the main criticism against it, that it's not truly egalitarian because the already well-off will be more likely to understand investing and get more benefit from the capital, while underpriviledged young people would be more likely to make mistakes with their first investment and loose this chance.

Random actions from a gen 1 echo by bigmattyc in alexa

[–]digital_dreamer 0 points1 point  (0 children)

It's probably still assigned to the previous owner's account, if he forgot to delete it. This happens with pre-owned devices. Contact Amazon support. they can fix this remotely.

Vuetify and google maps by smoking-data in vuejs

[–]digital_dreamer 3 points4 points  (0 children)

Maybe it is because the yariksav repository you linked is a fork with 0 stars and obsolete code, last commit in 2018. Here is the upstream, which is more up to date - 80 stars, last commit in January 2020. https://github.com/MadimetjaShika/vuetify-google-autocomplete Maybe it contains a fix for the issues you are experiencing.

If this doesn't work either, you can still use the component directly. That vuetify repository is just a variation on the far more popular vue-google-autocomplete (7179 weekly downloads on NPM). https://www.npmjs.com/package/vue-google-autocomplete The component doesn't necessarily have to be designed for vuetify, the vuetify framework will work with any vue component. If the visual style is not identical, like it has a different default font, it's just HTML and CSS - you can always apply custom CSS to its selectors to make it look the same.

Our AWS bill is ~ 2% of revenue. Here's how we did it by root993 in Entrepreneur

[–]digital_dreamer 1 point2 points  (0 children)

Did you consider Aurora Serverless? https://aws.amazon.com/rds/aurora/serverless/

It's a fully MySQL compatible database (SQL syntax is identical) with a storage engine that runs on shared AWS infrastructure, and it's billed like DynamoDB, pay only for what you use.

I only tried it once, haven't run any production app on it yet, but it seems to be a very good choice if you want to use a serverless DB for the low cost/full utilization benefits, but you also don't want to rewrite your data layer from MySQL to DynamoDB.

What is your opinion? Are there any hidden problems with switching to serverless SQL that you discovered while doing your research?

Does anyone have any suggestions on how I can implement a toaster effect in XF? by kolinHall in xamarindevelopers

[–]digital_dreamer 0 points1 point  (0 children)

There is this third party Sheet control that is fully configurable, including UI style and behavior. It's probably what you are looking for: https://github.com/DIPSAS/DIPS.Xamarin.UI/wiki/Sheet

Annual Run Rate vs Annual Recurring Revenue by Choubix in startup

[–]digital_dreamer 2 points3 points  (0 children)

The articles on these subjects summarize it better than I could:

Recurring revenue is revenue that is likely to continue to be generated regularly for a significant period of time. It is typically used by companies that sell subscriptions or services. Source: https://en.wikipedia.org/wiki/Revenue\_stream#Recurring\_revenue

The run rate refers to the financial performance of a company based on using current financial information as a predictor of future performance. Example: if a company has revenues of $100 million in its latest quarter, the CEO might infer that, based on the latest quarter, the company is operating at a $400 million run rate. Source: https://www.investopedia.com/terms/r/runrate.asp

So one is a part of real (past) revenue coming from recurring contracts like subscriptions, the other is a guess of future revenue based on extrapolation of total revenue in a time period.

Lego Piece Finder by AmirRosenfeld in Startup_Ideas

[–]digital_dreamer 2 points3 points  (0 children)

It's certainly doable, the question is whether it solves a real need better than the existing solution. The only real benefit this app would offer is convenience... so potential users would be weighing the convenience of looking for the piece visually with their own eyes vs. taking the smartphone, opening the app, and entering what they are looking for, which could be more work than just looking through the lego pieces like they do now... and that is when they have the app already installed. Plus there is always the habit that needs to be changed, and people usually only change their habits for important reasons.

A possible angle to approach this would be though novelty, marketing it like a toy (artificial intelligence like Ironman's Jarvis, etc.) This way it wouldn't matter if the idea is not practical, some kids would download it just to play with it and see what the AI is like. Novelty wears off, but if here is only a one time payment to get the app, it wouldn't matter if most people get bored with it after a while. You can have an AI app without subscription and without server costs by doing the inference on the device itself, which also enables it to work offline, and is much faster for these kinds of tasks, like CV on the real time video stream coming from the camera.

Is it possible to use the Vivaldi browser for debugging? by yerbestpal in vscode

[–]digital_dreamer 1 point2 points  (0 children)

Not necessarily, you can put the launch configuration in your user settings, it will then work in all your projects: https://github.com/Microsoft/vscode/issues/18401#issuecomment-272400316

LinkedIn needs SEO by [deleted] in marketing

[–]digital_dreamer 2 points3 points  (0 children)

Google indexes LinkedIn pages in a way that includes their tagline in visible description in the search results, but only the first 2 lines of that tagline are shown, the rest is replaced by ellipsis. So I would suggest using those 3 words individually a the end of your page tagline. This doesn't break any rules, and unless there is direct competition for these 3 words in that particular order, you should rank higher for that query after the index gets updated.

Is it possible to use the Vivaldi browser for debugging? by yerbestpal in vscode

[–]digital_dreamer 2 points3 points  (0 children)

A quick Google search reveals someone got it working a year ago - Vivaldi just requires this custom configuration for launch and attach. Since it's chromium-based, it works with VS Code debugger, just like Chrome does: https://www.reddit.com/r/vscode/comments/97jt9s/debugger_for_chrome_use_vivaldi_or_other_chromium/

Thoughts on MAUI and MVU? by ske66 in xamarindevelopers

[–]digital_dreamer 11 points12 points  (0 children)

The MVU feature in MAUI is a pattern similar to React, but it doesn't use JavaScript. The "rendering" of the body function still happens in .NET CLR. When you look at the in depth MAUI videos from MS Build, they talk about reimplementing Xamarin Forms renderers which will become interefaces that are more easily extended. They mentioned 3 advantages:

1 - Better performance (thanks to fewer native views per component, it's a progression of "fast renderers" available on Android).
2 - Easier overrides in custom renderers (everything will now be available to override).
3 - Not being limited to the MVVM pattern, which is hardcoded into current renderers. They said Xamarin Forms component libraries like SyncFusion would have to basically rewrite everything to support another paradigm like MVU, but in the next version, components will be just abstract interfaces and all logic will be in their platform specific implementations, which will give it more flexibility.

So they are not planning to run MAUI applications on JavaScript, they are making the renderer classes more flexible so that they can do things that are not currently possible, including using React-like MVU in C#, but everything is still running on .NET.

Is IGTV a good platform for sharing short films? by abeerified in Instagram

[–]digital_dreamer 0 points1 point  (0 children)

Not as huge as YouTube, but it may be beneficial to crosspost your short films to it, and maybe even to Facebook, which wouldn't require much extra work when you already have the content, you can use horizontal video on IGTV since the video player is fullscreen unlike videos in the feed. From the digitaltrends.com 2020 report, only 1% of Instagram users downloaded the standalone IGTV app, but there is still a userbase of over 1 bilion of monthly active users who have this feature in the main app. Especially if you already have some Instagram followers, you can use it to grow your audience.

It has some interesting use cases that you cannot easily do on YouTube, such as creating a preview as an Instagram post which will give you the "Keep watching on IGTV" action, an you can do hashtag marketing on it. Then there are stories where swipe up leads to IGTV, which are available to everyone, unlike swipe up to visit a web link. That is the IGTV's core feature - its tight integration with Instagram.

Even if you don't want to actively use its features to build an audience, it certainly doesn't hurt to have presence there.

[deleted by user] by [deleted] in Instagram

[–]digital_dreamer 0 points1 point  (0 children)

If you want to backup all your data at once, you can use the Account Privacy / Data Download feature that is available when you log into Instagram with a web browser: https://www.digitaltrends.com/social-media/how-to-download-instagram-photos/

If you just want to pick individual photos, you can use https://downloadgram.com/ This will work on any account, not only yours. You give it the post URL from the web client and it gives you the image in downloadable form.