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
// paint handler | |
private void fForm_Paint(object sender, PaintEventArgs e) | |
{ | |
Pen redPen = new Pen(Color.Red, 1.0F); | |
PointF p1 = new PointF(20.0F, 50.0F); | |
PointF p2 = new PointF(200.0F, 50.0F); | |
e.Graphics.DrawLine(redPen, p1, p2); | |
} |
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 | |
header("Content-Type: text/plain; charset=utf-8"); | |
ini_set("default_charset", "UTF-8"); | |
mb_internal_encoding("UTF-8"); | |
mb_http_output("UTF-8"); | |
abstract class database | |
{ | |
protected $pdo = null; |
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
<!-- https://raw.githubusercontent.com/zenorocha/clipboard.js/master/dist/clipboard.min.js --> | |
<script src="clipboard.min.js"></script> | |
<script> | |
function copyc(color, element) | |
{ | |
new Clipboard('.block', { | |
container: element | |
}); | |
} | |
</script> |
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
string args = "-f edit.php"; | |
string file = "php.exe"; | |
ProcessStartInfo info = new ProcessStartInfo(); | |
info.FileName = file; | |
info.Arguments = args; | |
info.RedirectStandardOutput = true; | |
info.RedirectStandardError = true; | |
info.UseShellExecute = false; | |
info.CreateNoWindow = true; // flashing screen hidden |
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
// MetaDTO message = request<MetaDTO>(request); | |
private T request<T>(RestRequest request) | |
{ | |
IRestResponse response = client.Execute(request); | |
T message = JsonConvert.DeserializeObject<T>(response.Content); | |
return message; | |
} |
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
public class DataDTO | |
{ | |
public string id { get; set; } | |
public string name { get; set; } | |
} |
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
Mapper.Initialize(cfg => { | |
cfg.CreateMap<account_roles, RoleDTO>() | |
.ForMember(x => x.id, opt => opt.MapFrom(x => x.role_id)) | |
.ForMember(x => x.name, opt => opt.MapFrom(x => x.role_name)) | |
; | |
cfg.CreateMap<account_users, UserDTO>() | |
.ForMember(x => x.id, opt => opt.MapFrom(x => x.user_id)) | |
.ForMember(x => x.email, opt => opt.MapFrom(x => x.user_email)) | |
; |
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
dataGridView1.AllowDrop = false; | |
dataGridView1.AllowUserToAddRows = false; | |
dataGridView1.AllowUserToDeleteRows = false; | |
dataGridView1.AllowUserToOrderColumns = false; | |
dataGridView1.AllowUserToResizeColumns = false; | |
dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige; | |
dataGridView1.AutoGenerateColumns = true; // change this | |
dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; | |
dataGridView1.BackgroundColor = Color.Honeydew; | |
dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.Yellow; |
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
/** | |
* If a difference is detected, force to zoom | |
*/ | |
.zoomX{ | |
zoom: 150%; | |
-moz-transform: scale(1.5); | |
} |
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
$http({ | |
method: "POST", | |
url: "api/files.php" | |
}).then(function(response) { | |
$scope.files = response.data; | |
}, function(response) { | |
// error | |
}); |