background preloader

Jnikolai

Facebook Twitter

Jeremy Nikolai

Organic Seaweed Fertilizer How To Make. Glenn Slayden - Linked Dictionary for MRU (most-recently used) lists. Replace Entire Function Bodies with Inline IL in C# May 10, 2011 This complete utility program, ILFunc, allows entire C# function bodies to be automatically replaced with IL code, where the IL code is specified inline in the C# file, via a CLR custom attribute. In the following example, the C# function—which gets entirely replaced—happens to use managed pointers, but it could be any C# function. The ILFunc utility always replaces the entire function body.

The IL must be compatible with ILASM syntax, and include the .locals directive, if any. Here is the source code for the utility. ILFunc works by loading your assembly into the reflection-only context, in order to accurately extract the attribute data (your IL code) and the function(s) it is associated with. Special attention is given to line number information such that you can single-step your IL code in the VS debugger and set breakpoints on individual IL lines, if desired.

Ember.js - A framework for creating ambitious web applications. Going Beyond grep for Searching Source Code. For developers who live on the command line, a shell prompt (bash or zsh) and an editor (vi or emacs) are the only IDE (integrated development environment) we need.

For searching trees of source code, grep and maybe find will suit our needs. grep will search whatever files you may have, but it wasn’t designed for source code, and so it doesn’t always deliver optimal results. Although grep is ubiquitous, there are other useful ways to search your source code. I created one of them, ack, back in 2004, and another, ag was adapted from ack in 2012. Let’s take a look at what they offer: What is ack? First, ack doesn’t require specifying filenames to search. The first big difference you’ll see with ack is that its output is more oriented to human-readability.

And here’s searching for print with ack. A handy option for dealing with case-insensitive matches was taken from the vim editor: smartcase. Don’t worry about learning an entirely new set of options. Along comes ag ack offers custom output ag. Going Beyond grep for Searching Source Code.

Oculus

Using Git Inside of Sublime Text to Improve Workflow. Improving workflow and increasing productivity is very important to us developers. Every second counts since the time we spend on small tasks adds up. Small tasks like our Git commands are something that we do on a daily basis. Today we’ll be looking at a quick way to improve our Git workflow with our favorite editor, Sublime Text. Here’s a quick example of how fast Git works within Sublime Text. Requirements Let’s run through the things we’ll need to improve our Git workflow real quick. Git (of course)Sublime Text (duh)Sublime Text Git – Install using Package Control (ctrl + shift + p) Git Installation for Windows User: When installing Git, make sure you select Run Git from the Windows Command Prompt.

Git Through Command Line Usually when I am working in Sublime Text and want to commit some changes, I will switch over to my terminal window and type the following: git add -Agit commit -m 'some crazy stupid message here'git push Git Within Sublime Text Commit vs Quick Commit More Advanced Usage. Scotch ♥ Developers bringing fire to the people. Overview. Hummingboard - Powerful Linux Single Board Computer. Banana Pi - A Highend Single-Board Computer. Recipe-Website-Tutorial/jquery-and-ajax.rst at master · pigeonflight/Recipe-Website-Tutorial.

AJAX with jQuery — Flask 0.11-dev documentation. jQuery is a small JavaScript library commonly used to simplify working with the DOM and JavaScript in general. It is the perfect tool to make web applications more dynamic by exchanging JSON between server and client. JSON itself is a very lightweight transport format, very similar to how Python primitives (numbers, strings, dicts and lists) look like which is widely supported and very easy to parse. It became popular a few years ago and quickly replaced XML as transport format in web applications. Loading jQuery In order to use jQuery, you have to download it first and place it in the static folder of your application and then ensure it’s loaded. Another method is using Google’s AJAX Libraries API to load jQuery: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script>window.jQuery || document.write('<script src="{{ url_for('static', filename='jquery.js') }}">\x3C/script>')</script> Where is My Site?

Do you know where your application is? The HTML. Saltycrane/flask-jquery-ajax-example. If the Moon Were Only 1 Pixel. Mercury Venus Earth You Are Here Moon Mars Jupiter Io Europa Ganymede Callisto Saturn Titan Uranus Neptune Pluto(we still love you) That was about 10 million km (6,213,710 mi) just now. Pretty empty out here. Here comes our first planet... As it turns out, things are pretty far apart. We’ll be coming up on a new planet soon. Most of space is just space. Halfway home. Destination: Mars! It would take about seven months to travel this distance in a spaceship.

