21 October, 2020

Why cannot change date format in Excel

 To resolve this problem, please follow us below


1. Select on Cell that we want to change date format



2. Click on Data menu above



3. Click on Text to Columns and then click on button Next 



4. Uncheck on Tab and then check on Space then click on button Next



5. Untick on General and Tick on Date then finally click on button Finish



Finally you can change date format successfully, congratulation!



The result



=================== Finished =====================












19 October, 2020

How to remove protected view in excel

 How to remove protected view in excel

1. Click on File on the above left





2. Click on Option




3. Trust Center > Trust Center Settings > Protected View

- Click on Trust Center



- Click on Trust Center Settings



- Click on Protect View and unclick on these

 1. Enabel Protected View for files origination from the Internet
 2. Enable Protected View for files located in potentially unsafe locations
 3. Enable Protected View for Outlook attachments



- Finally click OK  and open your file Excel again, so Protect View alert will disappear. Thanks!













26 May, 2020

Inserting data into a temporary table SQL Server

1. You can specific the columns to insert into
INSERT INTO #TempTable (ID, Date, Name) 
SELECT id, date, name 
FROM physical_table
2.You can insert all columns from another table in to Temporary table
SELECT * INTO #TempTable FROM table

25 May, 2020

How to create TEMPORARY TABLE in SQL Server


1. The syntax to create a LOCAL TEMPORARY TABLE in SQL Server is:
               

       CREATE TABLE #table_name
      ( 
        column1 datatype [ NULL | NOT NULL ],
        column2 datatype [ NULL | NOT NULL ],
        ...
      );

