text:
Q: Laravel Second registration form I'm working on laravel 5.4 i have 3 type of users and all of them working perfectly, 1 of them of course is admin and the 2 other is users and companies, users are using auth default login nd register form and there is no issue on that, what my issue is for companies to register i need a new form I made a blade for companies registration form and register controller for them in app/http/auth folder now form will loading and when I try to save the form it returns me this error:
FatalThrowableError in CompanyRegisterController.php line 54: Type error: Too few arguments to function App\Http\Controllers\Auth\CompanyRegisterController::create(), 0 passed and exactly 1 expected

My line 54 is:
protected function create(array $data)

this is my complete companyregistercontroller:
<?php

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;

class CompanyRegisterController extends Controller
{

  /**
   * Where to redirect users after registration.
   *
   * @var string
   */
  protected $redirectTo = 'companies';

  public function __construct() {
    $this->middleware('guest:company');
  }

  protected function index()
  {
    return view('auth.company-register');
  }
    /**
     * Get a validator for an incoming registration request.
     *
     * @param  array  $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
    protected function validator(array $data)
    {
        return Validator::make($data, [
            'company_name' => 'required|string|max:255',
            'manager_name' => 'required|string|max:255',
            'address' => 'required|string|max:255',
            'username' => 'required',
            'email' => 'required|string|email|max:255|unique:users',
            'about' => 'sometimes|min:10|max:2000',
            'password' => 'required|string|min:6|confirmed',
        ]);
    }

    /**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return User
     */
    protected function create(array $data)
    {
        return Company::create([
            'company_name' => $data['company_name'],
            'manager_name' => $data['manager_name'],
            'address' => $data['address'],
            'username' => $data['username'],
            'about' => $data['about'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
        ]);
    }
}

UPDATE
My view codes
@extends('layouts.app')

@section('content')

Companies Register form  Company register

                    <form class="form-horizontal" role="form" method="POST" action="{{ route('company.register.submit') }}">
                        {{ csrf_field() }}

has('company_name') ? ' has-error' : '' }}">
                                 Company Name

                                    <input id="company_name" type="text" class="form-control" name="company_name" value="{{ old('company_name') }}" required autofocus>

                                    @if ($errors->has('company_name'))

                                            {{ $errors->first('company_name') }}

                                    @endif

has('manager_name') ? ' has-error' : '' }}">
                                 Manager Name

                                    <input id="manager_name" type="text" class="form-control" name="manager_name" value="{{ old('manager_name') }}" required autofocus>

                                    @if ($errors->has('manager_name'))

                                            {{ $errors->first('manager_name') }}

                                    @endif

has('address') ? ' has-error' : '' }}">
                                 Address

                                    <input id="address" type="text" class="form-control" name="address" value="{{ old('address') }}" required autofocus>

                                    @if ($errors->has('address'))

                                            {{ $errors->first('address') }}

                                    @endif

has('email') ? ' has-error' : '' }}">
                                 E-Mail Address

                                    <input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>

                                    @if ($errors->has('email'))

                                            {{ $errors->first('email') }}

                                    @endif

has('username') ? ' has-error' : '' }}">
                             username

                                <input id="username" type="text" class="form-control" name="username" value="{{ old('username') }}" autofocus>

                                @if ($errors->has('username'))

                                        {{ $errors->first('username') }}

                                @endif

has('about') ? ' has-error' : '' }}">
                             about

                                <input id="about" type="textarea" class="form-control" name="about" value="{{ old('about') }}" autofocus>

                                @if ($errors->has('about'))

                                        {{ $errors->first('about') }}

                                @endif

has('password') ? ' has-error' : '' }}">
                             Password

                                <input id="password" type="password" class="form-control" name="password" required>

                                @if ($errors->has('password'))

                                        {{ $errors->first('password') }}

                                @endif

                             Confirm Password

                                <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>

                                <button type="submit" class="btn btn-success btn-bg btn-block">
                                     Register
                                </button>

                    </form>

@endsection

Any idea why this doesn't work?


text:
Q: How do I combine a link and image in ruby and rails using gem gravatar I have a separate link and image

<%= link_to "Log Out", destroy_user_session_path %>

