Rocio  O'Keefe

Rocio O'Keefe

1661511389

Tecfy_basic_package: Tecfy Core for Mobile Client Projects

tecfy_basic_package

Tecfy Core For Mobile Client Projects

This package for internal use, you're free to use it at your own risk!

Supporting Platform:

  • Android
  • iOS
  • Windows
  • Web

Interfaces/ abstract class:

  • Base Controller
  • Base Model

Services:

  • API Service
  • Config Server
  • ImageService
  • Notification Service
  • Theme Service

Componenet:

  • Button with loading animation
  • Checkbox
  • Multi-Select Dropdown
  • Network Image
  • Search Box
  • Text Feild
  • Text Label

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add tecfy_basic_package

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  tecfy_basic_package: ^1.1.11

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:tecfy_basic_package/tecfy_basic_package.dart';

example/lib/main.dart

import 'package:example/employee/employee.page.dart';
import 'package:flutter/material.dart';
import 'package:tecfy_basic_package/tecfy_basic_package.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'My Application',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'My Application'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String? title;
  MyHomePage({Key? key, this.title}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title ?? "Default"),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            AppButtonIconText(
              icon: Icon(Icons.add),
              label: 'Employess Page',
              onPressed: () async {
                AppNavigator.navigateTo(context, () => EmployeePage());
              },
            )
          ],
        ),
      ),
    );
  }
}

Original article source at: https://pub.dev/packages/tecfy_basic_package 

#flutter #dart #basic 

Tecfy_basic_package: Tecfy Core for Mobile Client Projects
Josefa  Corwin

Josefa Corwin

1659617640

Textacular Exposes Full Text Search Capabilities From PostgreSQL

textacular  

DESCRIPTION:

Textacular exposes full text search capabilities from PostgreSQL, extending ActiveRecord with scopes making search easy and fun!

FEATURES/PROBLEMS:

  • Only works with PostgreSQL
  • Anything that mucks with the SELECT statement (notably pluck), is likely to cause problems.

SYNOPSIS:

Quick Start

In the project's Gemfile add

gem 'textacular', '~> 5.0'

Rails 3, Rails 4

In the project's Gemfile add

gem 'textacular', '~> 4.0'

ActiveRecord outside of Rails

require 'textacular'

ActiveRecord::Base.extend(Textacular)

Usage

Your models now have access to search methods:

The #basic_search method is what you might expect: it looks literally for what you send to it, doing nothing fancy with the input:

Game.basic_search('Sonic') # will search through the model's :string columns
Game.basic_search(title: 'Mario', system: 'Nintendo')

The #advanced_search method lets you use Postgres's search syntax like '|', '&' and '!' ('or', 'and', and 'not') as well as some other craziness. The ideal use for advanced_search is to take a search DSL you make up for your users and translate it to PG's syntax. If for some reason you want to put user input directly into an advanced search, you should be sure to catch exceptions from syntax errors. Check [the Postgres docs] (http://www.postgresql.org/docs/9.2/static/datatype-textsearch.html) for more:

Game.advanced_search(title: 'Street|Fantasy')
Game.advanced_search(system: '!PS2')

The #web_search method lets you use Postgres' 11+ websearch_to_tsquery function supporting websearch like syntax:

  • unquoted text: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.
  • "quoted text": text inside quote marks will be converted to terms separated by <-> operators, as if processed by phraseto_tsquery.
  • OR: logical or will be converted to the | operator.
  • -: the logical not operator, converted to the the ! operator.
Game.web_search(title: '"Street Fantasy"')
Game.web_search(title: 'Street OR Fantasy')
Game.web_search(system: '-PS2')

Finally, the #fuzzy_search method lets you use Postgres's trigram search functionality.

In order to use this, you'll need to make sure your database has the pg_trgm module installed. Create and run a migration to install the module:

rake textacular:create_trigram_migration
rake db:migrate

Once that's installed, you can use it like this:

Comic.fuzzy_search(title: 'Questio') # matches Questionable Content

Note that fuzzy searches are subject to a similarity threshold imposed by the pg_trgm module. The default is 0.3, meaning that at least 30% of the total string must match your search content. For example:

Comic.fuzzy_search(title: 'Pearls') # matches Pearls Before Swine
Comic.fuzzy_search(title: 'Pear') # does not match Pearls Before Swine

The similarity threshold is hardcoded in PostgreSQL and can be modified on a per-connection basis, for example:

ActiveRecord::Base.connection.execute("SELECT set_limit(0.9);")

For more info, view the pg_trgm documentation, specifically F.35.2. Functions and Operators.

Searches are also chainable:

Game.fuzzy_search(title: 'tree').basic_search(system: 'SNES')

