1 2 Ambtion.com 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 Ambtion.com 279 280 281 Advertise Free on Auto-pilot!
Watch the latest videos on YouTube.com
newgoldenjewels: April 2019

Tuesday, April 2, 2019

Website Updates, Part 1

I finished mapgen4 last week and wanted to "sharpen my tools" before I started the next project. My website is over 20 years old and spans 5 domains. The build process has grown over time, supporting all the different tools I've used over the decades.

There are a few features I've wanted to add to my static site generator:

  1. Versioning of js, css resources so that I can increase the expiration cache time. This should improve load time. I've been doing this manually and want to automate it.
  2. Dependency tracking, so that if something includes another thing, and that thing changes, the first thing gets rebuilt. This should reduce content mismatch errors.
  3. Custom macros for each project that get expanded at build time. This should make it easier to write new pages.

The current system is mostly based on XHTML with my own custom tags. For example, <x:published> lets me mark a publish date at the top of the page, <x:draft> lets me mark the page as a draft/beta, and <x:nocomments> lets me turn off comments on a page. I use regular expressions and XSLT for transforming the XHTML into HTML, expanding the custom tags and also adding custom transforms for existing tags. I'd like to add project-specific tags to this.

I wanted to replace the sed + xsltproc bash script with a Python program. Once I have the XHTML read into Python, I can add versioning, record dependenies, and add custom macros. Also in Python, I can also manage the site build, including generating sitemaps for search engines, determining what to rebuild, and uploading to the server.

I decided to start with the code for processing a single XHTML file:

  1. A bunch of sed commands to perform regular expression substitutions.
  2. SmartyPants.pl for converting regular quotes to "smart quotes".
  3. The xsltproc command.

What are the Python alternatives to each of these?

(1) The regular expression substitutions are easy to do in Python.

(2) For SmartyPants.pl, I evaluated the Python port, smartypants.py, which would allow me to run this step in memory instead of invoking a separate process. I like the library, and it offers many useful options that would be an improvement over the Perl script, including being able to exclude my custom tags. Unfortunately it doesn't produce the same output. Two examples:

  • instead of <tag>Name</tag>'s (close) it produces <tag>Name</tag>'s (open)
  • instead of "<tag>...</tag>" (open,close) it produces "<tag>...</tag>" (open,open)

When the character before the quote crosses a tag, it seems to not take that into account when deciding open or close quotes, and it ends up outputting an open quote when it should output a close quote. I looked through the Perl and Python code and couldn't figure out how the Perl code was handling these cases.

I decided to look through existing issues on the project page, and file one if there weren't any existing ones matching this situation. Unfortunately the repository has been deleted. The documentation says the maintainer is looking for someone to take over. So it seems like the project is abandoned.

I also started wondering if I can reimplement the algorithm myself. Before going down that rabbit hole, I decided to stick to abandon this change. This means I'll have to pipe everything through an external process, and I won't be able to handle custom tags.

(3) The next step was to look at an alternative to xsltproc. Python has a library called lxml that can do lots of nice things, including XSLT transforms. That means it should be able to take my existing XSLT file and apply it to the XHTML documents, producing HTML documents. But can it?

Yes! It worked beautifully. And it gave me back a parse tree which would allow me to easily add versioning and dependency tracking, the main features I wanted to add. Here's how I ran it:

# Load the XSLT, and allow it to use xi:include xsl = etree.parse(open(xslt_filename, 'r')) xsl.xinclude()  # Load the document, and allow it to use xi:include bxml = etree.parse(open(document_filename, 'r')) bxml.xinclude()  # Apply the XSLT to the document html = etree.XSLT(xsl)(bxml) sys.stdout.write(str(html)) 

The output was exactly the same as using xsltproc. I'm very happy with lxml! It's easy to use and allows me to add the features I wanted.

Except …

Switching from sed + xsltproc slowed down the builds quite a bit, from 0.2s to 0.7s for a single file. That means it no longer feels instantaneous. The full build went from 65s to 200s. I'm sure I can speed up the full build, but I don't have an easy way to speed up the development builds. The startup is too long, and I didn't find any easy ways to fix that.

So I decided to abandon this change.

It's always hard to abandon things you spent time and energy designing and implementing. But it's sometimes the best thing to do.

I stepped back and looked at my main goals:

  1. Versioning of js, css resources
  2. Dependency tracking
  3. Custom macros for each project

How important are these? Can I implement them a different way, while keeping the development builds fast?

  1. I don't need versioning for development builds.
  2. I might not need dependency tracking for development builds.
  3. I haven't needed custom macros so far and can live without them.

My new plan is to keep the sed + xsltproc for development builds, and inject version numbers for the production build only. I'm undecided about how I'll implement dependency tracking. In part 2 I'll describe how I implemented these. I will leave custom macros for another time.

Download Just Cause 4 Compressed Version For 5$

Download Just Cause 4 Compressed version for  5$

| Just Cause 4 [ Uncracked ] | FULL UNLOCKED |




 Platform:  PC
 Size: 50.8 Gb
 ژانر بازی : اکشن
 File Type: RAR
 Game Language: English
 Publisher: Tarsier Studios
 Game Price: 5$
.
  Minimum System Requirements:
OS: Windows 7 SP1 with Platform Update for Windows 7 64-bit
Processor: Intel Core i5-2400 @ 3.1 GHz | AMD FX-6300 @ 3.5 GHz or better
Memory: 8 GB RAM
Graphics: NVIDIA GeForce GTX 760
DirectX: Version 11
Storage: 59 GB available space





Download links
Direct Link

password: After Payment Is Done

Monday, April 1, 2019

PUBG LITE PC Free Download Only In 500MB

How To Download PUBG PC LITE For Pc And Laptop With Free Vpn Only In 500MB.




===============================================

How To Install PUBG Only In 40MB without Errors and Problems


===============================================

🔶🔴🔶🔶🔴🔶 DOWNLOAD HERE 🔶🔴🔶🔶🔴🔶

🌹 Please use IDM (Internet Download Manager) to download the files without any error.

💘 To Download Latest Movies In 720P & 1080P Visit My Other Site :- https://worldfree4utechno.blogspot.com/

 1- PUBG PC LITE Part 1 (500MB):-

Download
 ------------------
2- PUBG PC LITE Part 2 (500MB):-

Download
 ------------------
3- PUBG PC LITE Part 3 (500MB):-

Download
 ------------------
4- PUBG PC LITE Part 4 (500MB):-

Download
 ------------------

Download VPN From Here :- Download

Get All Servers Of Thailand From Here :-Download


PUBG LITE Page :- Visite

---------------------------------------------------------------------------------


Please Install "7-zip and WINRAR" to extract the files.

💘 Download Winrar :-
🌹  (32bit PC)
🌹  (64bit PC)


💘 Visual C++ Redistributable 2012 :-
🌹 Download


If your PC has no net framework then, you can
download net framework from here :-

💘 net framework 4.6
🌹 Download


💘 IMPORTANT 💘:-
🌹 ALWAYS DISABLE YOUR ANTIVIRUS BEFORE EXTRACTING THE FILES.
----------------------------------------------

Thank You For Watching My Video.....

We Are Thank Full To You...

And Don't Forget To Subscribe To My Channel...

And Keep Visiting Our Channel, Keep Supporting Our Channel, And Keep Loving Our Channel ...

Thank You So Much................
---------------------------------------------------------------------------------
THANK YOU SOO MUCH FOR VISITING OUR SITE.