teleren/devto huggingface dataset:
谈谈写论文
Published: 2023-09-17 11:56:23

我觉得这是一种**素养**，是受过高等教育该具备的一种研究问题，探索问题，和表达研究结果的一种科学素养，最终体现出来的就是符合一定的规范能写出一篇文章；

**结果并不重要**，过程很重要；

**培养习惯**。在受教育的过程中，学校就该有形无形的培养学生的这种思维习惯，看待问题，研究问题，解决问题；并且培养学生的写作习惯，对于所研究的领域对其整理反思，书写行文，发表分享探讨；

**习惯的意义**。这个过程很重要，学校培育了， 学生也真正的具备这种特性了，我觉得才是受教育了，才是最终写论文的意义所在，最终写个论文，看看学生是否具备了这种研究问题的素养和对专业领域的掌握程度，这是底线了；

**只有结果检验，没有加教育过程**。好像搞反了，平时从来不接受类似的思维影响培训和教育，也没有类似的行为习惯，自己没有，同学没有，老师也从来不提，等到要毕业了，要写论文，这个环节到了才该干这样的事情，这个时候才会有老师指导规范，按规律走个流程；

**这不对，这毫无意义**。所有学生都不具备这个素养，都只是为了过这个关卡，应付这个工作，拿个毕业证而糊弄过去，但是这真的毫无意义，这就是个形式；

**痛苦的根源**。而且对于学生来说，平时根本得不到类似的思维影响和行为训练，自己压根就不是这样的人，你让我冷不丁的毕业干这种事情，真是头大，痛苦，煎熬，困难；
我**本科**毕业时论文基本是我女友写的；我不会扯犊子，是真不会，极其的痛苦；
而且吧我这人也是有点倔，我觉得没啥用浪费时间，没有意义；
**读研**的时候还有论文，小论文，大论文，听到就头大，真是扯不上来，抵触情绪极大，比杀了我还痛苦，就是座大山；

**依旧虚伪**。我现在想想也还是不对，老师从来没有对于学生的科研精神，思维习惯，行为习惯有过引导和训练，各专业课各教个的做做作业考个试拉倒，干的最多的就是考试，做做练习题；论文这就是个临近毕业的特定任务；

**论文的意义**。那我不懂学校要写这个干嘛？有何意义，是不是关注点反了，只把注意力放正在最终结果上，不管你具不具备类似的素养，你把结果给我就行，符合一定的规范，就过了；这不还是应试教育那一套吗？

**写论文可以很简单**。假设一个学生他平时就是个爱钻研问题，就是以论文的这种思维习惯去观察世界，看待问题，分析问题，解决问题，平时经常写作，交流，沟通，平时就具备这种科学思维和行为习惯，那么毕业写写论文不是像呼吸一样简单？而且，也是教育真正的目的所在吧，使这个学生真正的具备了这种素养；

**形式主义，引导错误价值观**。事情搞反了，关注点放错了，学生痛苦，觉得没有意义，对于学校来说也失去了这个关卡的真正意义，失去了教育的意义；最终将学生的价值观推向相反的反向：有没有意义不重要，糊弄过去就行，求真务实不重要，糊弄过去就行，平时的素养不重要，长期主义不重要，奇技淫巧过关就行；

**带坏社会风气**。最终整个社会的价值观就是：鼠目寸光，敷衍了事，不关注是否有意义、有价值，只关注是否能过关、能挣钱，能升职能当官；这个民族也将会很有忍耐力，可以做自己不愿做的事情，不感兴趣的事情，觉得没有意的事情；

**优秀源于热爱**。如果你就是这样的人，一切都很轻松，很有乐趣，并且很容易变得专业和伟大；论文引导的重点是真正的，实实在在的让你具备这种科学特征
Upgrade Local Angular CLI to Version 10 using NPM
Published: 2023-09-17 11:29:15

Starting from Angular.js, Now the Angular team has launched version 10 to make it the first choice for developers for single-page applications. 

In this article, We will see how to update the Angular CLI version to 10 using the Node Package Manager(NPM). For installing Angular CLI, Node and NPm must be installed in local machine. 

### Check  Installed Angular CLI Version
Run the below command over the terminal to check the installed version of Angular.

``````ng --version  

#or

ng v``````

After running the above command, the Below information will show on the screen.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kwiwouee7j1sepor46hl.png)

### Upgrade to Angular 10 CLI
Uninstall the current Angular CLI package over the local system to update Angular CLI globally. Run below command for the same. 

``````npm uninstall --global angular-cli``````

If npm version over the local system is higher then 5, then you have to clear the cache using the below command:

``````npm cache verify``````

