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
class Reverse { | |
public static void main(String[] args) { | |
reverse("abcde"); | |
} | |
public static void reverse(String str){ | |
char[] str_arr = str.toCharArray(); | |
int start = 0, | |
end = str_arr.length-1; |
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
template "/etc/sysconfig/iptables" do | |
source "iptables.erb" | |
owner "root" | |
group "root" | |
mode "0600" | |
end | |
# Ensure that the iptables file adheres to the selinux requirements | |
execute "chcon" do | |
command "chcon system_u:object_r:system_conf_t:s0 /etc/sysconfig/iptables" |
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
args = ['-f', 'my_build.xml', 'my_target1'] | |
task :call_ant do | |
ant args | |
end |
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
# -*- encoding: utf-8 -*- | |
$:.push File.expand_path("../lib", __FILE__) | |
require 'mygem/version' | |
Gem::Specification.new do |s| | |
s.name = "MyGem" | |
s.version = MyGem::VERSION | |
s.authors = ["strife25"] | |
s.email = [""] |
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
mygem/ | |
lib/ | |
mygem/ | |
system_gateway.rb | |
version.rb | |
providers/ | |
build_provider.rb | |
engine_provider.rb |
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
11/07/15 19:53:07 ERROR namenode.NameNode: java.io.IOException: failure to login | |
at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:408) | |
at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:384) | |
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.setConfigurationParameters(FSNamesystem.java:420) | |
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:391) | |
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1240) | |
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1348) | |
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1368) | |
Caused by: javax.security.auth.login.LoginException: java.lang.NullPointerException | |
at com.ibm.security.auth.module.LinuxLoginModule.login(LinuxLoginModule.java:165) |
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
<%= f.label :grade %> | |
<%= f.select(:grade, (["K"] | (1..12).to_a))%> |
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
SQL (2.8ms) describe `roles_users` | |
SQL (2.1ms) describe `camps_users` | |
SQL (3.4ms) describe `camps_users` | |
SQL (2.0ms) describe `campers_camps` | |
SQL (2.8ms) describe `campers_camps` | |
SQL (2.1ms) describe `roles_users` | |
Loaded suite test/functional/camp/contacts_controller_test | |
Started | |
SQL (0.1ms) BEGIN | |
SQL (0.7ms) SHOW TABLES |
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
test "get collection of open programs" do | |
get :index, :camp_id => camps(:bolo).uri, :open => true | |
assert_response :success | |
programs = assigns(:programs) | |
programs.each do |program| | |
program.program_populations.each do |pop| | |
assert_not_equal pop.current_population, pop.max_population | |
end |
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
def get_camp | |
@camp = Camp.find_by_uri(params[:camp_id]) | |
if !@camp | |
#call parent 404 method because no record was found | |
#ActiveRecord::RecordNotFound is not being called | |
self.render_400 | |
end | |
end |