Web Technology

Web technology refers to the means by which computers communicate with each other using markup languages and multimedia packages. It gives us a way to interact with globally all over the world, like websites. Web technology involves the use of hypertext markup language (HTML) and cascading style sheets (CSS) and various types of scripting languages (such as - PHP, JAVA, C# etc). Web Technology includes: 1) Internet 2) HTML (markup language) 3) Scripting Languages such as java, php, javascript, C#, node.js, python, ruby etc. 4) Web Building

Subjects

Latest Asked Question

A : hello here is your solution, <?php function distance_bt_two_points($latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo) { $longitude1 = deg2rad($longitudeFrom); $longitude2 = deg2rad($longitudeTo); $latitude1 = deg2rad($latitudeFrom); $latitude2 = deg2rad($latitudeTo); //Haversine Formula $dlong = $longitude2 - $longitude1; $dlati = $latitude2 - $latitude1; $val = pow(sin($dlati/2),2)+cos($lat1)*cos($lat2)*pow(sin($dlong/2),2); $res = 2 * asin(sqrt($val)); $radius = 3958.756; return ($res*$radius); } $latitudeFrom = 19.017656 ; //mumbai $longitudeFrom = 72.856178; //mumbai $latitudeTo = 28.615338; //delhi $longitudeTo = 77.193474; //delhi // Distance between Mumbai and Delhi echo(distance_bt_two_points( $latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo)." "."miles"); ?> OUTPUT : 717.3753011057 miles
45 Likes
A : this your solution use indexOf() and array.splice() method in javascript.  var array = [2, 5, 9]; console.log(array); var index = array.indexOf(5); if (index > -1) {   array.splice(index, 1); } // array = [2, 9] alert(array);
45 Likes
A : You can solve your query using reduce() method in javascript Use the JavaScript reduce() Method var array1 = [95, 782, 523, 474]; var array2 = [55, 12, 50]; // Getting sum of numbers of aray1. var sum1 = array. reduce(function(a, b){ return a + b; }, 0); // Getting sum of numbers of aray2. var sum2 = array2. reduce(function(a, b){ return a + b; }, 0); console. log(sum1 + sum2); // Prints: 1991.
45 Likes
A : hi you can try var x = [{"hello":"1", "hello2":"456"}]; var y = [{"hi1":"852", "hi2":"9632", "hi3":"75391}]; Array.prototype.push.apply(x,y); console.log(x); //x will print combined array; workable and tested.
45 Likes
A : I follow these steps to create animation in angular. Enabling the animations module by importing    import { BrowserAnimationsModule } from '@angular/platform-browser/animations'   in your app.module.ts file next you need to create animation.ts file and write below code . import {   animate,   query,   style,   transition,   trigger,   group, } from '@angular/animations';   export function routerAnimation() {   return trigger('routerAnimation', [     // One time initial load. Move page from left -100% to 0%     transition('-1 => *', [       query(':enter', [         style({           position: 'fixed',           width: '100%',           transform: 'translateX(-100%)',         }),         animate(           '500ms ease',           style({             opacity: 1,             transform: 'translateX(0%)',           }),         ),       ]),     ]),       // Previous, slide left to right to show left page     transition(':decrement', [       // set new page X location to be -100%       query(         ':enter',         style({           position: 'fixed',           width: '100%',           transform: 'translateX(-100%)',         }),       ),         group([         // slide existing page from 0% to 100% to the right         query(           ':leave',           animate(             '500ms ease',             style({               position: 'fixed',               width: '100%',               transform: 'translateX(100%)',             }),           ),         ),         // slide new page from -100% to 0% to the right         query(           ':enter',           animate(             '500ms ease',             style({               opacity: 1,               transform: 'translateX(0%)',             }),           ),         ),       ]),     ]),       // Next, slide right to left to show right page     transition(':increment', [       // set new page X location to be 100%       query(         ':enter',         style({           position: 'fixed',           width: '100%',           transform: 'translateX(100%)',         }),       ),         group([         // slide existing page from 0% to -100% to the left         query(           ':leave',           animate(             '500ms ease',             style({               position: 'fixed',               width: '100%',               transform: 'translateX(-100%)',             }),           ),         ),         // slide new page from 100% to 0% to the left         query(           ':enter',           animate(             '500ms ease',             style({               opacity: 1,               transform: 'translateX(0%)',             }),           ),         ),       ]),     ]),   ]); } next in your app-routing.module.ts file,write below code where routes define , { path: 'abc', component: AbcComponent, data: { num: 1 } } { path: 'test', component: TestComponent, data: { num: 2 } } next in your app.component.ts file you need to write below code, import { routerAnimation } from './common/animations'; import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router';   @Component({   selector: 'app-root',   templateUrl: './app.component.html',   styleUrls: ['./app.component.scss'],   animations: [routerAnimation()], }) export class AppComponent {   constructor() {}     public getRouteAnimation(outlet: RouterOutlet) {     const res =       outlet.activatedRouteData.num === undefined         ? -1         : outlet.activatedRouteData.num;       return res;   } } next in app.component.html file you need to write below code, <div class="navbar">   <a [routerLink]="['abc']">Abc</a><xmp>   <a [routerLink]="['test']">Test</a><xmp>    </div>   <div class="content" [@routerAnimation]="getRouteAnimation(router)">   <router-outlet #router="outlet"></router-outlet> </div> follow all of the above steps to make animation in your angular projects.  
45 Likes
A : Hi, You can try this code, it is working Fine in my project. In Template file you can  write below code after constructor. originalOrder = (a: KeyValue<number,string>, b: KeyValue<number,string>): number => {       return 0; And in html component file you can write below code. write this code in ngfor pipe keyvalue. <select class="form-control"  id="test" [(ngModel)]="testing">         <option> --Select category--</option>           <option   *ngFor="let categoryList of categoryLists | keyvalue: originalOrder"   value="{{categoryList.key}}">{{categoryList.key}}</option>                            </select>  
45 Likes
A : hello; Answer: Use the jQuery attr() method for example: $('div2[data-id="230"]').addClass('error'); $('div2[data-id="230"]').append('<div id="450" class="success">Added</div>'); $('div2[data-id="230"]').removeAttr('data-id'); hope its use full to you
45 Likes
A : <?php $valid_passwords = array ("mario" => "carbonell"); $valid_users = array_keys($valid_passwords); $user = $_SERVER['PHP_AUTH_USER']; $pass = $_SERVER['PHP_AUTH_PW']; $validated = (in_array($user, $valid_users)) && ($pass == $valid_passwords[$user]); if (!$validated) {   header('WWW-Authenticate: Basic realm="My Realm"');   header('HTTP/1.0 401 Unauthorized');   die ("Not authorized"); } // If arrives here, is a valid user. echo "<xmp>Welcome $user."; echo "<xmp>Congratulation, you are into the system."; ?>
45 Likes
A : hey I was facing the same problem in Laravel 5.4 I found that adding the save method solved the problem. So you can use it I hope it help; Session::put('key', $value); Session::save();
45 Likes
A : Hi Firstly install zip and unzip on Linux * sudo apt install zip unzip * zip -r demofile.zip /var/www/html/demofile.text Here -r is options demofile.zip set name of your zip file then set path of file/folder want to zip.  
45 Likes
A : hi use this { path: "user", //use full path loadChildren: () => import("app/modules/user/user.module").then(m => m.UserModule) } allow full path // Full path including `src` at the start: loadChildren: "src/app/customers/customers.module#CustomersModule"
45 Likes
A : hi you can use these line of code NgxJsonLdModule.forRoot(); //no need to call forRoot function; @NgModule({ declarations: [AppComponent], imports: [ AppRoutingModule, NgtUniversalModule, NgxJsonLdModule ], providers: [] }) export class AppModule {}
45 Likes
A : this.imageFileArray.push((reader.result as string).split(",")[1]); this.imageFileArray.push((<string>reader.result).split(",")[1]);
45 Likes
A : Hi you can use this. document.querySelector('#click').click();TV Tested.
45 Likes
A : hi friend use these line of code; RewriteCond %{HTTP_HOST} ^2\.2\.2\.2 RewriteRule (.*) http://example.com/$1 [R=301,L] Replace 2\.2\.2\.2 with your IPV4 ipaddress Replace http://example.com with your domain where you want to redirect; thanks
45 Likes
A : hi use following command in linux; sudo yum install php70-mbstring.x86_64 php70-zip.x86_64 -y then restart httpd sudo service httpd restart  
45 Likes
A : hi  use this command in putty or terminal on aws sudo yum install -y httpd24 php70 mysql56-server php70-mysqlnd httpd24 only when httpd is not install; then run; sudo service mysqld start
45 Likes
Web Technology Related Topic's