<%= image_tag current_user.gravatar_url, style: "max-width: 100%;height:50px;display:inline-block;border-radius:75%;"%>

and I would like to combine them to one image link.

A: If you want to combine both "Log Out" text and image as a single link, then you can write your code in this format:

  <%= link_to destroy_user_session_path do %>
    "Log Out"
    <%= image_tag current_user.gravatar_url, style: "max-width: 100%;height:50px;display:inline-block;border-radius:75%;"%>
  <% end %>

redpajama_set_name: RedPajamaStackExchange


text:
Q: regular expression for excluding IPs out of range I am using google analytics and have a filter for one of the websites to exclude traffic that is not within an IP range, but I am creating a new profile, to track all that traffic within that IP range. This will allow me two different profiles, one to view all traffic that is on campus, and another to view all traffic excluding campus-traffic.
The regular expression for the on-campus IP range is
^192\.245\.((2[5-8])\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))|29\.0)$

Would I just add ! to it, to set it as NOT in IP range, setting it to exclude all traffic that is outside this IP range, since I set it to NOT '!' in front of the IP range.
!^192\.245\.((2[5-8])\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))|29\.0)$

The IP range is:
192.245.25.0 to 192.245.29.9
http://cl.ly/24376b03f80dfbf06d96
To sum it up, I want to have a profile that only tracks traffic within that IP range.

A: Why not change the setting in the dialog to 'Include'?
The help documentation is very clear about what the meaning of the Include and Exclude filters.
See: http://www.google.com/support/analytics/bin/answer.py?answer=55559


text:
Q: How to find the zeros of $z^{3} - iz^2 - z + i$ I know that the function  $z^{3} - iz^2 - z + i$ has zeros at $z = -1$ and $z = 1$. How do I calculate all its zeros in the form $a + bi$?

A: Hint: $$= z^2(z-i)-(z-i) = ...$$

A: The three zeros are:
$$z_1= -1 = -1 + 0i, \, z_2= 1 = 1 + 0i,\,  z_3 =-i = 0+ (-1) i$$
as the product $z_1 z_2 z_3$ is equal to $-i$.


text:
Q: how to make download link in yii? I want to make a download link for files stored in my webapp directory, so when the user click a link the file should be downloaded, here is my code:
 $src= Yii::app()->request->baseUrl;
 $url2 = $src."/CVs/resumes/".$m->idJob."-".$m->cv;
 $url = Yii::app()->getRequest()->sendFile( $m->cv , file_get_contents( $url2 ) );
 echo"
".
 CHtml::link($m->fullName, array('submit'=>$url))."
";

I got an error that there is no such file or directory, where is the wrong?

A: Try removing the third line and changing the last line to CHtml::link($m->fullName, $url2)."
";
Please, let me know if it works.


text:
Q: Changing the line width/weight in Leafletr addPolylines function depending on an attribute I would like to display flow lines (OD-lines) using leaflet in Shiny and sofar I can successfully map all the lines I want. But I also want to change the line width so that each line will have a different linewidth depending on the attribute they have. I am trying to get the values for weight with the following code but it does not work:
  values <- reactive({
    test[quel==input$zelle&hr==input$std&vmitt==input$vmitt&tag==input$tag]
  })

  observe({
    anzhl <-isolate(values()[,10])
    print(anzhl[1]*2)
    str(anzhl)

    leafletProxy("zones", data = values()) %>%
    removeShape(layerId="liID") %>%
    addPolylines(lng=~x_coor, lat=~y_coor, stroke=TRUE, layerId="liID", color="black", weight=sum(anzhl())/100)})

I get the following error message:
Warning: Error in observerFunc: could not find function "anzhl"
Stack trace (innermost first):
    56: observerFunc [E:\.../server.R#118]
     1: runApp
ERROR: [on_request_read] connection reset by peer

What am I doing wrong and is it ever possible to change the line widths with the values called within an interactive session.

A: Read the error:
 Warning: Error in observerFunc: could not find function "anzhl"

then look at where your code mentions anzhl:
weight=sum(anzhl())/100)

You have () there, which makes R think it needs to call a function. anzhl is not a function, its a vector or some other data thing. If you want the sum of all the values just do sum(anzhl).