小编Tar*_*tar的帖子

通过div内部的输入进行迭代

我试图通过jQuery迭代放置在特定div上的所有输入,但是没有响应.我无法通过使用警报来查看输入值.我究竟做错了什么 ?

<form id="internshipStage2Form" method="POST" action="form2.php">
    <center>
        <table id="studentInformation" border="1">
            <caption style="color:#f00;">Student(Trainee) Information</caption>
            <tr>
                <td valign="middle" align="center">
                    <label id="stuEmailLabel" for="stuEmailText">E-mail Address</label>
                </td>
                <td valign="middle" align="center"><?php echo $email; ?></td>
            </tr>
            <tr>
                <td valign="middle" align="center">
                    <label id="stuPhoneLabel" for="stuPhoneText">Phone</label>
                </td>
                <td><input id="stuPhoneText" type="text" name="stuPhoneText"/></td>
            </tr>
        </table>
        <div id="companyInfo">
            <table id="companyInformation" border="1">
                <caption style="color:#f00;">Company Information</caption>
                <tr>
                    <td valign="middle" align="center">
                        <label id="companyNameLabel" for="companyNameText">Company Name</label>
                    </td>
                    <td><input id="companyNameText" type="text" name="companyNameText"/></td>
                </tr>
                <tr>
                    <td valign="middle" align="center">
                        <label id="companyAdressLabel" for="companyAdressText">Address</label>
                    </td>
                    <td><input id="companyAdressText" type="text" name="companyAdressText"/></td>
                </tr>
                <tr>
                    <td …
Run Code Online (Sandbox Code Playgroud)

html javascript iteration jquery loops

4
推荐指数
2
解决办法
1万
查看次数

Laravel 5 SQLSTATE [42S22]:找不到列

我正在做一些连接并尝试获取数据.我的查询构建器是:

$datasource = DB::table('vehicles')->join('brands', 'vehicles.brand_id', '=', 'brands.id')->join('sections', 'vehicles.section_id', '=', 'sections.id')->select('vehicles.*, vehicles.id AS vid');
Run Code Online (Sandbox Code Playgroud)

但我得到这个错误:

SQLSTATE [42S22]:柱未找到:在'字段列表' 1054未知列'vehicles.model,'(SQL:选择vehicles.model,ASvehicles内连接brandsvehicles.brand_id= brands.id内连接sectionsvehicles.section_id= sections.id限制4偏移0)620线

我做错了什么?

php sql join query-builder laravel

4
推荐指数
1
解决办法
1336
查看次数

Fragment中的ScrollView在软键盘出现时不滚动

我有一个Fragment,有一个ScrollViewFragment

<ScrollView
    android:id="@+id/scroll_view"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:paddingBottom="16dp"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/appbar">

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.tatar.mobile.widget.CardSelectionView
            android:id="@+id/card_selection_view"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            app:accountRightTextView1="@string/available"
            app:accountTitleTextView="@string/from"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/line_text_view"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="8dp"
            android:background="@color/gray.light"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/card_selection_view" />

        <Spinner
            android:id="@+id/type_spinner"
            style="@style/spinner"
            android:layout_marginTop="8dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/line_text_view" />

        <Spinner
            android:id="@+id/company_spinner"
            style="@style/spinner"
            android:layout_marginTop="8dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/type_spinner" />

        <LinearLayout
            android:id="@+id/dynamic_form_container"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/company_spinner" />

        <Spinner
            android:id="@+id/installment_spinner"
            style="@style/spinner"
            android:layout_marginTop="8dp"
            android:visibility="invisible"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/dynamic_form_container" />

        <Button
            android:id="@+id/continue_button"
            style="@style/action_button"
            android:layout_marginTop="16dp" …
Run Code Online (Sandbox Code Playgroud)

android android-softkeyboard android-fragments android-scrollview android-scroll

4
推荐指数
2
解决办法
1645
查看次数

RESTful API的代码需求约束

作为一个新手,我试图了解REST及其原理。我已经阅读了一些有关它的文章,但是却难以理解代码需求约束,这是唯一的可选约束。它是什么 ?如何以及何时实施?任何帮助,将不胜感激。

rest web-services restful-architecture

3
推荐指数
1
解决办法
2743
查看次数

从Spring Boot Rest控制器访问JWT令牌

我正在使用Spring Boot实现REST API,并通过JWT和Oauth 2保护它。

身份验证和生成访问令牌没有问题。

当用户发出请求时,我想从控制器访问其JWT令牌。

@RequestMapping(value = "/users", method = RequestMethod.GET)
public List<AppUser> getUsers(OAuth2Authentication auth) {
    logger.info("CREDENTIALS:" + auth.getCredentials().toString());
    logger.info("PRINCIPAL:" + auth.getPrincipal().toString());
    logger.info("OAuth2Request:" + auth.getOAuth2Request());
    logger.info("UserAuthentication:" + auth.getUserAuthentication());
    return userService.findAllUsers();
}
Run Code Online (Sandbox Code Playgroud)

