Rectangle 27 4

Don't forget to use the same name for the parameter and for the input ...

Are really uploading data? I'd suggest you use this way. Create a parameter of type HttpPostedFileBase with the same name as the input field and test for its content length property.

Thanks for your quick feedback, means alot i changed the action to read [HttpPost] public ActionResult Accreditation(Accreditation accreditation, HttpPostedFileBase Passport) { } New error Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

@Edgar Ochieng, please, post the new code in the answer so we can have a look at it.

c# - Uploading files with MVC 3 - Stack Overflow

c# file asp.net-mvc-3 upload
Rectangle 27 12

The best, to my mind, what you can do, is to rename all the checkboxes, by adding some prefix to their ids, for example input

<ul>
    <li>
     <input type="checkbox" id="input_prologue" />
     <label for="input_prologue">prologue</label>
    </li>
    <li>
     <input type="checkbox" id="input_chapter" />
     <label for="input_chapter">chapter</label>
    </li>
    <li>
     <input type="checkbox" id="input_summary" />
     <label for="input_summary">summary</label>
    </li>
    <li>
     <input type="checkbox" id="input_etc" />
     <label for="input_etc">etc</label>
    </li>
   </ul>

This way you will not have any conflicts with other ids on a page, and clicking the label will toggle the checkbox without any special javascript function.

html - How can I use the FOR attribute of a LABEL tag without the ID a...

html input label for-loop
Rectangle 27 17

The JSF client ID's are prepended by the cliend ID of parent UINamingContainer components (e.g. h:form, h:dataTable, f:subview). If you check the generated HTML source in your webbrowser (rightclick, view source), then you should see them. The id and name of the generated input elements are prepended with the id of the parent form. You need to use the same name as key in the parameter map. As the separator character, the colon :, is an "illegal" character in EL, you need to use the brace notation param['foo:bar'] to retrieve them.

<f:view>
    <h:form id="account">
        <div>
            <label>Id</label>
            <h:inputText id="id" />
        </div>
        <div>
            <label>Amount</label>
            <h:inputText id="amount" />
        </div>
        <h:commandButton value="Withdraw" 
            action="#{accountService.withdraw(param['account:id'], param['account:amount'])}"/>
    </h:form>
</f:view>

Without Seam-EL-like method parameters (you apparently don't want/have it), you can also access them in the request parameter map using the client ID's as keys:

public void withDraw() {
    Map<String, String> map = FacesContext.getCurrentInstance().getRequestParameterMap();
    String id = map.get("account:id");
    String amount = map.get("account:amount");
    // ...
}

Needless to say that this is nasty. Just do it the normal JSF way, bind the values with bean properties.

Edit: as per the final question which you have edited:

<h:inputText

This is already answered before. Use the JSF-generated name as parameter name. This is usually in the pattern of formId:inputId where formId is the id of the parent UIForm component and the inputId is the id of the UIInput component. Check the generated HTML output for the exact name of the generated <input type="text"> field. To obtain the parameter value, use the brace notation ['name'], because you cannot use the colon : in EL as in ${param.formId:inputId}.

#{param['formId:inputId']}

Hm, this was your own answer and this was supposed to work? Well, I can only hint to check the generated HTML output to see if the names are right and/or if they are available in the request parameter map.

So you're saying that you actually have a h:inputText in your JSF page and not <input>? This way you need to give it (and the parent form) an id and get the param with the generated client ID as key. I'll edit my answer soon.

They are in the request parameter map. Have you for instance debugged its contents? System.out.println(requestParameterMap); so that you can see them and the patterns?

@BalusC - I think it is worth pointing out that: A) the parameter used by a component is an implementation detail of the renderer; B) the exact form of the clientId is an implementation detail (JSF 2 lets you change the delimiter, for example).

binding - How do I retrieve a JSF component value by using EL? - Stack...

jsf binding components seam
Rectangle 27 1

You could try to use a configuration file either in YAML or JSON maybe. Then use the directory as a parameter in your expand or in the input/output of your rules.

i don't think this will work as i still need to pass the parameter into the script and my script doesn't take that parameter yet

shell

snakemake: is there a way to specify an output directory for each rule...

snakemake
Rectangle 27 3

You are using Python 2 for which the input() function tries to evaluate the expression entered. Because you enter a string, Python treats it as a name and tries to evaluate it. If there is no variable defined with that name you will get a NameError exception.

To fix the problem, in Python 2, you can use raw_input(). This returns the string entered by the user and does not attempt to evaluate it.

