Kayıtlar

Strapi Create New Locale with EntityService

You can create with default id in array like below: const translated = await translate ( json . value ,                                                             { from : 'en' , to : 'iw' }); const res = await strapi . entityService                     . create ( "api::general-translation.general-translation" ,{ data : { localizations :[ defaultID ], key : json . key , value : translated . text , locale : 'he' }, populate :{ localizations : true } }) You must add localizations true parameter in populate and also 

Rake Migration Error

Resim
That's error like that. rails aborted ! StandardError: An error has occurred, this and all later migrations canceled: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: class CreateFriendlyIdSlugs < ActiveRecord::Migration[4.2]  That problem due to rails version. So all you need to do, enter db>migrate folder and opened YOURDATE_create_friendly_id_slugs.rb file. Then add extend class name [5.1].       class CreateFriendlyIdSlugs < ActiveRecord :: Migration [ 5.1 ] def change create_table :friendly_id_slugs do | t | t . string :slug , :null => false t . integer :sluggable_id , :null => false t . string :sluggable_type , :limit => 50 t . string :scope t .datetime :created_at end add_index :friendly_id_slugs , :sluggable_id add_index :

Developers needs more lightweight option like Fleet

 Intellij infrastructure platforms, such as Android Studio and Pycharm, use more ram than necessary, which complicates the development environment. This is why vscode has become popular among developers. However, older developers continue to use vim because it is a simpler platform that requires less ram. If you're a professional developer, chances are you've heard of IntelliJ IDEA. It's a popular Integrated Development Environment (IDE) used by many developers, especially those working on Java-based projects. However, one downside of IntelliJ IDEA is that it can use more RAM than necessary, which can complicate the development environment. This is why Visual Studio Code (VS Code) has become popular in recent years - it's much lighter and doesn't require as much resources. However, some older developers still prefer to use Vim as their primary IDE. It will be due to this that in a similar way, Intellij introduced the Fleet application. Really nice design.

Faster framework for mobile apps

 Flutter is a kind of new, open-source, mobile software development kit created by Google. It allows developers to create high-quality native apps for both iOS and Android with a single codebase. Flutter is fast because it uses the Dart programming language which has been designed specifically for high-performance applications. Additionally, Flutter's hot reload feature allows you to quickly and easily test your changes without having to restart the app or recompile the code. Overall, Flutter provides an excellent way for programmers to create beautiful and fast mobile apps with less effort than traditional methods. I highly recommend giving it a try! If you're looking for a faster software programming language for mobile apps, Flutter is a great option. This open source platform was created by Google and offers cross-platform support for both iOS and Android devices. In addition, Flutter provides developers with a wide range of tools and plugins to help them create high-qualit

Google Apps Script Custom Catch Function

 function catch(arguments,exception){     console.log(arguments.callee.name+":", "Error report",       "\r\nMessage: " + exception.message       + "\r\nFile: " + exception.fileName       + "\r\nLine: " + exception.lineNumber); }

Changing months language in PHP

In the php we are able to automatically print months with strftime function. In these cases, it is necessary to edit the locale to be able to print the months in Turkish or any language. This is not just for months, but for a lot of functions. It will be sufficient to put the following code at the beginning of your project to translate the predetermined functions. setlocale (LC_ALL, 'tr_TR.UTF-8'); You may encounter this with a lot of ready-to-go scriptions. You change 'tr_TR' section on the above line. This one-line solution will bring you to the conclusion.

Use href in HTML instead of link_to [Rails]

If you want to use href in HTML instead of link to. It's equivalent link_to in Rails. And if you want to use method you must use data-method in a tag. Reference:  http://blog.umutbey.com/en/equivalent-link_to-in-html