Examples of Utilities


Examples of com.lightniinja.kperms.Utilities

        return new KPlayer(player, kperms).getPrimaryGroup();
    }

    @Override
    public String[] getGroups() {
        return new Utilities(kperms).getGroups();
    }
View Full Code Here

Examples of com.ojl.devs.Utilities

public class ReadXMLTest1 {

  public static void main(String argv[]) {
       
    XmlParse xp = new XmlParse("raw\\file.xml");
    Utilities utils = new Utilities();
   
    System.out.println("Root element : " + xp.getRoot(true));
       
    ArrayList<?> elements = xp.getElements((Element) xp.getRoot());
    for (Object element: elements)
    {
      ArrayList<?> lst = xp.getElements((Element) element);
     
      for (Object ele: lst)
      {
        Element elem = (Element) ele;
        String name = xp.getElementName(elem);
        String type = xp.getElementType(elem);
        System.out.println("NAME: " + name + " Type " + type);
        if (name=="nickname")
        {
          ArrayList<?> spl = xp.getElements(elem, true);
          utils.arrayPrint(spl);
         
          ArrayList<String> attrs = xp.getAttributes(elem);
          utils.arrayPrint("Attr: ", attrs);
          for (String attr : attrs)
            System.out.println("Attribute '" + attr  + "' Value: " + xp.getAttribute(elem, attr));
        }
           
      }
View Full Code Here

Examples of org.apache.roller.planet.util.Utilities

            // Build context with current date
            VelocityContext context = new VelocityContext();
            context.put("date", new Date());
            // TODO fix: Use one utilities model and not one of the below
            //context.put("utils", new UtilitiesModel());
            context.put("utilities", new Utilities());
            context.put("planet", new StaticPlanetModel());
           
            // Ensure that output directories exists, one for each group
            File outputDirObj = new File(outputDir);
            if (!outputDirObj.exists()) outputDirObj.mkdirs();
View Full Code Here

Examples of org.apache.roller.util.Utilities

                context.put("group",
                        planet.getGroup(request.getParameter("group")));
            }
            context.put("planet", planet);
            context.put("date", new Date());
            context.put("utilities", new Utilities());
           
            int entryCount =
                RollerRuntimeConfig.getIntProperty("site.newsfeeds.defaultEntries");
            int maxEntries =
                RollerRuntimeConfig.getIntProperty("site.newsfeeds.maxEntries");
View Full Code Here

Examples of org.apache.roller.util.Utilities

        // Only the plainFormat is specified here, because it is used to render
        // the Entry Day link.
        ctx.put("plainFormat", "yyyyMMdd");
       
        ctx.put("page",            TemplateWrapper.wrap(rreq.getPage()));
        ctx.put("utilities",       new Utilities() );
        ctx.put("stringUtils",     new StringUtils() );
        ctx.put("rollerVersion",   rollerCtx.getRollerVersion() );
        ctx.put("rollerBuildTime", rollerCtx.getRollerBuildTime() );
        ctx.put("rollerBuildUser", rollerCtx.getRollerBuildUser() );
        ctx.put("newsfeedCache",   NewsfeedCache.getInstance() );
View Full Code Here

Examples of org.apache.roller.util.Utilities

     * Load miscellaneous values into the Context.
     * @param rollerCtx
     */
    private void loadTheRest(RollerContext rollerCtx)
    {
        ctx.put("utilities",       new Utilities() );
        ctx.put("stringUtils",     new StringUtils() );       
        ctx.put("entryLength",     new Integer(-1));
    }
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.Utilities

                        chunks.add( new long[]{ i, chunk_size });
                       
                        i += chunk_size;
                      }
                                       
                      Utilities utils = plugin_interface.getUtilities();
                     
                      try{
                        RandomAccessFile raf = new RandomAccessFile(f, "r" );
                       
                        while( !chunks.isEmpty()){
                         
                          long[] chunk = chunks.remove((int)(Math.random()*chunks.size()));
                         
                          final long  position   = chunk[0];
                          final int  size    = (int)chunk[1];
                         
                          raf.seek( position );
                         
                          byte[] buffer = new byte[ size ];
                         
                          raf.read( buffer );
                         
                          int  piece_number   = (int)(position/piece_size);
                          int  piece_offset  = (int)(position % piece_size);
                                             
                          dm.write(
                            piece_number,
                            piece_offset,
                            utils.allocatePooledByteBuffer( buffer ),
                            new DiskManagerWriteRequestListener()
                            {
                              public void
                              complete(
                                DiskManagerWriteRequest    request )
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.Utilities

  }
 
  public InetAddress
  getDefaultPublicAddress()
  {
    Utilities utils = PluginInitializer.getDefaultInterface().getUtilities();
   
    InetAddress address = utils.getPublicAddress();
   
    if ( address != null ){
     
      return( address );
    }
   
    return( utils.getPublicAddress( true ));
  }
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.Utilities

           
            swt = (UISWTInstance)instance;
           
            uiQuickInit();

            Utilities utilities = default_pi.getUtilities();
           
            final DelayedTask dt = utilities.createDelayedTask(new Runnable()
              {
                public void
                run()
                {
                  Utils.execSWTThread(new AERunnable() {
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.Utilities

  View newView;
  static int total_ip_count;
 
  public void initialize(PluginInterface pluginInterface) {
    this.pluginInterface = pluginInterface;
    Utilities utils = pluginInterface.getUtilities();
    UIManager  ui_manager = pluginInterface.getUIManager();
    BasicPluginConfigModel config_model = ui_manager.createBasicPluginConfigModel( "plugins", "plugin.AzTrackerFind");
    total_ip_count = 0;
    config_model.addBooleanParameter2("AutoOpen","AzTrackerFind.auto.open",false);
    config_model.addIntParameter2( "timeout_value", "AzTrackerFind.timeout.value", 30);
    config_model.addIntParameter2("AzTrackerFind_port1","AzTrackerFind.port1",6969 );
    config_model.addIntParameter2("AzTrackerFind_port2","AzTrackerFind.port2",0 );
    config_model.addIntParameter2("AzTrackerFind_port3","AzTrackerFind.port3",0);
    config_model.addStringParameter2( "AzTrackerFind_url_user","AzTrackerFind.url.user","username");
    config_model.addStringParameter2("AzTrackerFind_url_password", "AzTrackerFind.url.password", "password");
    config_model.addBooleanParameter2("AzTrackerFind_autoinsert","AzTrackerFind.autoinsert",false);
    config_model.addBooleanParameter2("MilitaryTime", "AzTrackerFind.military.time", false);
    BooleanParameter enable = config_model.addBooleanParameter2("AutoDownload","AzTrackerFind.auto.download",false);
    String default_dir = pluginInterface.getPluginDirectoryName() + System.getProperty("file.separator") + "torrents";
    DirectoryParameter enabled_dir = config_model.addDirectoryParameter2("AutoDownload_dir","AzTrackerFind.autodownload.dir",default_dir);
    enable.addEnabledOnSelection( enabled_dir );
    if (utils.isLinux())
        {
      config_model.addStringParameter2("AzTrackerFind_url_commandline", "AzTrackerFind.url.commandline","firefox");
        }
        else if (utils.isOSX())
        {
          config_model.addLabelParameter2("AzTrackerFind.url.maclabel");
        }
    else
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.