Note that if you were using Python 3, input() behaves the same as raw_input() does in Python 2.

Why is the function is designed in such a way. The purpose of the function is to just accept the input. What is the need of evaluation of what has been input.

@darth_coder: the purpose of raw_input() is to just accept input and return it as a string. input() is different; it evaluates the input. That's how these two functions are defined. Since raw_input() was renamed to input() in Python 3, and input() removed altogether, it seems that it was not worth the confusion caused by the poorly named (IMHO) input() function. What purpose could it have? If you want to execute user input is one obvious application.

@mhwake fine but I wanted to understand the design semantic behind the input function. I am still confused on what exactly it means to evaluate the input.

@darth_coder: in Python 2 input() is equivalent to eval(raw_input()), so that's what it means to "evaluate the input". Read what eval() does for more details. As I suggested, one reason for the existence of input() is so that you can easily evaluate user input. If that is not a satisfactory explanation then I think that your question reduces to "what is the purpose of eval()?" because that is ultimately what is going on.

Python Traceback (most recent call last) - Stack Overflow

python python-2.7
Rectangle 27 10

apply-template and call-template do not perform the same task, performance comparison is not really relevant here. call-template takes a template name as a parameter whereas apply-template takes an xpath expression. Apply-template is therefore much more powerful since you do not really know which template will be executed. You will get performance issues if you use complex xpath expressions. Avoid "//" in your xpath expressions since every node of your input document will be evaluated.

+1 - I have no real data but I'm pretty sure // is not only slow, but also smells bad.

xslt - Performance: call-template vs apply-template - Stack Overflow

xslt
Rectangle 27 11

Static methods in java belong to the class (not an instance of it). They use no instance variables and will usually take input from the parameters, perform actions on it, then return some result. Instances methods are associated with objects and, as the name implies, can use instance variables.

Java: when to use static methods - Stack Overflow

java static-methods
Rectangle 27 11

Static methods in java belong to the class (not an instance of it). They use no instance variables and will usually take input from the parameters, perform actions on it, then return some result. Instances methods are associated with objects and, as the name implies, can use instance variables.

Java: when to use static methods - Stack Overflow

java static-methods
Rectangle 27 11

Static methods in java belong to the class (not an instance of it). They use no instance variables and will usually take input from the parameters, perform actions on it, then return some result. Instances methods are associated with objects and, as the name implies, can use instance variables.

Java: when to use static methods - Stack Overflow

java static-methods
Rectangle 27 11

Static methods in java belong to the class (not an instance of it). They use no instance variables and will usually take input from the parameters, perform actions on it, then return some result. Instances methods are associated with objects and, as the name implies, can use instance variables.

Java: when to use static methods - Stack Overflow

java static-methods
Rectangle 27 11

Static methods in java belong to the class (not an instance of it). They use no instance variables and will usually take input from the parameters, perform actions on it, then return some result. Instances methods are associated with objects and, as the name implies, can use instance variables.

Java: when to use static methods - Stack Overflow

java static-methods
Rectangle 27 2

\uXXXX is a (short form) universal character name. You can use, say, \u0041 anywhere in your program in place of A -- this can be in the source text, e.g., as part of an identifier, or it can be in a character or string literal. If you use it in a literal, it will be exactly the same as if you used A in that literal. The same applies to the names of characters with encodings longer than 8 bits ... you can use the universal name, or you can enter the character directly if you have an input method that allows you to. How the character is encoded in memory is implementation-dependent, dependent on whether the character appears in an "" or L"" literal, and dependent on whether the character is a member of the execution character set. Note this from the C standard:

Each source character set member and escape sequence in character constants and string literals is converted to the corresponding member of the execution character set; if there is no corresponding member, it is converted to an implementation- defined member other than the null (wide) character.)

In an implementation that uses the UTF-8 encoding to represent non-wide strings, then \uXXXX appearing in a non-wide string literal will of course be encoded in UTF-8, along with all the other characters in the literal. If the \uXXXX occurs in a wide string literal, it will be encoded as a wide character with value 0xXXXX.

I believe I can prepend the literal with "u8" to specify UTF-8 encoding in C11, but how would I have done that in earlier standards?

To portably create UTF-8 literals in earlier versions of C you would have to manually enter the hex values, as you mention in your (edited) question. However, some implementations, such as some versions of gcc and Visual Studio, support UTF-8 encoding of "narrow" strings. Check the documentation of your implementations ... and you can of course print out the bytes of the strings or just look at the generated assembly code to see how characters are being encoded.

