Skip to content

Instantly share code, notes, and snippets.

View nicoletirado's full-sized avatar

Nicole Tirado nicoletirado

View GitHub Profile
@nicoletirado
nicoletirado / Frontend user profile in WordPress
Created February 26, 2018 18:55 — forked from chrisdigital/Frontend user profile in WordPress
Setting up a editable user profile in WordPress on the frontend.
//How to edit a user profile on the front end?
//http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end
//Forcing nickname as display_name in custom edit profile template
//http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template
///////
<?php
jQuery.fn.utm_tracking = function(domain, source, medium, campaign) {
$(this).find('a[href^="' + domain + '"]').each(function() {
var url = $(this).attr('href');
$(this).attr( 'href', url + '?utm_source=' + source + '&utm_medium=' + medium + '&utm_campaign=' + campaign );
});
}
// Example Call
$(document).ready( function() {
$('body').utm_tracking('http://www.example.com','example_source','example_link','example_campaign');
(function($) {
$.fn.utm_tracking = function(domain, source, medium, campaign) {
$(this).find('a[href^="' + domain + '"]').each(function() {
var url = $(this).attr('href');
$(this).attr( 'href', url + '?utm_source=' + source + '&utm_medium=' + medium + '&utm_campaign=' + campaign );
});
}
$.fn.utm_tracking_via_obj = function(domain, utmObj) {
utmObj = utmObj || $.utm_data_from_url();
$(this).find('a[href^="' + domain + '"]').each(function() {
@nicoletirado
nicoletirado / gist:6873786
Created October 7, 2013 19:47
Wordpress Widget
// Place this code where you want the widget to appear
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('WidgetName')) : ?>
<?php endif; ?>
// This code creates the widget, modify it as you see fit (http://codex.wordpress.org/Function_Reference/register_sidebar), this goes in functions.php
<?php
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name'=> 'WidgetName',
'before_widget' => '',
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim RecordNumber As Integer
If (IsNumeric(txtCustomerId.Text) And (txtCustomerId.Text.Length = 9)) Then
RecordNumber = Int(Math.Sqrt(txtCustomerId.Text.Trim))
Else
MessageBox.Show("The customer id is invalid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
' Limpiar el campo
txtCustomerId.Clear()
Public Class formModify
Private Sub formModify_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtCustomerId.Enabled = False
txtName.Enabled = False
txtFLName.Enabled = False
txtSLName.Enabled = False
txtAddressLine1.Enabled = False
txtAddressLine2.Enabled = False
- Descripción y alcance del proyecto
- Cual fue el análisis para determinar que el problema era viable. Estudio de viabilidad.
- Por que se recomienda esa solución
- Determinar costo
- Plan de proyecto
- Gantt chart
- Modelos para la fase de Análisis
- Diagramas de diseño
Public Class Form1
Private Sub btnGetNumbers_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetNumbers.Click
Dim intCount As Integer
For intCount = 1 To requestCombinations()
getLottoNumbers()
Next
End Sub
@nicoletirado
nicoletirado / gist:1047968
Created June 26, 2011 20:57
staffpay.php
<?php include("mytcg/settings.php");
include("$header"); ?>
<h2>Staff Pay</h2><br />
If you're part of the regular staff, or do donations often, I will tell you to access this page and take rewards from here. Do <strong>not</strong> take anything from here unless I tell you to. Also, please log the rewards you take.<br /><br />
<div style="text-align:center">
<h2>Card Set Donations</h2><br />
<?
include("includes/db.php");
include("includes/functions.php");
include("header.php");
// If a user is logged in, it shows an error message saying the person can't register because he/she already has an account.
if(isset($_SESSION['username'])) {
echo "<h1 class=\"centered\">Error</h1><p class=\"centered\" style=\"color:red\">You can't register if you're already a user.</p>";
}
else {