Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugo hugo-dc

View GitHub Profile
View call_browser.abap
REPORT ZBROWSER .
call method cl_gui_frontend_services=>execute
exporting
document = 'http://hugo-dc.com'
exceptions
others = 1.
View pil_raw_encoder.md

Raw Encoder

1 1-bit bilevel, stored with the leftmost pixel in the most significant bit. 0 means black, 1 means white.

1;I 1-bit bilevel, stored with the leftmost pixel in the most significant bit. 0 means white, 1 means black.

@hugo-dc
hugo-dc / sshot.hs
Created Feb 18, 2015
Screenshot with Haskell
View sshot.hs
import Graphics.Win32.Window
import Graphics.Win32.GDI.Bitmap
import Graphics.Win32.GDI.HDC
import Graphics.Win32.GDI.Graphics2D
main = do desktop <- getDesktopWindow -- Grab the Hwnd of the desktop, GetDC 0, GetDC NULL etc all work too
hdc <- getWindowDC (Just desktop) -- Get the dc handle of the desktop
(x,y,r,b) <- getWindowRect desktop -- Find the size of the desktop so we can know which size the destination bitmap should be
-- (left, top, right, bottom)
newDC <- createCompatibleDC (Just hdc) -- Create a new DC to hold the copied image. It should be compatible with the source DC
View puzzle.py
def cons(x, y):
return lambda f: f(x, y)
def car(x):
# Fill out this function
pass
if car(cons(1, 5)) == 1:
print 'Solved!'
else:
View grupo_de_vendedores_value_help.abap
DATA:
ti_tvgrt LIKE tvgrt OCCURS 0 WITH HEADER LINE.
DATA: t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_value OCCURS 0,
vkgrp LIKE tvgrt-vkgrp,
buzei LIKE tvgrt-bezei.
DATA: END OF t_value.
@hugo-dc
hugo-dc / recommended.abap
Last active Sep 27, 2015
Campo en selection screen como recomendado
View recommended.abap
View ranges.abap
begin of bukrs occurs 0,
SIGN(1) type c, " I= Include E=Exclude
OPTION(2) type c, " EQ= Equals BT= Between NE= Not Equals
LOW like bukrs,
HIGH like bukrs,
end of bukrs.
@hugo-dc
hugo-dc / messtab.abap
Last active Sep 29, 2015
Messtsab messages
View messtab.abap
MESSAGE ID messtab1-msgid
TYPE messtab1-msgtyp
NUMBER messtab1-msgnr
WITH messtab1-msgv1 messtab1-msgv2 messtab1-msgv3
messtab1-msgv4.
LOOP AT MESSTAB.
select single * from t100 where sprsl = messtab-msgspra
and arbgb = messtab-msgid
and msgnr = messtab-msgnr.
View field-symbols.abap
REPORT ztest.
DATA:
v_01 TYPE i VALUE '5',
v_02 TYPE i VALUE '10'.
FIELD-SYMBOLS: <value> TYPE i.
ASSIGN ('V_02') TO <value>.
@hugo-dc
hugo-dc / wp_changer.py
Created Feb 13, 2012
Change desktop wallpaper on Windows
View wp_changer.py
import ctypes
ctypes.windll.user32.SystemParametersInfoA(20, 0, "myimage.jpg" , 0)