unicode - UTF-8 escape sequence in C string literal - Stack Overflow

c unicode utf-8 escaping
Rectangle 27 0

This type of issue is common when using ViewModels or strongly typed views with models. Here's why... When a post back happens the model binder eventually gets called prior to the controller getting called for the post back. If the controller is accepting a class (model or viewmodel) as an input parameter, then MVC will first create an instance of the class using the null constructor. Then the model binder will take the HTML Query string (name value pairs) and attempt to fill in the model/view model properties based on the name value pairs. If the binder cannot find the proper Name matches it simply doesn't do anything (which is proper behavior), as a result the symptoms of this are "Hey I missing data that I know I posted from the view".

The best way to debug this is 1) Set a breakpoint on the controller's action method. 2) Go to the client side and press F12 to view the network post. 3) Start the post back and notice the name value pairs sent from the browser. Upon breaking at the controller entry go do Debug/Windows/Locals and look at the model portion of the controller parameters. You will see the same thing there as in the network side (proof they all made it back). Now look at the typed value, if anything is not there that should be there, it is simply because the post back and the model (Name values) did not match.

90% of the time the root cause is the first parameter of the DisplayFor, HiddenFor or other "For" elements is not pointing to the correct thing to be returned. This is why I like to use ViewModels..

public class HomeLoanViewModel
{
  public Lead_Options leadOption { get; set; }       
  public Lead HomeLoanLead {get;set;}
  public String SelectedValue {get;set;}

  public HomeLoanViewModel()
  {
    this.leadOption= new Lead_Options();
    this.HomeLoanLead= new Lead();
  }
  public void Post(){
     //do all your post logic here
     if(SelectedValue > XYZ) //do this
  }
}

I would create the controller signature like this:

[HttpPost]
public ActionResult Submit(HomeLoanViewModel vm)
{
     if (ModelState.IsValid){
               vm.Post();
               return View(vm);
     }
  return View(vm);
}

I would create the view like this:

@using HMC.Common.Utilities;
@model HMC.Common.ViewModel.HomeLoanViewModel
@{
  ViewBag.Title = "LeadContact";
  Layout = "~/Views/_Base.cshtml";
}
@Using Html.BeginForm(){

    <label>Total Annual Income</label>
     @Html.DropDownListFor(m => m.HomeLoanLead.SelectedValue, Model.HomeLoanLead.Income_Binder, new { required = "", aria_required = "true"})

     <input type="submit/>

}

<div class="formnav row">
 <button class="btn btn-large">Show Top Home Loans <i class="fa fa-chevron-right"></i></button>
</div>

Finally one other pointer, no sense in the SelectListItems Text and Value being the same, you could just as easily have set the value to in Int such as [1,2,3,4,5] for each of the choices. Look at the value as the identifier of the text field, this works especially well with databases that have ID for looking up field values.

c# - Complex model return null in action? - Stack Overflow

c# .net asp.net-mvc asp.net-mvc-4
Rectangle 27 0

\uXXXX is a (short form) universal character name. You can use, say, \u0041 anywhere in your program in place of A -- this can be in the source text, e.g., as part of an identifier, or it can be in a character or string literal. If you use it in a literal, it will be exactly the same as if you used A in that literal. The same applies to the names of characters with encodings longer than 8 bits ... you can use the universal name, or you can enter the character directly if you have an input method that allows you to. How the character is encoded in memory is implementation-dependent, dependent on whether the character appears in an "" or L"" literal, and dependent on whether the character is a member of the execution character set. Note this from the C standard:

Each source character set member and escape sequence in character constants and string literals is converted to the corresponding member of the execution character set; if there is no corresponding member, it is converted to an implementation- defined member other than the null (wide) character.)

In an implementation that uses the UTF-8 encoding to represent non-wide strings, then \uXXXX appearing in a non-wide string literal will of course be encoded in UTF-8, along with all the other characters in the literal. If the \uXXXX occurs in a wide string literal, it will be encoded as a wide character with value 0xXXXX.

I believe I can prepend the literal with "u8" to specify UTF-8 encoding in C11, but how would I have done that in earlier standards?

To portably create UTF-8 literals in earlier versions of C you would have to manually enter the hex values, as you mention in your (edited) question. However, some implementations, such as some versions of gcc and Visual Studio, support UTF-8 encoding of "narrow" strings. Check the documentation of your implementations ... and you can of course print out the bytes of the strings or just look at the generated assembly code to see how characters are being encoded.

