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
// Licensed under the Apache License, Version 2.0 (the "License"); 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 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
// License for the specific language governing permissions and limitations under |
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
import java.util.concurrent.TimeUnit; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Main | |
{ | |
private static long parseInterval(final String s) | |
{ | |
final Pattern p = Pattern.compile("^(\\d{2}):(\\d{2}):(\\d{2})\\.(\\d{3})$"); | |
final Matcher m = p.matcher(s); |
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
import java.util.Date; | |
public class PermissionManager | |
{ | |
public static AssignPermission grantUser(final String user) | |
{ | |
return new Rights(user); | |
} | |
private static class Rights implements AssignItem, AssignPermission, SetDate |
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
import java.util.*; | |
public class InsertionOrderSet<E> implements SortedSet<E> | |
{ | |
private final SortedSet<IndexedEntry<E>> bs; | |
public InsertionOrderSet(final E[] e) | |
{ | |
this(Arrays.asList(e)); | |
} |
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
#include <cstdint> | |
#include <stdio.h> | |
template<typename T, size_t SIZE> | |
size_t getSize(T (&)[SIZE]) { | |
return SIZE; | |
} | |
typedef std::uint_fast8_t byte; |
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
#!/bin/sh | |
find . -name '*.[jwes]ar' | while read LINE; do grep -q $1 "$LINE"; if [ $? -eq 0 ];then echo "$LINE"; jar tvf "$LINE" | grep $1;echo;fi;done |
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
package com.gm.gbrd.prefs; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.Properties; | |
/** | |
* This class is very very resource intensive and should only be used for diagnostic purposes, it should never | |
* be used in production code, Thread.currentThread.getStackTrace() is a very expensive operation, this was created |
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
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.gm.gbrd.FormattedRuntimeException; | |
import javax.annotation.Nonnull; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.util.EventObject; | |
public class NodeChangeEvent extends EventObject | |
{ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.3/weblogic-application.xsd"> | |
<application-param> | |
<param-name>webapp.encoding.default</param-name> | |
<param-value>UTF-8</param-value> | |
</application-param> | |
</weblogic-application> |
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
import javax.management.InstanceAlreadyExistsException; | |
import javax.management.JMX; | |
import javax.management.MBeanRegistrationException; | |
import javax.management.MBeanServer; | |
import javax.management.MalformedObjectNameException; | |
import javax.management.NotCompliantMBeanException; | |
import javax.management.ObjectName; | |
import java.lang.management.ManagementFactory; | |
public class MyApp |
OlderNewer