Not: The name of LOCAL TEMPORARY TABLES are prefixed with the # character 
         (Ex. #Customer)

For Example 

      CREATE TABLE #Customer
      ( 
          cus_id INT PRIMARY KEY,
          first_name VARCHAR(20) NULL,
          last_name VARCHAR(20) NOT NULL
       );


Note: The #Customer table is stored in tempdb and SQL Server will automatically delete this table when the SQL Server session no longer requires it.

14 June, 2019

How to use Seeder in Laravel

We use Seeder to set static data for inserting into database

#Seeder name : UsersTableSeeder

#Command : php artisan make:seeder UsersTableSeeder

#Note: All seeders generated by the framework will be placed in the database/seeds directory


21 May, 2019

How to draw a Circle without a Fill in Photoshop

The Step-By-Step to draw a Circle without a Fill


STEP ONE- Add A New Layer.

1. Start by adding a new Layer to put the circle on.
To do that go to the Layers panel and click on the Create a New Layer icon.






























2. That adds a new blank Layer above the Background Layer that we can put our circle on.




STEP TWO- Draw A Circular Selection.

Use the Elliptical Marquee tool to make a Selection around your subject by clicking-and-dragging diagonally as you hold down the Shift key.
Holding down the Shift key will constrain your Selection to a perfect circle.




STEP THREE- Add A Stroke Around Your Selection.

Now all we have left to do is to add a stroke to our Selection.
Go up to the Edit menu and choose Stroke (Outline) Selection... by clicking on it.

























The Stroke dialog box will appear.
In the top section of the dialog box choose the Width and Color for your stroke.
From the middle section of the dialog box choose the location of your stroke relative to your Selection line.
In most situations the location wont matter much on a round Selection. However if you have a square Selection you want to choose "inside" as the location to get nice square corners.
For our lesson we wont make any changes to the bottom section (labeled Blending) of the dialog box.
Next click OK to close the dialog box and accept the changes.






















And that's all there is to it, just three easy steps!
Here's a look at the final result as below!


28 May, 2018

Useful commands that we need to write daily

- To rename file or directory 
 * keyword mv old-file/folder new-file/folder

- To delete file or directory
 * keyword rm old-file/folder new-file/folder

========= For nano editer block ===================
- To leave from nano editor
* keyword ctr + x

- To cut text in nano editor
 * keyword ctr + k

- To copy in nano editor
 * keyword ctr + c

- To past in nano editor
 * keyword ctr + u

- To Search in nano editor
 * keyword ctr + w

========= End for nano editer block ==================


========= For vi or vim editer block =================

- To select text in vim or vi editor
 * keyword v

- To Copy in vim or vi editor
 * keyword y

- To Cut in vim or vi editor
 * keyword d

- To Paste in vim or vi editor
 * keyword p or P

- To leave from vim or vi
 * keyword esc and then :wq! ( quit and write)

========= End for vi or vim editer block ===============

*Gedit it will prompt (very easy)

========= For changing directory block =================

-Changing Directories

* cd changes directories

-To an absolute or relative path:
* cd /home/joshua/work
* cd project/docs

-To a directory one level up:
* cd ..

-To your home directory:
* cd

-To your previous working directory:
* cd -- 

========= End for changing directory block =================


========= For list file or directory block =================

+Lists the contents of the current directory or a specified directory

- ls [options] [files_or_dirs]

- ls -a (include hidden files)

- ls -l (display extra information)

- ls -R (recurse through directories)

- ls -ld (directory and symlink informa

========= End for list file and directory block =================

========= For copy file or directory block =================

+Copying Files and Directories

- cp is to copy files and directories (syntax)

- cp [options] file destinatio (one file)

- cp [options] file1 file2 destination ( more than one files)

*Ex. cp huor/file3 huor/file4 test_copy/

*Note : If the destination is a directory, the copy is placed there

If the destination is a file, the copy overwrites the destination

If the destination does not exist, the copy is renamed

========= End for copy file and directory block =================

========= For Move file and directory block =================

+Moving and Renaming Files and Directories

- mv is to move and/or rename files and (Syntax)

- mv [options] file destinatio (one file)

- mv [options] file1 file2 destinati (more than one file)

- Destination works like cp

========= End for copy file and directory block =================

========= For creating and removing file block =================

+Creating and Removing Files

- keyword touch is to create empty files

- keyword rm is to remove files

- keyword rm -i file (interactive)

- keyword rm -r directory (recursive)

- keyword rm -f file (force)

========= End for creating and removing file block =================

========= For Creating and Removing Directories block =================

+Creating and Removing Directories

- mkdir creates directories

- rmdir removes empty directories

- rm -r recursively removes directory trees

========= End for Creating and Removing Directories block =================


========= For Changing File Ownership block =================

+Changing File Ownership

 *Note : Only root can change a file's owner

 *Note : Only root or the owner can change a file's group

- Ownership is changed with chown:

- chown [-R] user_name file|directory

+Group-Ownership is changed with chgrp:

 chgrp [-R] group_name file|direct

========= End for Changing File Ownership block =================


========= for Changing Permissions - Symbolic Method block =================

+To change access modes:

- chmod [-R] mode file

* Where mode is:

*Note : u,g or o for user, group and other

*Note : + or - for grant or deny

*Note : r, w or x for read, write and execute

Examples:
ugo+r: Grant read access to all

o-wx: Deny write and execute to o

========= End for Changing Permissions - Symbolic Method block =================


========= for Changing Permissions - Numeric Method block =================
+ Changing Permissions - Numeric Method

*Note : Uses a three-digit mode number

*Note : first digit specifies owner's permissions

*Note : second digit specifies group permissions

*Note : third digit represents others' permissions

Permissions are calculated by adding:

4 (for read)

2 (for write)

1 (for execute)

========= End for Changing Permissions - Numeric Method block =================

18 May, 2018

Error : parameter must be an array or an object that implements countable in laravel

Solution :
add in Builder.php file at line 1231
protected function callScope(callable $scope, $parameters = [])
    {
        array_unshift($parameters, $this);

        $query = $this->getQuery();

        // We will keep track of how many wheres are on the query before running the
        // scope so that we can properly group the added scope constraints in the
        // query as their own isolated nested where statement and avoid issues.
        $originalWhereCount = is_null($query->wheres)
                    ? 0 : count($query->wheres);

        $result = $scope(...array_values($parameters)) ?? $this;

        if (count((array) $query->wheres) > $originalWhereCount) {
            $this->addNewWheresWithinGroup($query, $originalWhereCount);
        }

        return $result;
    }