This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="my_form" method="post" action="upload.php" enctype="multipart/form-data"> | |
<input type="text" name="title"> | |
<textarea name="content"></textarea> | |
<input type="file" name="image" accept="image/*"> | |
<button type="submit">OK</button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
$('#my_form').on('submit', function (e) { | |
// prevent browser from submitting the form | |
e.preventDefault(); | |
var $form = $(this); | |
var formdata = (window.FormData) ? new FormData($form[0]) : null; | |
var data = (formdata !== null) ? formdata : $form.serialize(); | |
$.ajax({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data['file'] = $_FILES; | |
$data['text'] = $_POST; | |
echo json_encode($data); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = [ | |
{id: 1, title: 'hello', parent_id: 0}, | |
{id: 2, title: 'hello', parent_id: 0}, | |
{id: 3, title: 'hello', parent_id: 1}, | |
{id: 4, title: 'hello', parent_id: 3}, | |
{id: 5, title: 'hello', parent_id: 4}, | |
{id: 6, title: 'hello', parent_id: 4}, | |
{id: 7, title: 'hello', parent_id: 3}, | |
{id: 8, title: 'hello', parent_id: 2} | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paypal Fee Calculator | |
// default sum | |
var sum = 100; | |
// default rate | |
feeRate = 0.049; | |
// default fee | |
fee = sum * feeRate + 0.3 | |
// to get sum you need to demand to your client sum2 | |
var sum2 = (0.3 + sum) / (1 - feeRate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.simplifiedlearning.customlistviewandroid; | |
/** | |
* Created by Belal on 9/14/2017. | |
*/ | |
public class Hero { | |
int image; | |
String name, team; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nabil.monjeuquiz.com.calculator; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
public class MainActivity extends AppCompatActivity implements View.OnClickListener { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"productSize": "", | |
"item": "DELUXE COOKED HAM", | |
"plu_upc": "", | |
"price": " $5.15 ", | |
"productId": "102", | |
"catId": "1", | |
"uom": "LB" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Jobs; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Redis\Database as Redis; | |
class Foo extends Job | |
{ | |
use InteractsWithQueue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Jobs; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Redis\Database as Redis; | |
class Foo extends Job | |
{ | |
use InteractsWithQueue; |