If you want to search on two or more fields with the OR operator use a hash for the conditions and pass false as the second parameter:

Game.basic_search({name: 'Mario', nickname: 'Mario'}, false)

Setting Language

To set proper searching dictionary just override class method on your model:

def self.searchable_language
  'russian'
end

And all your queries would go right! And don`t forget to change the migration for indexes, like shown below.

Setting Searchable Columns

To change the default behavior of searching all text and string columns, override the searchable_columns class method on your model:

def self.searchable_columns
  [:column1, :column2]
end

Creating Indexes for Super Speed

You can have Postgresql use an index for the full-text search. To declare a full-text index, in a migration add code like the following:

For basic_search

add_index :email_logs, %{to_tsvector('english', subject)}, using: :gin
add_index :email_logs, %{to_tsvector('english', email_address)}, using: :gin

For fuzzy_search

add_index :email_logs, :subject, using: :gist, opclass: :gist_trgm_ops
add_index :email_logs, :email_address, using: :gist, opclass: :gist_trgm_ops

In the above example, the table email_logs has two text columns that we search against, subject and email_address. You will need to add an index for every text/string column you query against, or else Postgresql will revert to a full table scan instead of using the indexes.

REQUIREMENTS:

  • ActiveRecord
  • Ruby 1.9.2

INSTALL:

$ gem install textacular

Contributing

If you'd like to contribute, please see the contribution guidelines.

Releasing

Maintainers: Please make sure to follow the release steps when it's time to cut a new release.

Further documentation available at http://textacular.github.com/textacular.

LICENSE:

(The MIT License)

Copyright (c) 2011 Aaron Patterson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Author: textacular
Source code: https://github.com/textacular/textacular

#ruby #postgresql 

Textacular Exposes Full Text Search Capabilities From PostgreSQL

Jarvis In One Video - Basic Series | How To Make Jarvis In Python| Jarvis Python

Jarvis In One Video - Basic Series | How To Make Jarvis In Python| Jarvis Python| How To Make Jarvis

#jarvis python #python #jarvis in python #jarvis #basic

Jarvis In One Video - Basic Series | How To Make Jarvis In Python| Jarvis Python
Alisha  Larkin

Alisha Larkin

1624689723

Basic HTML file

<!DOCTYPE html>
<! — change the language if needed set to English→
<html lang=”en”>
<head>
<! — any meta data you need →
<meta/>
<title>Sample HTML</title>
<! — link style sheets or style packages →
<link />
</head>
<body>
<! — this script tag is set to defer or run after page lodes→
<script defer></script>
<div id=”root”>
</div>
</body>
<footer>
<p>copyright ©</p>
</footer>
</html>

#code #html #development #basic #basic html

     Basic HTML file
Nabunya  Jane

Nabunya Jane

1621026480

10 Basic VSCode Shortcuts You Should Know

Hello everyone, if you are a beginner and use VSCode then this is the video for you. I have shown some basic shortcuts which you should know.

Blog Post: https://www.mrabouttech.com/2020/10/1…

Timestamps:

00:18 1. Create a New File

00:37 2. Close a File

01:10 3. Create New Window

01:24 4. Close a Window

02:08 5. Toggle Sidebar

02:37 6. Toggle Terminal

03:18 7. Command Palette

03:57 8. Find a File

04:55 9. Open Setting

05:26 10. Keyboard Shortcuts List

#vscode #basic

10 Basic VSCode Shortcuts You Should Know
Mikel  Okuneva

Mikel Okuneva

1603144800

Your First Programming Language

Almost a year ago I have started a topic on LinkedIn where I asked how old were you when you wrote your first program and what was the programming language. This post collected a lot of feedback (more that 170 comments) and had a lot of views (36k+) and finally (“one year later” meme here…) I got a time to put all the answers together and made some charts.

Disclaimer: This poll and statistic is not representative and only reflect small portion of my LinkedIn network.

Your First Programming Language

The majority started their exiting journey to the world of programming with Basic. In this statistic, I have combined all variations of BASIC (QBasic, Visual Basic, Sinclair Basic, Casio Basic, MSX Basic ) under the single category.

First Programming LanguageThe second one is Pascal, which was quite popular in post-soviet countries, we were studying it at school and at university. I think this is the reason it was the first programming language for many people.

I was really surprised I didn’t see python so much (only one answer), since now it’s considered the best language to start learning programming (at least if you google “What is the best programming language to learn first”).

The same counts for JS, only one person wrote his first program in JavaScript.

I think this is because LinkedIn is not so popular among younger generation (you can see later that a lot of people wrote their first program on ZX Spectrum or Commodore) so this group is underrepresented in this poll.

#my projects #statistic #php #basic #pascal #cobol #story #poll

Your First Programming Language