This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | |
* under one or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information regarding copyright | |
* ownership. Camunda licenses this file to you under the Apache License, | |
* Version 2.0; you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Castle.MicroKernel.Lifestyle; | |
using Castle.Windsor; | |
using System; | |
using System.Net.Http; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Dispatcher; | |
using Library.Api.Web; | |
namespace Library.Api.Windsor | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# i can haz python 2.6.6+ | |
with open('file.txt') as f: | |
lines = f.readlines() | |
for l in lines: | |
if 'safeChange' in l: | |
lines[lines.index(l)] = 'nyan nyan nyan' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
// when the document has finished loading... | |
window.onload = function() { | |
// get the element with my_link as ID, and bind a callback for the onclick event | |
document.getElementById("my_link").onclick = function() { | |
// change the CSS style declared when the link is clicked | |
document.getElementById("my_div").innerHTML = '<p>A new paragraph</p>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char * trim_space(char *str) { | |
char *end; | |
/* skip leading whitespace */ | |
while (isspace(*str)) { | |
str = str + 1; | |
} | |
/* remove trailing whitespace */ | |
end = str + strlen(str) - 1; | |
while (end > str && isspace(*end)) { | |
end = end - 1; |