unicode - UTF-8 escape sequence in C string literal - Stack Overflow

c unicode utf-8 escaping
Rectangle 27 0

With forms, you cannot have an input with the same name as a form property per se. There is no hard restriction, but whatever you do will overwrite a form's attributes. The list of form attributes is extensive, varies by browser and JS engine, and could change at any time without notice. Therefore a static list would be of no use.

A form's property value will be overwritten with a reference to any field having the same name as that attribute. IE: if you have a field named "action", then the form's action attribute will be overwritten with a reference to that element named "action". Without an input named "action": form.action is a URL. With an input named "action" form.action is an element. Some explanation found here: Why JS function name conflicts with element ID?. "name", "action" or "id" might be a preferred name of a form field, and the JS world never accounted for that.

There is a save from this complete failure of the JS world: It is noted by a commenter on MSDN (http://msdn.microsoft.com/en-us/library/ie/ms536429%28v=vs.85%29.aspx) to instead use the getAttributeNode() method of the form object to get the real form property value. Works in FF current and IE ~7. With this method, you can have a field with the same name as a form element attribute. This should allow one to decouple HTML/JS restrictions from API's simultaneously serving various other client types.

javascript - What are valid / invalid names for HTML form tags in jQue...

javascript jquery html forms
Rectangle 27 0

One alternative is to name that param something else, let's say type:

localhost:3000/analysis/good?type=bad
@analyzer = params[:type]

You can pass those params to your URL helper like so:

analysis_path(id: "good", type: "bad")

ruby on rails - I'm trying to some parameters using params[:id] in a c...

ruby-on-rails ruby controller special-characters
Rectangle 27 0

The issue arises from your name attribute on the input element. All of your input elements have the same name value of quantity, hence when using the selector $('input[name='+fieldName+']') you are receiving a reference to all inputs with the same name.

You could give all related inputs a unique name, preferably a GUID, similar to this:

<input type='button' value='-' class='qtyminus' field='9056FF9E-E3ED-4F35-9E82-73796E80EA12' />
<input type='text' name='9056FF9E-E3ED-4F35-9E82-73796E80EA12' value='0' class='qty' />
<input type='button' value='+' class='qtyplus' field='9056FF9E-E3ED-4F35-9E82-73796E80EA12' />
<br>
<input type='button' value='-' class='qtyminus' field='B0B852FB-75B5-4C54-B403-A09AA75A961B' />
<input type='text' name='B0B852FB-75B5-4C54-B403-A09AA75A961B' value='0' class='qty' />
<input type='button' value='+' class='qtyplus' field='B0B852FB-75B5-4C54-B403-A09AA75A961B' />

You could simply use jQuery's next() and prev() functions, ignoring the name attributes (assuming the HTML is not going to change), similar to this:

$(this).prev().val(...); // for +
$(this).next().val(...); // for -
next()
prev()

You could also add a contextual element, grouping the relevant elements and use jQuery's parent() and .find() functions, similar to:

$(this).parent().find('input[name='+fieldName+']');

javascript - Button subtract and add from value only affect one - Stac...

javascript jquery
Rectangle 27 0

There is no name attribute in your input fields, You have used id attributes, but you should use name attribute for posting the form values.

<form action="sendfeedback.php" method="post">
        <div><input name="txtName" placeholder="Name" id="txtName" type="text" /></div>
                    ^^^^^^^^^^^^^^
        <div><input name="txtEmail"  placeholder="Email (Optional)" id="txtEmail" type="text" /></div>
        <div><input  name="txtAppName"  placeholder="Application Name (Type in the application name you're using)" id="txtAppName" type="text" /></div>
        <div style="height:4px"></div>
        <div><textarea name="txtComment" placeholder="Comments..." id="txtComment"></textarea></div>
        <div style="width:407px; text-align:right;"><input id="submitComment" type="submit" value="Send" /></div>
    </form>

PHP pass parameters from html form - Stack Overflow

php html
Rectangle 27 0

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


using System.IO;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Engines;
using Org.BouncyCastle.Crypto.Generators;
using Org.BouncyCastle.Crypto.Modes;
using Org.BouncyCastle.Crypto.Paddings;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Security;
using Org.BouncyCastle.Utilities.Encoders;

namespace BouncyCastleProject
{
    public class DesExample
    {
        // Encrypting or decrypting ?
        private bool encrypt = true;

        // To hold the initialised DESede cipher
        private PaddedBufferedBlockCipher cipher = null;

        // The input stream of bytes to be processed for encryption
        private Stream inStr = null;

        // The output stream of bytes to be procssed
        private Stream outStr = null;

        // The key
        private byte[] key = null;

        /*
        * start the application
        */
        //////public static void Main(string[] args)
        //////{
        //////    bool encrypt = true;
        //////    string infile = null;
        //////    string outfile = null;
        //////    string keyfile = null;

        //////    if (args.Length < 2)
        //////    {
        //////        //    Console.Error.WriteLine("Usage: java " + typeof(DesExample).Name + " infile outfile [keyfile]");
        //////        Console.Error.WriteLine("Usage: " + typeof(DesExample).Name + " infile outfile [keyfile]");
        //////        Environment.Exit(1);
        //////    }

        //////    keyfile = "deskey.dat";
        //////    infile = args[0];
        //////    outfile = args[1];

        //////    if (args.Length > 2)
        //////    {
        //////        encrypt = false;
        //////        keyfile = args[2];
        //////    }

        //////    DesExample de = new DesExample(infile, outfile, keyfile, encrypt);
        //////    de.process();
        //////}

        // Default constructor, used for the usage message
        public DesExample()
        {
        }

        /*
        * Constructor, that takes the arguments appropriate for
        * processing the command line directives.
        */
        public DesExample(
            string infile,
            string outfile,
            string keyfile,
            bool encrypt)
        {
            /* 
            * First, determine that infile & keyfile exist as appropriate.
            *
            * This will also create the BufferedInputStream as required
            * for reading the input file.  All input files are treated
            * as if they are binary, even if they contain text, it's the
            * bytes that are encrypted.
            */
            this.encrypt = encrypt;
            try
            {
                inStr = File.OpenRead(infile);
            }
            catch (FileNotFoundException)
            {
                //Console.Error.WriteLine("Input file not found [" + infile + "]");
                Environment.Exit(1);
            }

            try
            {
                outStr = File.Create(outfile);
            }
            catch (IOException)
            {
                //Console.Error.WriteLine("Output file not created [" + outfile + "]");
                Environment.Exit(1);
            }

            if (encrypt)
            {
                try
                {
                    /*
                    * The process of creating a new key requires a 
                    * number of steps.
                    *
                    * First, create the parameters for the key generator
                    * which are a secure random number generator, and
                    * the length of the key (in bits).
                    */
                    SecureRandom sr = new SecureRandom();

                    KeyGenerationParameters kgp = new KeyGenerationParameters(
                        sr, 
                        DesEdeParameters.DesEdeKeyLength * 8);

                    /*
                    * Second, initialise the key generator with the parameters
                    */

                    DesEdeKeyGenerator kg = new DesEdeKeyGenerator();
                    kg.Init(kgp);

                    /*
                    * Third, and finally, generate the key
                    */
                    key = kg.GenerateKey();

                    /*
                    * We can now output the key to the file, but first
                    * hex Encode the key so that we can have a look
                    * at it with a text editor if we so desire
                    */
                    Stream keystream = File.Create(keyfile);
                    byte[] keyhex = Hex.Encode(key);
                    keystream.Write(keyhex, 0, keyhex.Length);
                    keystream.Flush();
                    keystream.Close();
                }
                catch (IOException)
                {
                    //Console.Error.WriteLine("Could not decryption create key file [" + keyfile + "]");
                    Environment.Exit(1);
                }
            }
            else
            {
                try
                {
                    // TODO This block is a bit dodgy

                    // read the key, and Decode from hex encoding
                    Stream keystream = File.OpenRead(keyfile);
                    //     int len = keystream.available();
                    int len = (int)keystream.Length;
                    byte[] keyhex = new byte[len];
                    keystream.Read(keyhex, 0, len);
                    key = Hex.Decode(keyhex);
                }
                catch (IOException)
                {
                    //Console.Error.WriteLine("Decryption key file not found, or not valid [" + keyfile + "]");
                    Environment.Exit(1);
                }
            }
        }

        public void process()
        {
            /* 
            * Setup the DESede cipher engine, create a PaddedBufferedBlockCipher
            * in CBC mode.
            */
            cipher = new PaddedBufferedBlockCipher(
                new CbcBlockCipher(new DesEdeEngine()));

            /*
            * The input and output streams are currently set up
            * appropriately, and the key bytes are ready to be
            * used.
            *
            */

            if (encrypt)
            {
                performEncrypt(key);
            }
            else
            {
                performDecrypt(key);
            }

            // after processing clean up the files
            try
            {
                inStr.Close();
                outStr.Flush();
                outStr.Close();
            }
            catch (IOException)
            {
            }
        }

        /*
        * This method performs all the encryption and writes
        * the cipher text to the buffered output stream created
        * previously.
        */
        private void performEncrypt(byte[] key)
        {
            // initialise the cipher with the key bytes, for encryption
            cipher.Init(true, new KeyParameter(key));

            /*
            * Create some temporary byte arrays for use in
            * encryption, make them a reasonable size so that
            * we don't spend forever reading small chunks from
            * a file.
            *
            * There is no particular reason for using getBlockSize()
            * to determine the size of the input chunk.  It just
            * was a convenient number for the example.  
            */
            // int inBlockSize = cipher.getBlockSize() * 5;
            int inBlockSize = 47;
            int outBlockSize = cipher.GetOutputSize(inBlockSize);

            byte[] inblock = new byte[inBlockSize];
            byte[] outblock = new byte[outBlockSize];

            /* 
            * now, read the file, and output the chunks
            */
            try
            {
                int inL;
                int outL;
                byte[] rv = null;
                while ((inL = inStr.Read(inblock, 0, inBlockSize)) > 0)
                {
                    outL = cipher.ProcessBytes(inblock, 0, inL, outblock, 0);

                    /*
                    * Before we write anything out, we need to make sure
                    * that we've got something to write out. 
                    */
                    if (outL > 0)
                    {
                        rv = Hex.Encode(outblock, 0, outL);
                        outStr.Write(rv, 0, rv.Length);
                        outStr.WriteByte((byte)'\n');
                    }
                }

                try
                {
                    /*
                    * Now, process the bytes that are still buffered
                    * within the cipher.
                    */
                    outL = cipher.DoFinal(outblock, 0);
                    if (outL > 0)
                    {
                        rv = Hex.Encode(outblock, 0, outL);
                        outStr.Write(rv, 0, rv.Length);
                        outStr.WriteByte((byte)'\n');
                    }
                }
                catch (CryptoException)
                {

                }
            }
            catch (IOException ioeread)
            {
               // Console.Error.WriteLine(ioeread.StackTrace);
            }
        }

        /*
        * This method performs all the decryption and writes
        * the plain text to the buffered output stream created
        * previously.
        */
        private void performDecrypt(byte[] key)
        {
            // initialise the cipher for decryption
            cipher.Init(false, new KeyParameter(key));

            /* 
            * As the decryption is from our preformatted file,
            * and we know that it's a hex encoded format, then
            * we wrap the InputStream with a BufferedReader
            * so that we can read it easily.
            */
            //   BufferedReader br = new BufferedReader(new StreamReader(inStr));
            StreamReader br = new StreamReader(inStr); // 'inStr' already buffered

            /* 
            * now, read the file, and output the chunks
            */
            try
            {
                int outL;
                byte[] inblock = null;
                byte[] outblock = null;
                string rv = null;
                while ((rv = br.ReadLine()) != null)
                {
                    inblock = Hex.Decode(rv);
                    outblock = new byte[cipher.GetOutputSize(inblock.Length)];

                    outL = cipher.ProcessBytes(inblock, 0, inblock.Length, outblock, 0);
                    /*
                    * Before we write anything out, we need to make sure
                    * that we've got something to write out. 
                    */
                    if (outL > 0)
                    {
                        outStr.Write(outblock, 0, outL);
                    }
                }

                try
                {
                    /*
                    * Now, process the bytes that are still buffered
                    * within the cipher.
                    */
                    outL = cipher.DoFinal(outblock, 0);
                    if (outL > 0)
                    {
                        outStr.Write(outblock, 0, outL);
                    }
                }
                catch (CryptoException)
                {

                }
            }
            catch (IOException ioeread)
            {
                //Console.Error.WriteLine(ioeread.StackTrace);
            }
        }

    }
}

That's DES not AES...

c# - Documentation for Bouncy Castle AES 256 encryption in .Net? - Sta...

c# .net vb.net bouncycastle aes
Rectangle 27 0

This program pulls the decimal number from the RAW line and uses it to name the output files. It expects the input file name as a parameter on the command line.

use strict;
use warnings;

@ARGV or die "Input file required as command-line parameter\n";

my $out;

while (<>) {
  if ( /(\d+)\*+RAW$/ ) {
    open $out, '>', "$1.out" or die $!;
    select $out;
  }
  print $_ if $out;
}

thank you very much.

Perl: how to split a file? - Stack Overflow

perl