Skip to content

Instantly share code, notes, and snippets.

View shahryarjb's full-sized avatar
👐
I am ready for a new job offer and relocation

Shahryar Tavakkoli shahryarjb

👐
I am ready for a new job offer and relocation
View GitHub Profile
@shahryarjb
shahryarjb / gist:1d0cb8f822844213a5c2003deec65a78
Created February 10, 2017 06:05
tinypay fix no Bootstrap
<?php echo $this->form->getLabel('payer_name'); ?>
<div style="clear: both;"> </div>
<?php echo $this->form->getInput('payer_name'); ?>
<div style="clear: both;"> </div>
<?php echo $this->form->getLabel('payer_mobile'); ?>
<div style="clear: both;"> </div>
<?php echo $this->form->getInput('payer_mobile'); ?>
<div style="clear: both;"> </div>
<?php echo $this->form->getLabel('payer_email'); ?>
<div style="clear: both;"> </div>
#FormGroup.fromstesttwo.component.ts
import { Component, Inject } from '@angular/core';
import { FormGroup, FormControl, Validators, FormArray, FormBuilder } from '@angular/forms';
@Component({
selector: 'my-formstwo',
templateUrl: "app/fromstesttwo/fromstesttwo.component.html",
})
export class FromstesttwoComponent {
@shahryarjb
shahryarjb / ShopViewController.swift
Last active February 28, 2017 15:33
swift 3 -json
let url = URL(string: "http://localhost:8888/iosnotic/index.php?option=com_helloworld&view=helloworld&action=select&id=0")
let setion = URLSession.shared
let request = NSMutableURLRequest(url: url!)
request.httpMethod = "POST"
request.timeoutInterval = TimeInterval(10)
let postString = "name=22"
//
// ViewController.swift
// coredatayoutube
//
// Created by shahryar tavakkoli on 06/03/2017.
// Copyright © 2017 shahryar tavakkoli. All rights reserved.
//
import UIKit
import CoreData
//
// TestViewController.swift
// whderjson
//
// Created by shahryar tavakkoli on 09/04/2017.
// Copyright © 2017 shahryar tavakkoli. All rights reserved.
//
import UIKit
import Alamofire
# my blog : https://trangell.com/fa/
# public : http://iranonrails.ir
defmodule Times do
def double(n, b) do
n * 2 * b
end
def rogers(), do: "hi shahryar"
# my blog : https://trangell.com/fa/
# public : http://iranonrails.ir
defmodule Factorial do
def of(0), do: 1
def of(n), do: n * of(n - 1)
end
# my blog : https://trangell.com/fa/
# public : http://iranonrails.ir
defmodule Guard do
def what_is(x) when is_number(x) do
IO.puts "#{x} is a number"
end
def what_is(x) when is_list(x) do
IO.puts "#{inspect(x)} is a list"
end
# my blog : https://trangell.com/fa/
# public : http://iranonrails.ir
defmodule Example do
def func(p1, p2 \\ 2, p3 \\ 3, p4) do
IO.inspect [p1, p2, p3, p4]
end
def foo(a, b \\ :default) do
IO.puts "#{a} - #{b}"
# my blog : https://trangell.com/fa/
# public : http://iranonrails.ir
defmodule Canvas do
@defaults [ fg: "black", bg: "white", font: "Merriweather" ]
def draw_text(text, options \\ []) do
options = Keyword.merge(@defaults, options)
IO.puts "Drawing text #{inspect(text)}"
IO.puts "Foreground: #{options[:fg]}"