如果我在MySQL中有一个包含以下数据的表:
id       Name       Value
1          A          4
1          A          5
1          B          8
2          C          9
如何将其变为以下格式?
id         Column
1          A:4,5,B:8
2          C:9
我想我必须使用GROUP_CONCAT.但我不确定它是如何工作的.
假设我在表中有7列,我想只选择其中两列,就像这样
SELECT `name`,`surname` FROM `table` WHERE `id` = '1';
在laravel雄辩的模型中,它可能看起来像这样
Table::where('id', 1)->get();
但我想这个表达式会选择id等于1的所有列,而我只想要两列(name,surname).如何只选择两列?
在我的routable component我
@RouteConfig {
  {path: '/login',   name: 'Login', component: LoginComponent}
}  
但是,如果我去,如何获得查询参数app_url/login?token=1234?
在Windows环境中,您将在C:\ Users\user_name位置具有.m2文件夹,并且您将settings.xml文件复制到该文件夹,以便设置代理设置和nexus存储库位置等.
那么我必须在Ubuntu环境上做什么才能在安装maven之后获得类似的设置.
我已将Android Studio更新为3.1稳定频道.我注意到调色板窗口中的"所有"选项卡被删除,并引入了"Legacy"选项卡.该选项卡包含以下内容:
我没有提到GridLayout它,因为它是一个可下载的依赖项,而不是Android API中的View.
哪些新观点取代了上述观点?
我知道ConstraintLayout替换RelativeLayout,但什么取代了ListView,GridView或者TabHost?我想要了解最新情况.
 import java.io.*;
 import jxl.*;
 class Xlparsing
 {
   Workbook wb =wb.getWorkbook(new File(
    "C:\\Documents and Settings\\kmoorthi\\Desktop\\ak\\new.xls"));
   // Illegal forward reference What it means
   Sheet st = wb.getSheet(0);
   Cell cell1 = st.getCell(0,0);
   String a1 = cell1.getContents();
   public static void main(String s[])
   {
     System.out.println(new Xlparsing().a1);
   }
 }
嗨当我尝试从Excel工作表中提取数据时,非法前向引用错误会出现在文件对象创建中.
怎么解决这个?
我在stackoverflow中的许多问题中发现了这个问题,但没有运气.请帮我弄清楚我做错了什么.
在组件中:
ngOnInit() {
    this.companyCreatForm = this._formBuilder.group({
      name: [null, [Validators.required, Validators.minLength(5)]],
      about: [null, [Validators.required]],
      businessType: [null, [Validators.required]],
      address: this._formBuilder.group({
        street: [],
        website: [null, [Validators.required]],
        mobile: [null, [Validators.required]],
        email: [null, [Validators.required]],
        pageId: [null, [Validators.required]],
      }),
    });
表格:
<form [formGroup]="companyCreatForm" (ngSubmit)="creat_company()" novalidate class="form-horizontal">
    <div class="panel panel-default" *ngIf="generalPanel">
        <div class="panel-heading">General Info</div>
        <div class="panel-body">
            <div class="form-group">
                <label for="comapny name" class="col-sm-3 control-label">Company's Name</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" placeholder="Company's Name" formControlName="name" #refName>
                    <div *ngIf="companyCreatForm.controls['name'].hasError('required') && refName.touched" class="alert alert-danger">
                        please enter name
                    </div>
                    <div *ngIf="companyCreatForm.controls['name'].hasError('minlength')" class="alert …我在我的方法中有以下代码,我通过ajax发送到控制器方法:
    $newUser = \App\UserInfo::updateOrCreate([
        'user_id'   => Auth::user()->id,
        'about'     => $request->get('about'),
        'sec_email' => $request->get('sec_email'),
        'gender'    => $request->get("gender"),
        'country'   => $request->get('country'),
        'dob'       => $request->get('dob'),
        'address'   => $request->get('address'),
        'mobile'    => $request->get('cell_no')
    ]);
该dd($request->all())给我:
array:8 [
  "_token" => "fHeEPfTvgMD3FpIBmmc6DmKXFaiuWKZEiOhg6twQ"
  "about" => "Some about me."
  "sec_email" => "example@gmail.com"
  "country" => "Priority highest"
  "gender" => "male"
  "dob" => "12/12/1990"
  "address" => "Some address"
  "cell_no" => "234234234"
]
这是完美的.
Jquery代码:
$('#submit-editProfile-form').on('click', function() {
    var profileEditForm = $("#edit-user-profile");
    var formData = $('#edit-user-profile').serialize();
    profileEditForm.on('submit', function(e){
        e.preventDefault();
        $.ajaxSetup({ …我有一个角元素
<mat-checkbox class="btn-block" 
              labelPosition="before" 
              (change)="showOptions($event)" 
              (click)="makeJSON($event.checked,i,j,k)">
</mat-checkbox>
这里onchange(实际上给出了checkout的状态)正在做一些其他的任务,我想要点击事件的复选框状态(选中或取消选中).
我已经尝试查看由click创建的对象,并且里面没有click对象,所以我如何检测是否选中了复选框.
嘿,我在网上搜索了一段时间,但我找不到解决以下问题的方法:
在javafx中你有3个基本文件; controller-class,fxml文件和应用程序类.现在我想在控制器中做出反应点击按钮(效果非常好)并更改该点击的屏幕(你通常使用stage.setScreen()),但我没有参考舞台(你可以在应用程序类中找到).
应用程序示例:
public class JavaFXApplication4 extends Application {
@Override
public void start(Stage stage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("Sample.fxml"));
    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.show();
}
/**
 * The main() method is ignored in correctly deployed JavaFX application.
 * main() serves only as fallback in case the application can not be
 * launched through deployment artifacts, e.g., in IDEs with limited FX
 * support. NetBeans ignores main().
 *
 * @param args the command line arguments
 */ …