我是Android开发的新手,现在我的启动器活动只显示5秒,之后我想检查用户是否已登录或未执行操作并执行操作.
这是我的代码.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
exactPreferences = getSharedPreferences("ExactPreference",MODE_PRIVATE);
setContentView(R.layout.activity_landing_page);
session = exactPreferences.getString(Model.getSingleton().SHARED_SESSION_ID,null);
Log.i("Session Id",session);
displayData(); // I want to perform this function after 5 seconds.
}
private void displayData() {
if(session.equals("")){
Intent loginIntent = new Intent(LandingPage.this,
LoginActivity.class);
startActivity(loginIntent);
Log.i("User Logged In", "False");
}
else
{
Intent objIntent = new Intent(LandingPage.this,
IndexPageActivity.class);
startActivity(objIntent);
Log.i("User Logged In", "True");
}
}
Run Code Online (Sandbox Code Playgroud) 我正在开发一个wordpress woo商业购物网站并添加了一些产品.我想获得每个产品的产品图库图片网址.

我怎样才能获得图片的网址?
我想创建一个带有浮动列的表。
$table->float('TaxRate',5,5)->default(0.00000);
Run Code Online (Sandbox Code Playgroud)
但是Mysql把这个当成了DOUBLE。
这是如何工作的?
我有一个表格有两个字段,如电话,电子邮件,如下图.

