我有这样一张桌子:
id product_property_id product_id amount type
1 1 145 10 0
2 4 145 12 0
3 6 145 13 1
4 23 147 2 0
5 4 145 15 1
6 4 145 2 1
Run Code Online (Sandbox Code Playgroud)
type :
0:出
1:进
我想要的是 :
例如 :
product_id 145与product_property_id 4:
(15 + 2) - 12 = 5
product_id product_property_id new_amout
145 4 5
Run Code Online (Sandbox Code Playgroud)
有可能用来SQL得到这个结果,或者我必须使用php它的瞬间?
我有一个ul元素.现在我想知道有多少li人selected上课了.
<ul class="icon-list icon-list-inline star-rating" id="star-rating">
<li class="selected"></li>
<li class=""></li>
<li class=""></li>
<li class=""></li>
<li class=""></li>
</ul>
var vote_selected = $('#star-rating ... ???').length;
Run Code Online (Sandbox Code Playgroud)
它必须返回1.
我想处理单击控制器中的每个单元格,但我的日志没有显示任何内容!
\n\nclass RightMenuController: UITableViewController {\n\n\n let row_items = ["\xd8\xaf\xd8\xb3\xd8\xaa\xd9\x87 \xd8\xa8\xd9\x86\xd8\xaf\xdb\x8c", "\xd8\xab\xd8\xa8\xd8\xaa \xd9\x86\xd8\xa7\xd9\x85/\xd9\x88\xd8\xb1\xd9\x88\xd8\xaf"]\n\n override func viewDidLoad() {\n navigationController?.navigationBar.isHidden = true\n super.viewDidLoad()\n\n self.tableView.delegate = self\n self.tableView.dataSource = self\n\n\n // Uncomment the following line to preserve selection between presentations\n // self.clearsSelectionOnViewWillAppear = false\n\n // Uncomment the following line to display an Edit button in the navigation bar for this view controller.\n // self.navigationItem.rightBarButtonItem = self.editButtonItem()\n }\n\n override func didReceiveMemoryWarning() {\n super.didReceiveMemoryWarning()\n // Dispose of any resources that can be recreated.\n }\n\n // …Run Code Online (Sandbox Code Playgroud) 我看了这个链接:
res/values-sw720dp/dimens.xml(800*1280)
但是当我在Neymus 7上运行我的布局 - 在Genymotion上使用API 19 800*1280时,它会使用
值,华电国际
代替
价值观sw720dp
!

我的min api是14.
为什么?
我div喜欢这样的:
<div id="div_more_info">
<input placeholder="title" name="title_info" class="title_info" style="margin: 1px" type="text">
<input placeholder="des" name="des_info" class="des_info" style="margin: 1px;margin-left: 24px" type="text">
<input placeholder="title" name="title_info" class="title_info" style="margin: 1px" type="text">
<input placeholder="des" name="des_info" class="des_info" style="margin: 1px;margin-left: 24px" type="text">
</div>
Run Code Online (Sandbox Code Playgroud)
现在我想得到title - value我的div的每一行:
$("#div_more_info .title_info").each(function () {
var title_info = $(this).val();
var des_info = $(this).next().find('.des_info').val();
alert(title_info);
alert(des_info);
});
Run Code Online (Sandbox Code Playgroud)
我的代码显示title_info值但des_info显示为未定义.
我有一个对象数组.现在我想将它们转换为json.
var dd =new MyUser[10];
for (int i = 0; i < 10; i++)
{
Debug.Log(i);
dd[i] = new MyUser();
dd[i].Status = 1;
dd[i].TokenReg = "wsdfaf";
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能将dd数组转换为json?
我的composer.json:
...
"maatwebsite/excel": "^3.0",
...
Run Code Online (Sandbox Code Playgroud)
我可以在localhost上运行我的项目,但是当我在服务器上上传时,出现以下错误消息:
Class 'Maatwebsite\Excel\Excel' not found
Run Code Online (Sandbox Code Playgroud)
我的laravel版本:
Laravel Framework 5.5.40
Run Code Online (Sandbox Code Playgroud)
我的公共目录:
public_html / public / index.php
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here …Run Code Online (Sandbox Code Playgroud) 我想fixed position在设备屏幕上设置,但在ScrollView我的View显示底部ScrollView。
我的代码:
<ScrollView>
<item />
<item />
...
<View style={{
position: 'absolute', zIndex: 999, bottom: 0, left: 0, width: 50, height: 50,
borderRadius: 25, backgroundColor: colorConstants.ONE_APP_COLOR, justifyContent: 'center',
marginLeft: 10, marginBottom: 10
}}>
<Text style={{ textAlign: 'center', fontSize: 28, color: '#fff' }}>+</Text>
</View>
</ScrollView>
Run Code Online (Sandbox Code Playgroud) 我想用这个命令释放我的apk:
sudo ./gradlew assembleRelease -x bundleReleaseJsAndAssets
Run Code Online (Sandbox Code Playgroud)
但我收到此错误消息:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-contacts:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
Run Code Online (Sandbox Code Playgroud)
我的反应版本:
"react": "16.3.1",
"react-native": "0.55.4",
Run Code Online (Sandbox Code Playgroud) 我想创建一个Viewas flexDirection="row". alignSelf但当我使用时我无法使用flexDirection="row"。现在,我该如何使用这个数字:
| |
|LeftItem-1 LeftItem-2 RightItem|
| |
Run Code Online (Sandbox Code Playgroud) javascript ×4
react-native ×3
android ×2
jquery ×2
c# ×1
flexbox ×1
ios ×1
json ×1
json.net ×1
laravel ×1
mysql ×1
php ×1
sql ×1
swift ×1
uitableview ×1