Sit back and relax. When are we gonna be there? Seriously. This is where we might at least see some asteroids to wake us up. I spy, with my little eye... something black. If you were on a road trip, driving at 75mi/hr, it would have taken you over 500 years to get here from earth. All these distances are just averages, mind you. If you plan it right, you can actually move relatively quickly between planets. Pretty close to Jupiter now. Sorry. Lots of time to think out here... Pop the champagne! We're always trying to come up with metaphors for big numbers. Simple Solar Circuits. Simple Solar Circuits: How to get started adding solar power to your small electronics projects. Use the sun to power small solar and battery powered night lights, garden lights, and decorations for halloween. The first part of a solar circuit is… a device for collecting sunlight. To keep things simple, we’re using a single nicely made small solar panel for all of these circuits.

The panel that we’re using for these circuits is this one, part number PWR1241 from BG Micro, about $3 each. This is a monolithic copper indium diselenide solar panel, apparently printed on a 60mm square of glass and epoxy coated for toughness. [Before we move onto our first examples, a word of caution: These are small simple circuits. Direct Drive: The most obvious way to use power from a solar panel is to connect your load directly to the output leads of the solar panel. Here are a couple of examples of this in practice: Interruption-resistant direct drive: Adding a battery Detecting Darkness.

Fonts

Prismic.io. Games. Bug identification! All insects, spiders, crustaceans, etc. welcome! Introduction. Hey there, it appears your Javascript is disabled. That's fine, the site works without it. However, you might prefer reading it with syntax highlighting, which requires Javascript! About this tutorial This is the beginning of Learn You Some Erlang for Great Good!

Reading this tutorial should be one of your first steps in learning Erlang, so let's talk about it a bit. First of all, I began growing the idea of writing this after reading Miran Lipovača's Learn You a Haskell for great Good! So here I am typing this. This book thus wants itself to be a way to learn Erlang for people who have basic knowledge of programming in imperative languages (such as C/C++, Java, Python, Ruby, etc) and may or may not know functional programming (Haskell, Scala, Erlang, Clojure, OCaml...). So what's Erlang? First of all, Erlang is a functional programming language. 1.y = 2 2.x = y + 3 3.x = 2 + 3 4.x = 5 Had I added the following: 1.x = 5 + 1 2.x = x You would have been very confused. 1.x = add_two_to(3) = 5 4.x = x.

Django

Linux. Amazing Animations of Fruit and Vegetable MRIs. Corn Broccoli Garlic Starfruit Andy Ellison works at the BU medical school in Boston where he frequently works with a research-only MRI scanner. Over the past few months he’s been sharing some fantastic animated gifs of his calibration and quality control scans using assorted fruits, vegetables and other plants. As you can see the results are absolutely mesmerizing and I urge you to check out his blog, Inside Insides, for many more scans and hi-res images. The Geometric Food Art of Sakir Gökçebag. And I have trouble cutting a sandwich on a perfect diagonal for my son. From watermelons to green beans and apples to pomegranates, Turkish photographer Sakir Gökçebag slices common fruits and veggies to create striking geometric arrangements. To clarify: the photos you see here haven’t been digitally manipulated but are instead the result of meticulously precise cutting worthy of a surgeon.

If you want to see more I strongly urge you to check out the installations and photography projects on his website. (via designboom)

Youtube

Introduction. Pi. The Swift Programming Language: A Swift Tour. Tradition suggests that the first program in a new language should print the words “Hello, world” on the screen. In Swift, this can be done in a single line: If you have written code in C or Objective-C, this syntax looks familiar to you—in Swift, this line of code is a complete program. You don’t need to import a separate library for functionality like input/output or string handling. Code written at global scope is used as the entry point for the program, so you don’t need a main function. You also don’t need to write semicolons at the end of every statement. This tour gives you enough information to start writing code in Swift by showing you how to accomplish a variety of programming tasks. Don’t worry if you don’t understand something—everything introduced in this tour is explained in detail in the rest of this book. Simple Values Use let to make a constant and var to make a variable.

Var myVariable = 42 myVariable = 50 let myConstant = 42 Control Flow var optionalString: String? 3G Internet on Raspberry Pi – Success! This is a bit of a brain dump of how I got a 3G USB dongle working on the Raspberry Pi. Following on from getting the Raspberry Pi to send SMS. That's The Power Of Love The first thing to say is use a powered USB hub! I had lots of problems getting the modem working when it was plugged directly into the Pi. A 3G signal takes more power than the Pi's USB sockets can supply. In the above image, you can see that the Raspbery Pi is plugged into the mains - via a 1.8A plug. The USB cable has two male ends. I used a USB Y Cable to supply power and data. I also tried plugging both plugs into the Pi - that didn't work either. Rather than use two plugs, I'm going to try to find a mains plug with two USB sockets.

Or, you can use a cable like this. Put one male USB plug into the PI and the other into a power supply. P-p-p-p-pick Up A PPPD In order to get our network connected, we need to install the ppp package. sudo apt-get install ppp If You Think I'm Sakis, And You Want My Body... Sakis says it is:

Data

Hacking. Deep Space Settlement - a 4X RTS. Trouble Extracting with DotNetZip | Unity Community. BreakFree. Interactive Game of Thrones Map with Spoilers Control. Serialization Formats. CIL. Food. GOONS WITH SPOONS - Raw Cashew Dreamcake. From Gwswiki Recipe by: PezMaster Uploaded by Drimble Wedge Picture from 1/2 cup raw almonds (pecan or walnuts will also work) 1/2 cup soft Medjool dates 1/4 tsp. sea salt 1-1/2 cups raw cashews, soaked overnight juice of 2 lemons 1 vanilla bean 1/3 cup raw coconut oil (melted) 1/3 cup agave nectar 1 cup raspberries (I use frozen ones that I've picked over the summer) 1. Place nuts and dates in a food processor with sea salt and pulse to chop until they are to your desired fineness (process a finer crust longer than a chunky one).

Test the crust by spooning out a small amount of mixture and rolling it in your hands. 2. 3. 4. 5. Install Android Studio in Linux Mint 16. Injecting Code With Mono.Cecil. I'm working on a networking system for Unity which uses Cecil to inject code into the assemblies. Currently I have the following code to do this via an Editor script: [InitializeOnLoad]static class AssemblyPostProcessor{ static AssemblyPostProcessor() { // ... // Inject code into assemblies if needed // ... if( anyAssembliesWereChanged ) { UnityEditorInternal.InternalEditorUtility.RequestScriptReload(); } }} It seemed to be working - if I decompile the assemblies with ILSpy they show the injected code is there.

However, when I run the game in the editor, it behaves as if the assembly has not been updated. Not just that the injected code isn't there, but changes I've made to scripts have not been applied either. If I close the Unity editor and open it again, then the updated code appears to run. Static Method Interception in .NET with C# and Mono.Cecil. I was having a discussion at the speaker dinner for Richmond Code Camp 2009.1 with Kevin Hazzard and Al Tenhundfeld talking about rewriting static methods with .NET.

Al was doing a talk on Intro To Mocking and had downloaded and implemented TypeMock Isolator in order to show people that an option was available for testing legacy code which was not written in a way which allowed for easy interception. He was curious about how TypeMock Isolator worked in order to do its runtime modification of static methods. Since I have never really looked too deeply into the subject, I wasn’t entirely sure of the answer. I knew that TypeMock had a required runner that it used in order to execute its tests, and so I conjectured that there might be some kind of post-compile step ala Postsharp or Mono.Cecil that was occurring. After I found this out, I honestly wasn’t really interested in the implementation anymore.

When we run this, we see this on the console: Very simple. Be Sociable, Share! Chris DeLeon's Blog - Reasons for Modest First Projects and Incremental Learning. The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community. The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.

I asked another question to the community with @HobbyGameDev on Twitter recently. For the most part the responses were incredibly illuminating about what challenges new game developers were experiencing. I love these kinds of questions and responses since it helps keep me firmly connected to people's real needs. Although I was able to field a number of exchanges within @reply tweets, the most important one to address that couldn't fit in that space is perhaps this exchange: I want to be clear that I am in absolutely no way intending to draw any negative attention, attitudes, or ill-will toward our good friend in the world, Orange Rectangle (or O.R., for short). It did not. I offer the following to our friend O.R., and of course to others who may share his mindset: Dear O.R Where I'm Coming From. How created my own Procedural Textures for Unity3d | Dented Pixel.

Unity Developers: Tell me about the plugins you use and your experiences with them. : Unity3D. Wrapper for Unity 3D heatmaps and easy integration.