Compressing and decompressing a  string list

Hi All,
i need a help:
i have an string list say,
String sample="test";
String sample1="test1";
String sample2="test3";
i want to compress this sample,sample1,sample2 and store that compressed results into another string variable.
Ex:
compressedSample=sample;
compressedSample1=sample1;
compressedSample2=sample2;
similarly how can i uncompress the compressedSample,compressedSample1,compressedSample2 variables.
Thanks in advance

Try something like this :
Compressing :
ByteArrayOutputStream aos = new ByteArrayOutputStream();
GZIPOutputStream gos = new GZIPOutputStream(aos);
byte[] ba = "the_string_to_compress".getBytes();
gos.write(ba,0,ba.length);
gos.flush();
String compressed_string = aos.toString();
gos.close();
Decompressing :
GZIPInputStream zin = new GZIPInputStream( new ByteArrayInputStream( compressed_string.getBytes() ) );
StringBuffer dat = new StringBuffer();
byte[] buf = new Byte[128];
for(int r; (r=zin.read(buf))!=-1;) dat.append( new String(buf,0,r) );
zin.close();
String org_string = dat.toString();

Similar Messages

  • Compress and decompress in string

    hai
    how to compress the large string in java ? after string (compress string )how to store in database . then the jave prog read string (compress string) form database how to decompressed ?
    pls give me advice
    or useful web like
    with regards
    kumar

    What is wrong with the answer(s) giving in the past thread?
    You could use the StringReader/ByteInputStream + ByteOutpuStream + ( java.util.zip or GZIPOutputStream ).

  • How to compress and decompress a pdf file in java

    I have a PDF file ,
    what i want to do is I need a lossless compression technique to compress and decompress that file,
    Please help me to do so,
    I am always worried about this topic

    Here is a simple program that does the compression bit.
    static void compressFile(String compressedFilePath, String filePathTobeCompressed)
              try
                   ZipOutputStream zipOutputStream = new ZipOutputStream(new FileOutputStream(compressedFilePath));
                   File file = new File(filePathTobeCompressed);
                   int iSize = (int) file.length();
                   byte[] readBuffer = new byte[iSize];
                   int bytesIn = 0;
                   FileInputStream fileInputStream = new FileInputStream(file);
                   ZipEntry zipEntry = new ZipEntry(file.getPath());
                   zipOutputStream.putNextEntry(zipEntry);
                   while((bytesIn = (fileInputStream.read(readBuffer))) != -1)
                        zipOutputStream.write(readBuffer, 0, bytesIn);
                   fileInputStream.close();
                   zipOutputStream.close();
              catch (FileNotFoundException e)
              catch (IOException e)
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }

  • Compressing and decompressing a PDF file

    Dear Gurus,
    Anyone who can assist with the code to compress and decompress PDF file so that I can send it in an email.
    Thanks

    1) you should go to ABAP Printing forum where this problem has been discussed many times (for example remove the coloring to reduce the file size etc.). Just in case you would insist on working your way.
    2) You can create some printing "device" like smartform etc. to print your data for you and then convert it to PDF, the result should be smaller then option 1)
    3) the best one: if you want to send a PDF somewhere (or archive it etc.) you should start with Adobe forms, for you purpose Adobe print forms will be suffiscient. You only need to install and configure the ADS component to generate forms from the template for you. If you want to see a brief ovewrview about how to create this thing, start reading somewhere like here (this is not the most simple example!!):
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d
    Regards Otto

  • Compressed AND  Decompressed  STRING

    i want java porg 2 part
    part 1
    Compress largre string to small size and the compress string stroed in mysql data base
    part 2
    the prog read the compress string from data base then decompress .
    i am beginner lever java programmer
    pls give me code
    pls reply quickly
    with regards
    kumars

    hi everone,
    i have some problems with compress/decompress strings.
    i want to store a serialized php array, witch looks like this
    a:30:{i:0;s:1:"0";i:1;s:1:"1";i:2;s:1:"2";i:3;s:1:"3";i:4;s:1......
    on linux and mac os x it works fine, but not on win32 (winxp)
    i always get this error:
    java.io.IOException: Corrupt GZIP trailer
            at java.util.zip.GZIPInputStream.readTrailer(Unknown Source)
            at java.util.zip.GZIPInputStream.read(Unknown Source)
            at StringZip.decompress(StringZip.java:57)
            at StringZip.main(StringZip.java:84)is my test string too long ??
    maybe anyone can try this sample..
    much thx :D
    import java.io.*;
    import java.util.zip.*;
    public class StringZip {
         private static final int BLOCKSIZE = 1024;
         public static String compress( String data ) {          
              ByteArrayOutputStream zipbos = new ByteArrayOutputStream();
              ByteArrayInputStream zipbis = null;
              zipbis = new ByteArrayInputStream(data.getBytes());          
             GZIPOutputStream gzos = null;
             // now try to zip
             try {
                  gzos = new GZIPOutputStream(zipbos);
                  byte[] buffer = new byte[ BLOCKSIZE ];
                  // write into the zip stream
                  for ( int length; (length = zipbis.read(buffer, 0, BLOCKSIZE)) != -1; )
                      gzos.write( buffer, 0, length );
             } catch ( IOException e ) {
                  System.err.println( "Error: Couldn't compress" );
                  e.printStackTrace();
             } finally {
                  if ( zipbis != null )
                      try { zipbis.close(); } catch ( IOException e ) { e.printStackTrace(); }
                  if ( gzos != null )
                      try { gzos.close(); } catch ( IOException e ) { e.printStackTrace(); }
             // return the zipped string
             return zipbos.toString();
         public static String decompress( String data ) {
              ByteArrayInputStream zipbis = null;
              zipbis = new ByteArrayInputStream(data.getBytes());
              ByteArrayOutputStream zipbos = new ByteArrayOutputStream();
              GZIPInputStream gzis = null;
              try {
                   gzis = new GZIPInputStream( zipbis );
                   byte[] buffer = new byte[ BLOCKSIZE ];
                   // write the decompressed data into the stream
                   for ( int length; (length = gzis.read(buffer, 0, BLOCKSIZE)) != -1; )
                        zipbos.write( buffer, 0, length );
              } catch ( IOException e ) {
                   System.err.println( "Error: Couldn't decompress" );               
                   e.printStackTrace();
              } finally {
                   if ( zipbos != null )
                      try { zipbos.close(); } catch ( IOException e ) { e.printStackTrace(); }
                  if ( gzis != null )
                      try { gzis.close(); } catch ( IOException e ) { e.printStackTrace(); }
              return zipbos.toString();
         public static void main(String[] args) {
               String test = "a:30:{i:0;s:1:\"0\";i:1;s:1:\"1\";i:2;s:1:\"2\";i:3;s:1:\"3\";i:4;s:1:\"4\";i:5;s:1:\"5\";i:6;s:1:\"6\";i:7;s:1:\"7\";i:8;s:1:\"8\";i:9;s:1:\"9\";i:10;s:2:\"10\";i:11;s:2:\"11\";i:12;s:2:\"12\";i:13;s:2:\"13\";i:14;s:2:\"14\";i:15;i:15;i:16;i:16;i:17;i:17;i:18;i:18;i:19;i:19;i:20;i:20;i:21;i:21;i:22;i:22;i:23;i:23;i:24;i:24;i:25;i:25;i:26;i:26;i:27;i:27;i:28;i:28;i:29;i:29;}";
               String test_compressed   = compress(test);
               String test_decompressed = decompress(test_compressed);
               System.out.println(test);
               System.out.println(test_decompressed);
    }Message was edited by: antiben
    // edit
    ok, found a workaround
    seems to be a windows only problem :/

  • Compressiong And Decompression

    Hi,
    I do have an issue with compression and decompression.
    I have used following program to compress and decompress a file...
    I don't have any issue in compression. But when same file is tried to
    decompress I am getting some exception
    <code>
    public class Zipper {
         public static void main(String args[]) {
         try{
              Zipper zipper = new Zipper();
              if(args.length <= 0)
                   throw new IllegalArgumentException("Please provide file name for compression");
              String compressedFileName = zipper.compress(args[0]);
              String deCompressedFileName = zipper.deCompress(compressedFileName);
    }catch(Exception e){
              e.printStackTrace();
              //e.getCause().printStackTrace();
    /*                                        INFLATER METHODS                                             */
         private String compress(String fileName)throws Exception{
              String outputName = fileName+".zipped";
              File inputFile = new File(fileName);
              File zippedFile = new File(outputName);
              //FileInputStream fips = new FileInputStream(inputFile);
              RandomAccessFile raf = new RandomAccessFile(inputFile,"r");
              //FileOutputStream fops = new FileOutputStream(zippedFile);
              RandomAccessFile rafOut = new RandomAccessFile(zippedFile,"rw");
              Deflater compresser = new Deflater(Deflater.BEST_COMPRESSION);
              byte[] buf = new byte[1000];
              byte[] out = new byte[50];
              int intialCount = 0;
              int zippedSize = 0;
              int count = 0;
              String tempString = null;
              while( (count = raf.read(buf)) != -1){
                   intialCount += count;
                   compresser.setInput(buf);
                   compresser.finish();
                   count = compresser.deflate(out);
                   zippedSize += count;
                   //tempString = new String(out);
                   //tempString.trim();
                   //fops.write(tempString.getBytes("UTF-8"));
                   rafOut.write(out);
                   compresser.reset();
              //fops.close();
              //fips.close();
              rafOut.close();
              System.out.println("Intial File Size "+intialCount);
              System.out.println("Zipped File Size "+zippedSize);
              return outputName;
         private String deCompress(String fileName)throws Exception{
              String outputName = fileName+".unzipped";
              File inputFile = new File(fileName);
              File zippedFile = new File(outputName);
              //FileInputStream fips = new FileInputStream(inputFile);
              RandomAccessFile raf = new RandomAccessFile(inputFile,"r");
              FileOutputStream fops = new FileOutputStream(zippedFile);
              Inflater deCompresser = new Inflater();
              byte[] buf = new byte[100];
              byte[] out = new byte[1000];
              int intialCount = 0;
              int unZippedSize = 0;
              int count = 0;
              String tempString = null;
              while( (count = raf.read(buf)) != -1){
                   System.out.println("Count = "+count);
                   intialCount += count;
                   deCompresser.setInput(buf);
                   count = deCompresser.inflate(out);
                   unZippedSize += count;
                   //tempString = new String(out);
                   //tempString.trim();
                   //fops.write(tempString.getBytes("UTF-8"));
                   fops.write(out);
                   deCompresser.reset();
              fops.close();
              raf.close();
              //fips.close();
              System.out.println("Intial File Size "+intialCount);
              System.out.println("UnZipped File Size "+unZippedSize);
              return outputName;
    </code>
    Exception I got is
    Intial File Size 125952
    Zipped File Size 4938
    Count = 100
    java.util.zip.DataFormatException: invalid bit length repeat
    at java.util.zip.Inflater.inflateBytes(Native Method)
    at java.util.zip.Inflater.inflate(Unknown Source)
    at java.util.zip.Inflater.inflate(Unknown Source)
    at Zipper.deCompress(Zipper.java:213)
    at Zipper.main(Zipper.java:29)

    How about some google?
    Ans try this one: http://www.tinyline.com/utils/index.html

  • When cd jewel song list is printed from play list in Itunes, the list is compressed and unable to read.No problem before lates software change. How do I fix this ?

    When song list is printed from play list in Itunes for inserting into CD jewel case, the song list is compressed and is indecipherable. Did not have this problem prior to latest software change.How can I fix this ?

    Can you play the song in iTunes?
    If you can't the song file is probably corrupt and needs to be replaced.

  • [Forum FAQ] How to find and replace text strings in the shapes in Excel using Windows PowerShell

    Windows PowerShell is a powerful command tool and we can use it for management and operations. In this article we introduce the detailed steps to use Windows PowerShell to find and replace test string in the
    shapes in Excel Object.
    Since the Excel.Application
    is available for representing the entire Microsoft Excel application, we can invoke the relevant Properties and Methods to help us to
    interact with Excel document.
    The figure below is an excel file:
    Figure 1.
    You can use the PowerShell script below to list the text in the shapes and replace the text string to “text”:
    $text = “text1”,”text2”,”text3”,”text3”
    $Excel 
    = New-Object -ComObject Excel.Application
    $Excel.visible = $true
    $Workbook 
    = $Excel.workbooks.open("d:\shape.xlsx")      
    #Open the excel file
    $Worksheet 
    = $Workbook.Worksheets.Item("shapes")       
    #Open the worksheet named "shapes"
    $shape = $Worksheet.Shapes      
    # Get all the shapes
    $i=0      
    # This number is used to replace the text in sequence as the variable “$text”
    Foreach ($sh in $shape){
    $sh.TextFrame.Characters().text  
    # Get the textbox in the shape
    $sh.TextFrame.Characters().text = 
    $text[$i++]       
    #Change the value of the textbox in the shape one by one
    $WorkBook.Save()              
    #Save workbook in excel
    $WorkBook.Close()             
    #Close workbook in excel
    [void]$excel.quit()           
    #Quit Excel
    Before invoking the methods and properties, we can use the cmdlet “Get-Member” to list the available methods.
    Besides, we can also find the documents about these methods and properties in MSDN:
    Workbook.Worksheets Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff835542(v=office.15).aspx
    Worksheet.Shapes Property:
    http://msdn.microsoft.com/en-us/library/office/ff821817(v=office.15).aspx
    Shape.TextFrame Property:
    http://msdn.microsoft.com/en-us/library/office/ff839162(v=office.15).aspx
    TextFrame.Characters Method (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff195027(v=office.15).aspx
    Characters.Text Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff838596(v=office.15).aspx
    After running the script above, we can see the changes in the figure below:
    Figure 2.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thank you for the information, but does this thread really need to be stuck to the top of the forum?
    If there must be a sticky, I'd rather see a link to a page on the wiki that has links to all of these ForumFAQ posts.
    EDIT: I see this is no longer stuck to the top of the forum, thank you.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How can I copy and forward a string of text messages from a Iphone 5s to an email address

    How can I copy and forward a string of text messages from an IPhone 5S to an Email address?

    You can find my blog post on the same.
    http://www.pointtobenoted.com/blog/technology/mobile/how-to-copy-messages-from-i message/
    The 6 steps process is listed step by step.
    Hope this helps.
    http://www.pointtobenoted.com/

  • Error workflow has been created successfully, but failed to publish and will not be listed in the Project Center

    hello,
    when i try creating projects in Project center am posted on with this error.
    Your new XXXX workflow has been created successfully, but
    failed to publish and will not be listed in the Project Center.For more information on the failure, visit the My Queue Jobs page or contact your administrator.
    Any help would be appreciated!!!!!
    Thanks regards, Vignesh.

    hello Rouyre,
    Thanks for ur reply
    Am using 
    Microsoft Project Server 2013
    15.0.4420.1017
    Yes! It is Custom EPT with Custom Workflow(Declarative Workflow) built through VS2012
    after associating the Site workflow with EPT i try creating Projects using my Custom EPT since then am posted on with this error.
    ULS Error:Log
    07/04/2014 10:21:38.03 Microsoft.Office.Project.Server (0x1840)
    0x06B8 Project Server                
    Queue                        
    ad3fy Critical
    Standard Information:PSI Entry Point: <unknown>  Project User: <unknown>  Correlation Id: <unknown>  PWA Site URL:   SA Name: <unknown>  PSError: <unknown> A queue job has failed. This is a general
    error logged by the Project Server Queue everytime a job fails - for effective troubleshooting use this error message with other more specific error messages (if any), the Operations guide (which documents more details about queued jobs) and the trace log
    (which could provide more detailed context). More information about the failed job follows. GUID of the failed job: 39cd36d6-3603-e411-b33e-00155d00091f. Name of the computer that processed this job: 3eebbc1d-7558-4050-bf5d-d985b23b89f5 (to debug further,
    you need to look at the trace log from this computer). Failed job type: ReportWorkflowProj...
    2c1ea19c-5849-002d-b89f-50aaf0a752fd
    07/04/2014 10:21:38.03* Microsoft.Office.Project.Server (0x1840)
    0x06B8 Project Server                
    Queue                        
    ad3fy Critical
    ...ectDataSync. Failed sub-job type: ReportWorkflowProjectDataSyncMessage. Failed sub-job ID: 1. Stage where sub-job failed:  (this is useful when one sub-job has more than one logical processing stages).
    2c1ea19c-5849-002d-b89f-50aaf0a752fd
    07/04/2014 10:21:38.03 Microsoft.Office.Project.Server (0x1840)
    0x06B8 Project Server                
    Queue Jobs                    
    ad3fy Medium  
    Error is: GeneralQueueJobFailed. Details: Queue Attributes:  39cd36d6-3603-e411-b33e-00155d00091f  3eebbc1d-7558-4050-bf5d-d985b23b89f5  ReportWorkflowProjectDataSync  ReportWorkflowProjectDataSyncMessage  1    2c1ea19c-5849-002d-b89f-50aaf0a752fd
     . Standard Information: , LogLevelManager Warning-ulsID:0x000DD158 has no entities explicitly specified.
    2c1ea19c-5849-002d-b89f-50aaf0a752fd
    07/04/2014 10:21:38.03 Microsoft.Office.Project.Server (0x1840)
    0x06B8 Project Server                
    Project Server Database      
    ah91z Medium  
    Successfully got the connection string (database name=[ProjectWebApp_Practice], id=1f6004ae-5d8a-41d2-81f9-e424a31484aa, type=Consolidated). Requested access level=ReadWrite: Data Source=XXXX;Initial Catalog=ProjectWebApp_Practice;Integrated Security=True;Enlist=False;Pooling=True;Min
    Pool Size=0;Max Pool Size=100;Connect Timeout=15
    2c1ea19c-5849-002d-b89f-50aaf0a752fd
    07/04/2014 10:21:38.04 Microsoft.Office.Project.Server (0x1840)
    0x06B8 Project Server                
    Queue Jobs                    
    ad3fz Medium  
    PWA:http://XXXX:10000/PWAPactice, ServiceApp:Project Server Service Application, User:PROJECTSERVER\system, PSI: [QUEUE] receiver http://XXXX:10000/PWAPactice: Group 3bcd36d6-3603-e411-b33e-00155d00091f type = ReportWorkflowProjectDataSync aborted at
    Message 1, LogLevelManager Warning-ulsID:0x000DD159 has no entities explicitly specified.
    2c1ea19c-5849-002d-b89f-50aaf0a752fd
    07/04/2014 10:21:38.04 Microsoft.Office.Project.Server (0x1840)
    0x06B8 Project Server                
    Queue Jobs                    
    ad3f2 Medium  
    PWA:http://XXXX:10000/PWAPactice, ServiceApp:Project Server Service Application, User:PROJECTSERVER\system, PSI: [QUEUE] receiver http://XXXX:10000/PWAPactice: Group 3bcd36d6-3603-e411-b33e-00155d00091f correlation 82705dc5-3603-e411-b33e-00155d00091f
    type = ReportWorkflowProjectDataSync failed at Message 1 Errors: GeneralQueueJobFailed, LogLevelManager Warning-ulsID:0x000DD15C has no entities explicitly specified.
    2c1ea19c-5849-002d-b89f-50aaf0a752fd
    Thanks regards, Vignesh.

  • Sum and average of a list of integers

    heya all
    im trying Implement a program to find the sum and average of a list of integers terminated by the data marker -999.
    import java.util.*;
    public class sumaverage
       public static void main(String[] args)
    int sum = 0;     // input the first number
           int num = kybd.nextInt(); // kybd is an instance of Scanner
           while ( num != -999 )    // while the end of data not found
                sum += num ;
                num = kybd.nextInt(); // input the next number
           System.out.println("the sum is " + sum );
    }}Currently im getting " cant find symbol" on lines 10 + 16 pointing at the k in kybd.nextInt(); , could anyone tell me whats wrong as im lost ?
    Thankyou

    thanks mate , i cant belive i missed that :S
    im now trying to add the adverage to the code
    ive done the following coding , can anyone confirm this is correct ? it all compiles fine ...
    import java.util.*;
    public class sumaverage
       public static void main(String[] args)
         Scanner kybd = new Scanner(System.in);
         int sum = 0;     // input the first number
         int n;
         double Adverage = 0;
           int num = kybd.nextInt(); // kybd is an instance of Scanner
           while ( num != -999 )    // while the end of data not found
                sum += num ;
             n = kybd.nextInt();
                sum += n;
             Adverage = sum/n;
                num = kybd.nextInt(); // input the next number
           System.out.println("the sum is " + sum );
           System.out.println("The adverage of the integers is " + Adverage);
    }}

  • Replace last delimeter with "and" in a string in SSRS

    Hi,
    I want to replace last delimeter (comma) with and 
    in a string in SSRS 2008 R2.
    if there are more than one unit, and the Area of the units are different, then the area of each must must be listed separated by commas and ‘and’ before the last one.
    i.e.,
    Input string- Hi,Hello,HRU,
    Desired output- Hi,Hello and 
    HRU..
    how can I achieve this (and
    before last word) ?
    (suggest in SSRS or even in SQL)
    Rgds/-

    Your example seems to indicate you wish to substitute "and" for the second to last delimiter and ".." for the last. Is that the ask? Will there actually be a trailing delimiter on the input string?
    This can be done several ways: In the dataset, in an expression, using custom code.
    The approach for the dataset and expression are similar, just the language is different. Dataset will usually deliver better performance since the source is often a more powerful server (in the case of a SQL dataset).
    In an SSRS expression it might look like this:
    =Left(Fields!InputString.Value,InStrRev(Fields!InputString.Value,",")-1)+" and "+Right(Fields!InputString.Value,Len(Fields!InputString.Value)-InStrRev(Fields!InputString.Value,","))
    This assumes the input string is actually a field from your dataset but it could be anything. The Left piece gets the string that occurs before the last comma without the comma, then append " and ", then the Right expression gets everything after the last
    comma and appends it. If you will have a trailing delimiter, you could substitute the following formula anywhere you see Fields!InputString.Value:
    =Replace(Trim(Replace(Fields!InputString.Value,","," "))," ",",")
    Because Trim in an SSRS expression only trims leading and trailing spaces, the delimiters must be converted to a space. So this only works if there are no spaces in the original string. If the input is "Hi,Hello,How are you," the result of this formula will
    be "Hi,Hello,How,are,you" because the spaces between How, are and you will get replaced by ",". To handle embedded spaces makes the expression more complex. Assuming the input string is "Hi,Hello,How are you,":
    =Replace(Replace(Trim(Replace(Replace(Fields!InputString.Value," ","|"),","," "))," ",","),"|"," ")
    This expression uses 2 more replace statements. The innermost statement substitues "|" for the embedded spaces so they don't get replace with ",". You should use a character that you are sure will not appear in the string otherwise. Or use a sequence of
    characters like "|^|" that you are sure won't appear if any one character may possibly appear. The outermost Replace restores the "|" characters back to spaces.
    A code solution may be easier. Just wrap the below in a simple function:
    return str.Trim(",".ToCharArray()).Substring(0, str.Trim(",".ToCharArray()).LastIndexOf(",") - 1) + " and " + str.Trim(",".ToCharArray()).Substring(str.Trim(",".ToCharArray()).LastIndexOf(",") + 1);
    This is the VB.Net equivalent of the expressions above.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • SSIS Package : While Extracting Sharepoint Lookup column, getting error 'Cannnot convert between unicode and non-unicode string data types'

    Hello,
    I am working on one project and there is need to extract Sharepoint list data and import them to SQL Server table. I have few lookup columns in the list.
    Steps in my Data Flow :
    Sharepoint List Source
    Derived Column
    its formula : SUBSTRING([BusinessUnit],FINDSTRING([BusinessUnit],"#",1)+1,LEN([BusinessUnit])-FINDSTRING([BusinessUnit],"#",1))
    Data Conversion
    OLE DB Destination
    But I am getting the error of not converting between unicode and non-unicode string data types.
    I am not sure what I am missing here.
    In Data Conversion, what should be the Data Type for the Look up column?
    Please suggest here.
    Thank you,
    Mittal.

    You have a data conversion transformation.  Now, in the destination are you assigning the results of the derived column transformation or the data conversion transformation.  To avoid this error you need use the data conversion output.
    You can eliminate the need for the data conversion with the following in the derived column (creating a new column):
    (DT_STR,100,1252)(SUBSTRING([BusinessUnit],FINDSTRING([BusinessUnit],"#",1)+1,LEN([BusinessUnit])-FINDSTRING([BusinessUnit],"#",1)))
    The 100 is the length and 1252 is the code page (I almost always use 1252) for interpreting the string.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • �Map String, List ?

    Hello!
    In my application I would like to use a data type to represent a pair "<city1>, <inferior limit>", "<city1>, <superior limit>", "<city2>, <inferior limit>", "<city2>, <superior limit>", "<city3>, <inferior limit>", "<city3>, <superior limit>", etc. So when I looked for the first element (city) I'd get two values (two limits).
    What would be the best option?
    I thought I could use for example:
    Map<String, List> map = new HashMap<String, List>();
    "String" will have the name and "List" will have two elements: inferior and superior limit.
    If this were reasonable option, how could I put elements in that map? And how could I get the limits?
    Thanks in advance :)

    You shouldn't use List for this purpose: you have exactly 2 elements of certain meaning (not collection of numerous elements), so you should better create a class to hold them and use Map<String,YourClass>.

  • Internet Explorer 11 - Emulation Document Mode and User Agent String Drop Down Menu Blank

    Hey
    I have a user who has a problem with Internet Explorer 11 where when you go to emulation mode using F12, the Document Mode and User Agent String Drop Down Menu are both blank. On our internal website its works correctly but on all other external websites
    they are both blank.
    I have had a look at the link below but this did not help as it would not recreate some of the registry keys.
    http://answers.microsoft.com/en-us/ie/forum/ie11-iewindows8_1/document-mode-and-user-agent-string-dropdowns/cd34d5f8-7839-4083-af55-05d49ba85190?rtAction=1387560713451
    Charlie

    Hi,
    Please include links to any websites that you are having issues with your questions.
    There are some known reasons why the documentMode dropdown appears blank...
    not all websites though should have the conditions for this.
    f12>Console tab, refresh the page to show suppressed error messages and warnings... (documentMode x-ua toggling is listed)...
    IE11 includes improvements for XSS... to link to internet sites from your intranets you need to add those sites (If you really, really trust them) to the Trusted Sites list.
    the developer console will list blocked xss requests.
    by default IE11 runs in EPM.... in the Internet Zone, while it is not switched on for the intranet zone....
    EPM only allows 64 bit Addons and ActiveX controls to run in the context of an IE tab...
    so its highly likely that one of your Addons is causing the issue.
    the first step in troubleshooting IE issues is to test in noAddons mode.
    Regards.
    Rob^_^

Maybe you are looking for

  • Bug with ios 5.0.1

    A few bugs i have with IOS 5.0.1 The batery is run out very fast The music dosent oregnized the ipod stuck when I am lestning to music

  • Warning: Comp needed but no BD

    Hi, Everyone: When I go to look at a property of a node (for example the VISA Write, but it could any one of the built-in functions), it will keep returning an error (see the attached picture) until it runs out of hard drives to check, then it finall

  • Flash Panels for Flash Builder?

    Hi, It would be great if Flex Developers can create their own Flash Panels for Flash Builder. Photoshop and Flash CS4 has this feature, why not Flash Builder? Mariush T. http://mariusht.com/blog/

  • Question/Clarification about the headers at beginning of timeline

    I moved from CS2 to CS4 and one thing that leaves me a little puzzled is the assign video source and the track selection headers at left side. I have read the manual and played with this. I see some advantages, such as making the "page up/down" keys

  • HT201210 this article doesn't help !

    this article doesn't help ! i still having the problems "the ipad ipad cannot be restored at this time because the ipad software update server......",why apple make this so complicated??