Mark Espinoza

Apache Tapestry 5, Java, Hibernate, PostgreSQL, Maven, Apache Ant, Apache Tomcat, VPS, HTML, CSS, JQuery, GIT, Parsing, Data Analysis.

  • 2018.02.18 AD at 20:40 EST
    Mark Espinoza

    RequireJS Bug? Tweak needed.

    As the site gets bigger, looks like some fixes are needed. In this case I'm using some duct tape. Increasing the timeout in RequireJS for when loading resources. This tends to happen when I clear my cache for testing purposes or when the server is slow, or just restarting. Need a better fix for this eventually.

    #tapestry5   #javascript   #timeout   #bug   #requirejs  
  • 2018.02.17 AD at 23:30 EST
    Mark Espinoza

    Cigars from Poland

    Wife back from Poland. Thank you.

    #cigar   #montecristo  
  • 2017.12.16 AD at 10:35 EST
    Mark Espinoza

    Hibernate mappings (part 1)

    Some hibernate mappings on a Postgres database as they have worked for me. I'll explain the options and the parent/child relationships in a later post. (edited: needed to escape the < and >)
    /* One to One *************************/
    /* Parent Blogger */
    @OneToOne(cascade= CascadeType.ALL)
    @JoinColumn(name = "blogger_stats_id")
    private BloggerStats bloggerStats;

    /* Child BloggerStats */
    @OneToOne(mappedBy = "bloggerStats")
    private Blogger blogger;

    /* One to Many ************************/
    /* Parent/child relationship is switched */
    /* Parent BloggerDocument */
    @ManyToOne(optional = false)
    @JoinColumn(name = "blogger_id")
    private Blogger blogger;

    /* Child Blogger */
    @OneToMany(mappedBy="blogger", cascade=CascadeType.ALL)
    private Set<BloggerDocument> bloggerDocuments = new HashSet<>();

    /* Many to Many ***********************/
    /* Parent Blogger */ @ManyToMany
    private Set<BloggerGroup> bloggerGroups = new HashSet();

    /* Child BloggerGroup*/
    private Set<Blogger> bloggers = new HashSet ();

    #onetomany   #onetoone   #hibernate   #manytomany  
  • 2017.12.09 AD at 11:38 EST
    Mark Espinoza

    What? Snow? Here?

    Forecast was for snow the first night. It snowed, then more in the morning so time to get the kids out and take advantage of it. Hope we get more, hope there's not any ice.

    #snow   #snowman   #snowbeer  
  • 2017.12.04 AD at 21:49 EST
    Mark Espinoza

    Get image dimensions from UploadedFile

    So got rid of width and height requirements when uploading images for posts. Turns out I did not realize I could use ImageIO to get that information where before I had to remember that sometimes I turn my phone sideways or that I took the picture with my camera instead. Anyway hope this helps somebody. The relevant code in the method 'onSuccessFromAddImageForm' has the tags as /* here */

    #uploadedfile   #tapestry5   #image   #java  
  • 2017.12.03 AD at 21:42 EST
    Mark Espinoza

    Midtown street

    Midtown Atlanta by Georgia Tech.

    #georgiatech   #fall   #midtown  
  • 2017.12.03 AD at 21:02 EST
    Mark Espinoza

    Savannah trip with the fam

    You guys need to make it for Christmas.

    #goodtimes   #savannah   #family  
  • 2017.12.03 AD at 20:54 EST
    Mark Espinoza

    Remembering snowmageddon

    As Conan O'Brien put it, 'sometimes two inches is all you need!'

    #snow   #twoinchesisallyouneed   #snowcapolypse   #snomageddon   #atlanta  
  • 2017.12.03 AD at 20:45 EST
    Mark Espinoza

    I'm going back to Cali...

    Trip to California. Got that song stuck in head.

    #yuma   #sunrise   #windmill   #california   #desert  
  • 2017.12.03 AD at 20:34 EST
    Mark Espinoza

    Morning drive

    My morning drive Monday through Friday when I was working at Fort Huachuca. The Tucson desert is the most beautiful in the world, period.

    #desert   #sunrise   #forthuachuca  
  • 2017.12.03 AD at 20:28 EST
    Mark Espinoza

    Sunrose and spilt blood

    Desert sunrise at the Army base outside of Yuma AZ. Can't beat the morning sunrise there, nothing in the way. Oh yeah, this also reminds me of - 'blood has been spilt this night' -from LOTR

    #desert   #sunrise   #ypg   #lotr   #bloodhasbeenspiltthisnight  
  • 2017.11.28 AD at 11:56 EST
    Mark Espinoza

    Midtown Atlanta GA

    Just some black and white in Midtown ATL GA.

    #bw   #midtown  
  • 2017.11.26 AD at 19:35 EST
    Mark Espinoza

    LED Tree

    It folds up, comes with LED lights and no needles to clean up, yeah we be taking this one. The lights come in colors and warm too.

    #t1000tree   #xmas   #foldingledtree  
  • 2017.11.22 AD at 15:02 EST
    Mark Espinoza

    Turkey Time

    Just deep frying some turkey. Got the fryer, turkey, beer, dog and tactical fryer gauge.

    #fall   #turkey   #tacticalfryergauge   #deepfriedturkey   #xmasbeer  
  • 2017.11.20 AD at 08:19 EST
    Mark Espinoza

    Old Fall

    Some older fall photos, plus chance to test the image grid that displays them.

    #fall   #imagegrid   #dev  
  • 2017.11.19 AD at 14:08 EST
    Mark Espinoza

    Reminder to Add HashTag Links

    Reminding myself to add hash tag links on the side that point to a list of relevant posts.

    #dev   #tapestry5   #hashtags   #reminder  
  • 2017.11.19 AD at 12:49 EST
    Mark Espinoza

    New Feature - Login, continued from last post

    So figured out how to handle logins for this site. Basically, I want to stay session free as long as possible. I login and create a session state object. It's automagically available to all pages as long as I inject it. New login service too, with it's own template (a bootstrap modal). Update to the session timeout.

    #tapestry5   #newfeature   #dev   #login  
  • 2017.11.19 AD at 11:29 EST
    Mark Espinoza

    New Feature (new to me)

    So just added the the ability to post from anywhere by providing a secure login, upload capability, with pics, hash tags etc.. I can select from pictures I just added or from all pictures to create a post. I wanted something where I didn't have to use the pictures I just added in a post. So I'm taking pictures and I don't know what I'm going to write, I log back in later and pick which pics I want to use in my new post. The pics are saved as byte arrays in PostgreSQL with the help of a few lines of code to do the conversion(file => input stream => byte array). Now I just have to worry about server space :(

    #newfeature   #dev   #tapestry5  
  • 2017.11.18 AD at 10:09 EST
    Mark Espinoza

    New supplement - Brain Force

    Better than caffeine but only provable after you get off the caffeine for a couple months. Just got off myself and took some nascent iodine to help flush my system. I feel so much better, with no cloudiness in my thinking. The brain force is not daily, maybe weekly as it is more expensive than coffee but cheaper than a daily Starbucks(caramel mocchiato) even on daily basis. It's good for a long, all day coding session or when you know you have to figure something out but don't want to drink a gallon of coffee. Personally since I just got off the caffeine I limit myself to use it when I want a small boost but no edge. It's more of a supplement high to the likes of taking B-12 and amino-acids with fruit before a workout - and maybe after. Good stuff.

    #caffeine   #supplement   #brainforce   #infowars  
blog Index