当我点击加号按钮时,我想在按钮下面的表单中追加一个额外的文本字段.我想在单击减号按钮时删除文本字段.
动态添加字段并为其设置唯一的名称.我需要将这些数据插入表中.
我的html代码显示在下面..
<div class="RegSpLeft"><input type="text" value="Phone"></div>
<div class="RegSpRight"> <a href="#"><img src="images/plus.png"></a> <a href="#"><img src="images/minus.png"></a> </div>
Run Code Online (Sandbox Code Playgroud) 我开发了一个laravel Web应用程序并在实时服务器上运行良好,现在我正在尝试将该项目迁移到本地服务器,
我正在使用Ubuntu 14.04,内置php,apache和mysql.
当我在浏览器中指向localhost/xxxxxxx /(登录页面)时工作正常,在登录表单中输入值后,它显示404 Not Found错误.
我怎么能解决这个问题,请帮忙..
我有一个Angular JS应用程序,
<div class="col-lg-12" ng-init="getTableData('{{URL::route('get_repair_category')}}')">
Run Code Online (Sandbox Code Playgroud)
当页面加载时,getTableData将执行,但我想检查变量$ rootScope.Dealer并切换初始化的函数名称.
例如:如果$ rootScope.Dealer值存在,我想执行名为getDealerData的函数
如果未设置该值,则需要执行getTableData函数.
我怎么能在anglar js模板中做到这一点.
我刚试过ng-if,但它不起作用......
Laravel 5.5
调节器
public function sendBookingSms(){
$checkState = session()->get('checkState');
$staffs = Staff::whereIn('staffId',$checkState)->get();
foreach ($staffs as $staff) {
$email = str_replace(" ","","44".substr($staff->mobile, 1)).'@mail.mightytext.net';
Notification::send($email, new NewBooking($email));
}
return $staffs;
session()->forget('checkState');
return redirect(route('booking.current'))->with('message','Succesfully Send SMS to selected staffs !!');
}
Run Code Online (Sandbox Code Playgroud)
NewBooking.php(通知)
public function toMail($notifiable)
{
return (new MailMessage)
->line('The introduction to the notification.')
->action('Notification Action', url('/'))
->line('Thank you for using our application!');
}
Run Code Online (Sandbox Code Playgroud)
调用此控制器时,我收到此错误.
$员工.
{ "STAFFID是" 45 "的forName": "Eldhose", "姓": "约翰", "的categoryId":2, "电子邮件": "devhelloworld@gmail.com", "手机": "07588593278"," whatsappNumber ":" 57656578658" , "性别":1, …
我开发了一个laravel应用程序,我想分页视图,
看看我的控制器.
$times=DB::table('timesheets')
->leftJoin('users', 'timesheets.timesheet_user', '=', 'users.id')
->leftJoin('projects','projects.project_id','=','timesheets.timesheet_project_id')
->where('timesheet_user','=',$user)
->paginate(5);
return View::make('timesheet/index')->with('times',$times)->with('projects',$projects);
Run Code Online (Sandbox Code Playgroud)
在结果中获得结果,但是当我尝试显示链接时.它显示如下错误,
Call to undefined method stdClass::links()
<?php echo $times->links(); ?>
Run Code Online (Sandbox Code Playgroud)
我的代码中的错误是什么?
谢谢
我正在尝试在我的Mac Mini中安装Laravel并且一直在收到错误.
错误:
Writing lock file
Generating autoload files
Mcrypt PHP extension required.
Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [package] [directory] [version]
Run Code Online (Sandbox Code Playgroud)
一个月前我安装了Laravel 4.2,运行良好.但是现在当我安装新的Larvel 4.2时,它给出了上面给出的错误.
我使用内置的PHP,mySql,phpMyAdmin.(不是MAMP或XAMP)
我已经安装了mcrypt扩展.
Migration
Schema::create('users', function (Blueprint $table) {
$table->increments('user_id');
$table->string('username',50)->unique();
$table->date('start_date');
$table->date('end_date')->nullable();
$table->timestamps();
});
Run Code Online (Sandbox Code Playgroud)
Here start_date set as column type date and nullable
When running Insert function like below its inserting null values
$insert = [
'username' =>strtoupper(request('username')),
'password' =>Hash::make(request('password')),
'start_date' =>date('Y-m-d',strtotime(request('start_date'))),
];
if(request()->filled('end_date')){
$insert['end_date'] = date('Y-m-d',strtotime(request('end_date')));
}
User::create($insert);
Run Code Online (Sandbox Code Playgroud)
When Updating the same row left blank as end_date input,
$user = User::GetWithEncrypted(request('user_id'));
$update ['start_date'] = date('Y-m-d',strtotime(request('start_date')));
if(request()->filled('end_date')){
$update['end_date'] = date('Y-m-d',strtotime(request('end_date')));
}else{
$update['end_date'] = 'NULL';
}
$user->update($update);
Run Code Online (Sandbox Code Playgroud)
In Table, it comes like below …
我在2个月后开发了一个简单的laravel crud应用程序.现在试图再做一个.一旦进入命令提示符.它的显示错误如
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "C:\ProgramData\ComposerSetup\bin\composer.phar self-update" to get the latest version.
Run Code Online (Sandbox Code Playgroud)
现在我在路上:e:\ wamp\www \
然后尝试从getcomposer.com下载并安装作曲家..但它的显示错误如下.
"安装程序无法继续,因为以下应用程序正在使用需要更新的文件.
Windows资源管理器
"
我目前没有打开任何Windows资源管理器.然后这个错误是如何演变的.请给我任何解决方案.我重启了我的机器2次.
我被 jquery 困在了我的 Timerapp 中。下面是我的场景
3.ajax响应成功后按钮类变为暂停。现在按钮的类名是暂停。
4.一段时间后,当再次单击按钮(类名为:pause)时,我想调用具有当前单击时间的 ajax 函数并将值存储在数据库中。
5.然后Button类名会改成旧的(toStart)。
HTML :
<button class="toStart" value="1" va>Start</button>
Run Code Online (Sandbox Code Playgroud)
JS:
$('.toStart').click(function()
{
//ajax function { addStart}
$("button[value=1]").removeclass('toStart');
$("button[value=1]").addClass('pause');
}
$(document.body).on('click','.pause',function()
{
//ajax function {addStop}
$("button[value=1]").addClass('toStart');
}
Run Code Online (Sandbox Code Playgroud)
这个过程对每个点击功能同时重复。
在身体加载时,当我单击按钮时,它会转到 ajax 函数并将类(暂停)添加到按钮中(工作正常)。
但是当我点击按钮(类名:暂停)时, toStart 函数开始工作,然后暂停函数同时工作。
我该如何解决这个问题..
附加我的 Webdeveloper->Network Graph。您可以看到 addStart Ajax 执行了两次。

我试图用 jquery 对我的 html 页面进行分类,这是我的代码。
<tbody>
<tr>
<td class="itmId">1</td>
<td class="entryNAmee">David</td>
</tr>
<tr>
<td class="itmId">2</td>
<td class="entryNamee">Alan</td>
</tr>
</tbody>
Run Code Online (Sandbox Code Playgroud)
我正在将 td 更改为使用 jquery 输入文本,然后单击除第一列之外的每个 td。这工作正常,当上述事件执行时,tr 变得如下所示。
<tr>
<td class="itmId">1</td>
<td class="entryNAmee nowText">
<input type="text" value="Alan">
</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
进行更正后,事件模糊不清。代码如下。
js。
$(document).on('blur','table tr td input',function()
{
var fieldNewValue = $(this).val();
var fieldNewId = $(this).closest('td.itmId').addClass("kkkkkkkkk");
//console.log(fieldNewId);
alert(fieldNewId);
/*$.ajax({
typr:"post",
url:"updateEntry",
dataType:'json',
data:{newValue:fieldNewValue},
success:function(data)
{
console.log("updated succesfully");
}
});
*/
$(this).parents('td').text(fieldNewValue).removeClass('nowText');
$(this).remove();
});
Run Code Online (Sandbox Code Playgroud)
我想在单击的 td 的上侧 td 添加一个类。我尝试了最接近和父母的 jquery api,但没有用,
任何人都可以请支持我如何赶上td?
jquery中最近的和父母之间有什么不同。
谢谢
laravel-4 ×5
javascript ×4
php ×4
html ×3
jquery ×3
mysql ×3
ajax ×2
eloquent ×2
laravel ×2
laravel-5.3 ×2
.htaccess ×1
android ×1
angularjs ×1
apache ×1
composer-php ×1
delegation ×1
email ×1
java ×1
laravel-5 ×1
laravel-5.5 ×1
laravel-5.7 ×1
mcrypt ×1
phar ×1
routes ×1
timer ×1
ubuntu ×1
woocommerce ×1
wordpress ×1