Skip to content

Instantly share code, notes, and snippets.

@ateneva
ateneva / gist:661cc31ac5f9986b142232f6c05f0665
Created October 28, 2023 15:24 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ateneva
ateneva / SQL_charindex_vs_patindex.sql
Last active September 2, 2018 13:44
What is the difference between charindex and patindex in SQL Server?
-------------------SQL Server-------------------------------------------
select
tags,
charindex('technology', tags) as char_position_tech,
patindex('technology', tags) as pat_position_tech,
patindex('%technology%', tags) as pat_position_tech_2,
charindex('Technology', tags) as char_position_Tech,
@ateneva
ateneva / SQL_instr_vs_locate.sql
Last active September 2, 2018 13:20
What is the difference between instr() and locate() in MySQL?
/* MySQL */
select
tags,
instr(tags, 'TED'),
locate('TED', tags),
locate('TED', tags, 5),
instr(tags, 'ted'),
locate('ted', tags),
@ateneva
ateneva / SQL_position_vs_strpos.sql
Last active September 2, 2018 13:12
What is the difference between position() and strpos() in PostgreSQL?
-------------------------------PostgreSQL-----------------------------------------
select
tags,
position('technology' in tags) as position_tech,
strpos(tags, 'technology') as strpos_tech
position('Technology' in tags) as position_Tech,
strpos(tags, 'Technology') as strpos_Tech,
@ateneva
ateneva / SQL_upper_lower.sql
Last active August 26, 2018 10:29
How do I change the case of a string?
---------------------SQL Server----------------------------------------------------------------
select
title,
lower(title) as lowercase_string,
upper(title) as uppercase_string
from datageeking.dbo.films
@ateneva
ateneva / SQL_string_functions_proper_equivalent.sql
Last active August 18, 2018 10:29
How do I capitalize each word in a string with SQL?
--***********************************************************************************************************************
------------------------SQL Server-------------------------------------------------------------------------------------
----1) Get the first letter of the string & capitalize it
upper(left(ltrim(title),1)) as first_letter_first_word,
----2) Get the remaining string
right(lower(ltrim(title)), len(lower(ltrim(title)))-1) as remaining_string,
----3) Find the position of the first blank space-----------------
@ateneva
ateneva / ForEachChtObjInWbk_ExportToPPT.bas
Last active August 15, 2018 20:40
Export interactive chart embedded on a worksheet to PowerPoint
Sub ExportFSCSlides()
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'written by Angelina Teneva, 2015
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim PPApp As PowerPoint.Application
Dim PPpres As PowerPoint.Presentation
Dim pptx As String
pptx = ActiveWorkbook.Worksheets("calculated fields").Range("F2")
@ateneva
ateneva / ForEachS_Display_SlideIDs.bas
Last active August 2, 2018 15:50
How do I show the slide IDs of multiple slides?
Sub Display_SlideIDs()
Dim i As Integer
Dim PPS As Slide
Dim p As Presentation
Set p = ActivePresentation
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Each PPS In p.Slides
@ateneva
ateneva / ForEachS_ShowSlideID.bas
Created August 2, 2018 12:23
How do I show the Slide ID of a single slide?
Sub ShowSlideID()
Dim p As Presentation
Set p = ActivePresentation
Dim No As Integer
Dim i As Integer
'***************************
i = InputBox("Enter Slide number")
@ateneva
ateneva / ForEachShOnSlide_Count_shapes_on_slide.bas
Created August 2, 2018 12:22
How do I count shapes on a slide?
Sub Count_shapes_on_slide()
Dim p As Presentation
Set p = ActivePresentation
Dim No As Integer
Dim i As Integer
Dim PPS As Slide
Dim Sh As Shape
'***************************