Run below command to instal l @angular/cli@10.0.0-next.0 

``````npm install -g @angular/cli@next``````

Now check the installed Angular version using command **ng v**. You  will see all the Angular packages updated.

### Upgrade Local Angular CLI to Version 10
For updating Angular version inside any angular project, Run below commands one by one:

``````// remove node modules folder

rm -rf node_modules

// remove the packages saved in dev dependencies under package.json

npm uninstall --save-dev

// upgrade Angular package version

angular-cli npm install -g @angular/cli@next

// Install the latest packages again

npm install``````

### Conclusion
In this article, We learn to upgrade the Angular CLI version on your local machine.

I hope this article helped you to get in-depth knowledge about the topic. You can also find other demos/articles at [Angular Sample Projects](https://jsonworld.com/demo/upgrade-local-angular-cli-to-version-10-using-npm) here to start working on enterprise-level applications.

Let me know your thoughts over email **pankaj.itdeveloper@gmail.com.** I would love to hear them and If you like this article, share it with your friends.

Thank You!

This article is originally posted over [jsonworld](jsonworld.com)
laravel 9 with react
Tags: discuss
Published: 2023-09-17 11:11:34


hello everyone i am using laravel 9 and react and i keep getting cors error this is the error message :
Access to XMLHttpRequest at 'http://127.0.0.1:8000/addCompany' from origin 'http://localhost:5173' has been blocked by CORS policy: Cannot parse Access-Control-Allow-Headers response header field in preflight response.
i already added a middleware to handle cors but its not working for this one so how to solve this issue forever in my laravel-react app
Chatting with your database: What did I learn by letting AI generate SQL?
Tags: database, python, ai, learning
Published: 2023-09-17 11:10:32

This is one of the intriguing use cases of ChatGPT and other LLMs.

You pass the information about your database and a question to a large language model. In return you get an SQL query, which you can execute to get the answer.

As a cricket fan, I had an sqlite database with match statistics so I made AI answer some questions. Here's what I learned:

* Prompt Engineering is a serious thing. When it comes to utilising LLMs, packaging the right amount of context into the prompts will influence your results. Before using LangChain I wrote custom logic to create context for db schema, and I found myself iterating over minute details to make the queries as accurate as possible.

* LangChain is not just a wrapper. It is a very smart tool that glues together various moving parts. I found my results to be more consistent using it.

* Denormalised schema will fetch more consistent results. As you can see in the video, one of the queries returned player uuid instead of name. This was because my data model was designed for a different use case where as it will make it easier for GPT-4 if I had the column as player_name instead of id.

* There is a risk of data leak if you want to use this in production. Exposing such an interface publicly is risky. We can mitigate this risk my restricting the number of tables shared with AI model and pre-processing the SQL queries generated before executing them. Using a restricted read-only user will be another wise guard rail.

I will continue exploring this use case and share my learning here in future.

Thanks for reading. 

{% embed https://x.com/srikanth_prod/status/1703365121735610859?s=20 %}
question about laravel 9 and react
Tags: laravel, php, programming, errors
Published: 2023-09-17 11:08:55

hello everyone i am using laravel 9 and react and i keep getting cors error this is the error message :
Access to XMLHttpRequest at 'http://127.0.0.1:8000/addCompany' from origin 'http://localhost:5173' has been blocked by CORS policy: Cannot parse Access-Control-Allow-Headers response header field in preflight response.
i already added a middleware to handle cors but its not working for this one so how to solve this issue forever in my laravel-react app
How to decide to have one endpoint or different?
Tags: java, springboot, development, webdev
Published: 2023-09-17 11:05:33

Actually, i have an endpoint which takes Jwt token and returns user from the token(decrypting). Now i have to write other endpoint which gives user details but in request i also get identity source(thirdparty soruce) and id. so in this case i will get details from third-party source if i get request like this.the Response details data will not same in both the cases. Now, i couldn't decide if i need to have different endpoints or not??
419 Page expired Laravel 10|9 postman, Ajax Post, Form Submit Login
Tags: laravel, ajax, post, 419pageexpired
Published: 2023-09-17 11:04:50

## 419 Page expired Laravel postman, Ajax Post, Form Submit Login

The 419 page expired error in Laravel can occur when a CSRF token expires or becomes invalid. This error can happen when a user submits a post request with postman, ajax post request. To fix this error, you can try:

- Refreshing the page
- Logging out and logging back in again to obtain a new CSRF token
- Clearing your browser cache and cookies
- Restarting your browser
- Restarting your computer
- Trying a different web browser

## The 419 error can also occur due to:

- Misconfigured cache
- Permissions
- Improper session settings
- If you are using Ajax requests, you can try adding a CSRF token in the header of the Ajax requests.

Read More [419 Page expired Laravel postman, Ajax Post, Form Submit Login](https://www.tutsmake.com/solved-laravel-419-page-expired/)
PyGraft Release
Tags: python, opensource, datascience, ai
Published: 2023-09-17 11:03:52

Hi there!

For those of you interested in open-source Python tools, I am happy to share with you our new work: **PyGraft**, a configurable Python tool to generate synthetic knowledge graphs easily! We expect PyGraft to help you generate new and tailored benchmark datasets useful for any kind of Machine Learning related tasks.

We plan on submitting the paper presenting PyGraft to an international conference, so we welcome any help: **please consider starring and forking our GitHub repository** if you like the project, this is very **important for increasing PyGraft's visibility and proposing additional features in the future!**

We also welcome any ideas on how to improve PyGraft. So, if you want to contribute, let us get in touch!

GitHub repo: https://github.com/nicolas-hbt/pygraft
How to Create OWN Visual Studio Code Extension | Code Snippets Extension
Tags: vscode, extensions, codesnippets, devlopersabbi
Published: 2023-09-17 11:02:03

<h2 style="text-align:center">Hello guys</h2>
Are you looking to enhance your coding experience in Visual Studio Code? In this informative video tutorial, ST Sabbir, a seasoned developer, will guide you step-by-step on how to create your own Visual Studio Code extension, specifically focusing on code snippets. This extensive tutorial is perfect for both beginner and intermediate programmers who want to how to create visual studio code snippets extension.🔥🔥

⭕OPEN SOURCE CODE SNIPPETS⭕
https://github.com/devlopersabbir/sabbir-code-snippet

## YouTube Video Link
{% embed https://youtu.be/1m4XO19bZMU %}

## Contributing...

Since this package is fully open-source so, if you would like to contribute to
this project, please follow these steps:

1. Fork this repository.
2. Clone your forked repository.
3. For your changes.
4. Open `snippets` directory and if you want to add new **framework snippet**
   then create a new file like `snippets.java.snippets` or Make your changes,
   and commit them.
   - Remember, don't forget to added your language `id` inside this array
   ```js
   "snippets": [
      {
        "language": "html",
        "path": "./snippets/snippets.html-snippets"
      },
      {
        "language": "javascript",
        "path": "./snippets/snippets.javascript-snippets"
      }
    ]
   ```
5. If possible update `README.md` file based on your changes or new functions.
6. Push them to your forked repository:
7. Create a pull request on this repository.
8. Add a simple message that you made change or add on your pull request.
Imdaad Official
Published: 2023-09-17 10:53:10

Imdaad, a multi-awarded, fully integrated facilities management company in the UAE. It provides turnkey solutions under Hard and Soft Facilities Management (FM), Waste and Environment, Power and Energy portfolios and is recognised in the market for its innovative, professional, and quality-driven services. 
The company has received several prominent industry awards and recognitions, including ‘Green Facility Management Organization of the Year’ at the 2015 Emirates Green Building Council (EGBC) Awards and the ‘Sheikh Khalifa Excellence Award (SKEA), among others. Corporate social responsibility (CSR) is a core value for Imdaad and its community-focused programs such as Be’ati (My Environment) – a flagship CSR initiative and Khaddour – the fun-loving green leaf character, reinforces its strong commitment to environmental sustainability. For more details visit- https://www.imdaad.ae/


**Address	**Near UAE Exchange Metro Station, JAFZA, Dubai
Laravel 10 Class Intervention Image Facades Provider Not Found
Published: 2023-09-17 10:48:30

If you're having trouble with the Intervention Image class, facades, or providers in Laravel. Here, we will find solution for that.

## Laravel 10 Class Intervention Image Facades Provider Not Found

Intervention Image has optional support for Laravel. To use the package in Laravel, you can try these steps:

- Add “intervention/image” to your composer.json file.
- Run composer install.
- Open your Laravel config file, config/app.php.
- Add the service providers for the package to the providers array.
- Add the facade of the package to the aliases array.
- The Image Class will be auto-loaded by Laravel.

You can also try these steps:

- Add php composer.phar require intervention/image.
- Add Intervention\Image\ImageServiceProvider::class to the providers array in config/app.php.
- Add 'Image' => Intervention\Image\Facades\Image::class to the aliases array in config/app.php.

Read More [Laravel 10 Class Intervention Image Facades Provider Not Found
](https://www.tutsmake.com/intervention-image-class-facades-providers-not-found-in-laravel)
Laravel 10 Call/Access Controller Method from Another Controller
Published: 2023-09-17 10:37:13

If you want to access some method from another controller in laravel 10 apps, you can use the app() helper method to get the other controller instance and then call the method from the instance.

## Laravel 10 Call/Access Controller Method from Another Controller

In Laravel 10, you can call a controller method from another controller by:

- Using the app() helper method to get the other controller instance.
- Including the controller with the required method in the controller that needs to access it.
- Using the syntax (new OtherController)->method().

For example, if you have a PostController and want to get the specialPostID() method, you can use the app() helper method to get the other controller instance and then call the method from the instance.

Read More [Laravel 10 Call/Access Controller Method from Another Controller](https://www.tutsmake.com/laravel-call-controller-method-from-another-controller/)
Psychological Moonshots
Tags: psychology, strategy
Published: 2023-09-17 10:27:50

**Engineering is expensive.
And the problems we deal with are simpler.
So psychological moonshots are more practical — whether to increase sales of a product or reduce churn.
Because they are cheap.**

![Psychological Moonshots](https://fronterablog.com/wp-content/uploads/2023/06/Psychological-Moonshots.jpg)

- **Frames to Find Psychological Moonshots**
    1. Friction/effort frame
        - One of the most important metrics for streaming services is **time spent on the platform**. So Netflix engineers came up with the **auto-play idea**. It only saved a few seconds for the users to go to the next episode. But it **drastically increased watch time**.
        - Now the opposite can also work depending on your product. Sometimes you can increase sales by making it harder to buy for customers.
    2. Anxiety frame
        - A construction company realizing **most people were not buying condos** because of the anxiety of moving. When they **introduced moving services and storage facilities**, **sales (and average revenue per customer) exploded**.
    3. Uncertainty/risk frame
        - **30-day refund guarantee**, resulting in **increased sales**.
    4. Commitment frame
        - **No credit card required for free trials**.
          Less commitment = more conversions.
        - **A gym offer where they charge you a big amount at first. And refund partially if you stick with the classes.**
          Higher commitment = better results = more future sales.
    5. Joy/excitement frame
        - Double Tree **delights customers with a warm cookie** to **increase customer satisfaction**. Positive memorable moments can bring you exponential benefits with little cost.
    6. Achievement frame
        - Some health organizations **send text messages to blood donors when their blood is used by a patient**. But a person who receives that message is more likely to donate blood again.
    7. Boredom frame
        - When the skyscrapers were new in New York, people **hated the long wait times in the elevators**. The obvious solution was to make them faster. But it was expensive. And sometimes not even possible with the technology of that time. So somebody found the ingenious solution of **putting mirrors into elevators**. We all like looking at ourselves. So long wait times didn’t matter anymore.  
        - Another example can be Duolingo.
          **Learning something new is difficult.** And that triggers boredom for most people.  
          So they made language learning 90% less boring with **gamification**. And millions of people have started learning new languages.

- Sometimes you don’t even need to fix the problem, you can make it unimportant.

> Instead of trying to solve a problem with conventional logic, you reframe the problem. - (Rory Sutherland, Alchemy)

-

> It’s easier to make something 10x better than to make it 10% better. - Astro Teller (CEO, X)

Ref. [Frontera Blog](https://fronterablog.com/psychological-moonshots)
Weekly reading digest #5
Tags: php, symfony, softwareengineering, backend
Published: 2023-09-17 10:10:02

**2023/09/11-2023/09/17**

[Temporal PHP SDK 2.6.0](https://spiral.dev/blog/release-temporal-2-6-0)

[All the ways to handle null values in PHP](https://www.amitmerchant.com/all-the-ways-to-handle-null-values-in-php/)

[How to Optimize PHP Performance on Google Cloud Run](https://cavall.in/how-to-optimize-php-performance-on-google-cloud-run)

[An Internet of PHP](https://timotijhof.net/posts/2023/an-internet-of-php/)

[Singletons and how to use them](https://coderambling.com/2023/09/singletons-and-how-to-use-them/)

[Elegant Objects](https://www.elegantobjects.org/)
CSS GRADIENT WAREHOUSE! Just one click away !!!
Tags: css, webdev, javascript, programming
Published: 2023-09-17 10:04:50

Yes you heard it right !.Today while looking for css color palette, I somehow landed on this site. Very easy to use just click and you good to go. Tons of eye pleasing gradients are here. I have bookmarked it now.
Share with your UI/UX or Frontend developers.
Follow me for more!!!
[Link](https://cssgradient.io/gradient-backgrounds/)
BigBites - A React.js Food Delivery App
Tags: webdev, javascript, programming, react
Published: 2023-09-17 10:04:25

In a world increasingly reliant on digital solutions, food delivery apps have become a staple in our lives. It's not just about food; it's about convenience, choice, and the joy of exploring culinary delights without leaving the comfort of your home. This is where BigBites steps in – a project born from the fusion of technology and gastronomy.

**Tech Stack:** React.js, Parcel, Tailwind CSS

BigBites isn't your average food delivery app. It's a testament to what can be achieved with the right tech stack and a sprinkle of creativity. Here's a glimpse into the journey of creating this delightful app:

1. Swiggy API Magic: The foundation of BigBites lies in its ability to fetch restaurant data and menus seamlessly from the Swiggy API. With this data, users can explore a curated list of restaurants and menus right at their fingertips.

2. Error Handling: In the world of technology, hiccups are bound to happen. BigBites doesn't shy away from challenges; it gracefully handles errors and ensures a smooth user experience.

3. Shimmering UI: Ever seen those elegant loading animations on restaurant cards and menu lists? That's the shimmering UI in action, making sure users don't get bored while waiting for content to load.

4. Formik & Yup for User-Friendly Login: BigBites cares about user data and security. The login page is designed using Formik & Yup with a validation schema, ensuring a user-friendly and secure login experience.

5. Nested Routing: The "About" page showcases the beauty of nested routing, allowing for a seamless flow of information without overwhelming the user.

6. GitHub Integration: BigBites goes beyond food. It fetches user and repository data from GitHub and presents it on the Profile page, showcasing the versatility of this app.

7. Responsiveness and Aesthetics: BigBites takes pride in its responsive and attractive design, thanks to the artistry of Tailwind CSS. It ensures that users have a visually pleasing experience across devices.

8. Learning from the Best: BigBites is not just a project; it's a part of the "Namaste React Live Course" by Akshay Saini, a testament to the power of education and hands-on learning.

9. A Note on CORS: For those who want to explore BigBites, please ensure CORS (Cross-Origin Resource Sharing) is enabled on your browser. You can conveniently download the "Allow CORS" Chrome extension to access the FoodFire application without any hitches.

Project Repository: BigBites GitHub Repository(https://github.com/SwayamDebata/BigBites)
(https://thebigbites.netlify.app/)

BigBites is more than just a food delivery app; it's a testament to the limitless possibilities of React.js and the art of crafting seamless user experiences. It's a journey through the flavors of technology, a culinary adventure for the digital age.
JavaScript or TypeScript
Tags: javascript, typescript, beginners, programming
Published: 2023-09-17 09:25:12

**Hey guys, **

lately, I watched a video about TypeScript so my curiosity got me to search for the difference between TypeScript and JavaScript.

Many sources talk about JavaScript and TypeScript looks very similar, but there's one crucial distinction.

The key difference between JavaScript and TypeScript is that JavaScript lacks a type system. In JavaScript, variables can haphazardly change the form, while TypeScript in strict mode forbids this.

For example, Variables in JavaScript

```
let x = 1
let y = "text"
y = 123  // allowed in JavaScript
```

Variables in TypeScript

```
let x: number = 1
let y: string = "text"
y = 123 // not allowed in TypeScript
```
The difference in syntax is minor.

**Difference between TypeScript and JavaScript**
- TypeScript is known as an Object-oriented programming language whereas JavaScript is a prototype-based language.

-TypeScript has a feature known as Static typing but JavaScript does not support this feature.

-TypeScript supports Interfaces but JavaScript does not.

**Advantages of using TypeScript over JavaScript**

-TypeScript always points out the compilation errors at the time of development (pre-compilation). Because of this getting runtime errors is less likely, whereas JavaScript is an interpreted language.

-TypeScript supports static/strong typing. This means that type correctness can be checked at compile time. This feature is not available in JavaScript.

-TypeScript is nothing but JavaScript and some additional features i.e. ES6 features. It may not be supported in your target browser but the TypeScript compiler can compile the .ts files into ES3, ES4, and ES5 also.

**Disadvantages of using TypeScript over JavaScript**

 Generally, TypeScript takes time to compile the code.

So let's share our knowledge and tell me what you learned today.

Here are my social links if you would like to follow.
Github: https://github.com/EsraaNasr92/
Twitter / X: https://twitter.com/Esraa_nasr92
Instgram: https://www.instagram.com/_esraaanasr/
Complete chess in Python pygame with AI MINIMAX (OVERVIEW) with code in description
Tags: python, programming, coding, chess
Published: 2023-09-17 09:19:51

I've recently shared a Python Pygame project where I implement the minimax AI algorithm in a chess game. If you're curious to see, watch the video here! -> https://www.youtube.com/watch?v=hRYvooN-4Bo&t=20s