我尝试了类似上述的操作,但无法访问令牌,我仅获得用户名。在Spring Boot中有没有办法做到这一点?

任何帮助,将不胜感激。

spring spring-security jwt spring-boot spring-security-oauth2

3
推荐指数
2
解决办法
3012
查看次数

Linq 在加入过程后更新不同的表

我使用 linq join 组合了我的 3 个表。之后,我想使用从 webform 获取的数据更新此表。我怎样才能做到这一点 ?我的实现如下

public void updateShoes(Shoe shoe) 
{
    var query = from b in db.BrandTbls.AsQueryable()
                join m in db.ShoeModelTbls on b.BrandID equals m.BrandID
                join s in db.ShoeTbls on m.ModelID equals s.ModelID
                where shoe.ShoeID == s.ShoeID 
                orderby m.ModelName
                select new 
                { 
                    s.ShoeID,
                    s.Size,
                    s.PrimaryColor,
                    s.SecondaryColor,
                    s.Quantity,
                    m.ModelName,
                    m.Price,
                    b.BrandName
                };
}
Run Code Online (Sandbox Code Playgroud)

c# sql linq asp.net join

2
推荐指数
1
解决办法
8487
查看次数

Laravel 5在商店后重定向

如何在L5存储过程后重定向路由?

我的路线是

Route::get('/pages/aracislemler/{id}', ['middleware' => ['roles'], 'uses' => 'PagesController@aracislemler', 'roles' => ['Admin']]);
Run Code Online (Sandbox Code Playgroud)

和控制器功能

public function store()
{

        $brand_name = Request::get('brand_id');
        $type_id = Request::get('type_id');
        //$client_id = Request::get('representive_client_id');

        if (!Brand::find($brand_name)) {
            $brand = new Brand;
            $brand -> brand_name = $brand_name;
            $brand -> type_id = $type_id;
            $brand -> save();

            $last_brand_id = $brand -> id;

            $input = Request::except('brand_id');
            Vehicle::create($input);

            $vehicle = Vehicle::orderBy('created_at', 'desc')->first();
            $vehicle -> update(array('brand_id' => $last_brand_id));

        }else{         
            $input = Request::all();
            Vehicle::create($input);
        }

        return  redirect('pages/aracislemler');
}
Run Code Online (Sandbox Code Playgroud)

php redirect laravel laravel-routing laravel-5

2
推荐指数
1
解决办法
7730
查看次数

Laravel 表单生成器日期时间输入

是否有与 HTML 5 的数据时间输入字段等效的 Laravel 5 Form Builder?我已经找了一整天但没有找到任何东西。

<input type="datetime-local" class="form-control" id="game-date-time-text" name="game_date_time">
Run Code Online (Sandbox Code Playgroud)

任何帮助,将不胜感激。

html formbuilder laravel laravel-5

2
推荐指数
1
解决办法
8809
查看次数

Android Parse Json响应Java ArrayList

我试图通过Volley向我的WCF服务发出GET请求,我想解析它对Java的响应ArrayList.这是我的方法

    public ArrayList<Company> getCompanies(){

        String url = AUDITTRACKINGAPP_SERVICE_URI + "GetCompanies";
        String tagJsonReq = "companiesRequest";

        final ProgressDialog pDialog = new ProgressDialog(context);
        pDialog.setMessage("Please Wait...");
        pDialog.show();

        final ArrayList<Company> companies = new ArrayList<Company>();

        JsonObjectRequest companiesRequest = new JsonObjectRequest(  Request.Method.GET, url, null,
                new Response.Listener<JSONObject>() {
                    @Override
                    public void onResponse(JSONObject response) {

                        Log.v(TAG, "COMPANIES RESPONSE:" + response.toString());

                        try {
                            JSONArray companiesJson = response.getJSONArray("GetCompaniesResult");

                            for (int i = 0; i < companiesJson.length(); i++) {

                                JSONObject jObject = (JSONObject)companiesJson.get(i);

                                Company company = new Company();
                                company.setCompanyId(Integer.parseInt(jObject.getString("CompanyId")));
                                Log.v(TAG, …
Run Code Online (Sandbox Code Playgroud)

java android json android-volley

1
推荐指数
1
解决办法
1086
查看次数

提升一个功能

作为 F# 新手,我在理解术语“提升”时遇到问题,并且无法正确提升功能。

例如,我如何解除以下功能以及它将如何影响功能行为。

let add item element = item :: element
Run Code Online (Sandbox Code Playgroud)

任何帮助,将不胜感激。

f# functional-programming function lifting

1
推荐指数
1
解决办法
434
查看次数

s(字符串)是一个'字段',但用作'类型'C#

我正在尝试为变量赋值,但我得到了编译错误: s(String) is a 'field' but is used like a 'type'

public class SForceTest
{
    String s = "";
    s = "asdsa";
 }
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能解决这个问题?谢谢

c# exception

-4
推荐指数
1
解决办法
2478
查看次数