How to build a library of string functions?

I want to create a set of my own special string functions. Trouble is I cannot create a class that extends String because it has been declared final. I want to be able to use the existing String functions as well as my own. Any ideas?
Thanks in advance.

Create a class that doesn't extend String. Use the String methods. You don't have to extend a class to use its methods. Example:public class LameUtility {
  public static char getFirstCharacter(String s) {
    return s.charAt(0);
}

Similar Messages

  • Utility library error string function?

    I've been working on an Error Handler library, culled mostly from these wonderful fora (Roberto!).  I can't seem to find an error code string generator for the functions in the Utiltiy Library though (in particular, functions like RenameFile, CopyFile, GetDir, SetDir, MakeDir, all the file i/o functions).
    Most of those make mention to negative error types with some plain text explanations.  But there's no mention of a nice code-to-string converter function, as there is in other libraries.  For instance, for the RS232 library, there is GetRS232ErrorString.  For the Formatting & I/O library, there is GetFmtIOErrorString.
    Am I not seeing it somewhere?  Inside the Utility library, there is a multithreading error code function called CmtGetErrorMessage.
    Solved!
    Go to Solution.

    You're right: the Urility Library does not incorporate a function that translates error codes to a meaningful text. I suppose this is due to the fact that error codes partly overlap, so a unique function could not be used.
    Just as an example, error -1 means File not found in almost all file I/O library functions, but it translates to No files found matching the search criteria in GetFirstFile () , to No more files in GetNextFiles () and Invalid Parameters in MakePathname ().
    Another example: error -2 means GetFirstFile must be called before if returned by GetNextFile (), and Resulting pathname too long if returned by MakePathname ().
    And this considering only File I/O section of the library!
    While developing my own toolbox of utilities, I have created the following function, which I know is far from perfect and covers only file I/O functions:
    char * CVIFUNC GetULibFileIOErrMsg (int error)
    // Messages associated to error codes returned by functions in File Utilities class in Utility Library
    switch (error) {
    case 0: return "Success";
    case -1: return "One of the path component not found";
    case -2: return "Resulting pathname longer than 260 chars";
    case -3: return "General I/O error occurred";
    case -4: return "Insufficient memory to complete operation";
    case -5: return "Invalid path";
    case -6: return "Access denied";
    case -7: return "Specified path is a directory, not a file";
    case -8: return "Disk is full";
    case -9: return "New file already exists";
    default: return "Unknown error";
    return NULL;
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to build a fixed-length string representing an integer

    Hi,
    I would like know how can I use the API to get a String representing an int with fixed length. I mean, I would like something similar to Integer.parseInt(), but I need to set the length of that String in such a way that, for instance, if I need the String to be 5 character long, and the int is 37, the String would be 00037
    Thanks in advance and best regards,
    Miguel ?ngel

    I wrote pad() methods in my string helper that can be used for this purpose.
    In particular, you want to prepad with '0' to a length of 5:
    com.Ostermiller.StringHelper.prePad(Integer.toString(37), 5, '0');
    http://ostermiller.org/utils/StringHelper.html

  • How to find out what are the functions supported by string class

    Hi,
    Can any one let me know how to find what are all the functions supported by the string class in standard(STL) library on solaris.
    Regards,
    Vignesh

    1. Any C++ textbook that covers the Standard Library will tell you about the standard string class. A good tutorial and reference for the entire Standard Library is "The C++ Standard Library" by Nicolai Josuttis, published by Addison Wesley.
    2. WIth Sun C++, the command
    man -s3C++ basic_string
    provides documentation for the default libCstd version of the Standard Library.
    3. You could look at the <string> header itself. I don't recommend that approach.

  • How to deploy a single PBL (Build Runtime Library) in 64Bit

    Hello There,
    I am testing PB15 and create
    two Project Files within the application. One Projectfile to compile a 32Bit Version and the other one to deploy a 64Bit version in P-Code. We are delivering today Patches in a Patch Library at the top of the library list (we are aware for the dependencies and know how to avoid the “Wrong Function Call” issue).
    How can I create a Patch Library for 64Bit?
    Today we just recompile the Patch.PBL two times and rename Patch.PBL -> Patch.PBD. But that did not work with 64Bit Project because I can’t choose the desired Platform (I am guessing it is always compiles in 32Bit).
    There is an additional menu point “Build Runtime Library” which seems to have the settings / option similar to the Project settings. But there is the Platform the missing link either (see attached Picture).
    So how can I get a single PBL compiled in 64Bit without deploying the whole Project?
    BTW:
    Compilation of the Whole app takes about 6 hours and results in full XCOPY deployment
    of 730MB (in 64Bit), so we want wait that time or deliver so much files if a single
    Patch.pbd of 500KB would be sufficient.
    Regards
        Marco

    Hi Marco,
    You should try orcascript to build your patches.  It is much cleaner and faster.
    I setup a .dat file with the orcascript and then run it using a .bat file.
    this is my batch file command:  OrcaScr125 build.dat >buildlog.txt
    Note that the orcascr command is version specific.  I have NOT tried this yet with PB 15 32 or 64 bit.
    this is what the build.dat would have in it.  The liblist has to be your lib list, same with the main applicaiton info.
    NOTE:  i regen a function in the script in order to set a patch date that users can see.  Also, note that i copy the patch.pbl to a build directory, build it, then copy the .pbd to various locations.
    start session
    file copy "patch.pbl" "build\patch.pbl"
    set liblist "build\patch.pbl; ...."
    set application "C:\main.pbl" "app"
    regenerate "build\patch.pbl" "f_get_patch_date" "function"
    build library "build\patch.pbl"   "" pbd
    file copy "build\patch.pbd" "patch.pbd"
    file copy "patch.pbd" "..\patch.pbd"
    end session
    regards
    -mike

  • How to build a String from Date?

    How to build a String from class Date?
    How to get the year, month, day, hour ... from a Date object.

    Ok to build a string use this function in java.util.Date
    toString()
    TO get year, date, etc u can use the following functions
    getYear()
    getDate()
    This link might help u more
    http://java.sun.com/products/jdk/1.1/docs/api/java.util.Date.html

  • How can i do the upload file function using tomcat library??

    how can i do the upload file function using tomcat library??

    Did you read the document for the library?
    If you can't figure it out, why don't you ask the people who provide the library?
    This has nothing to do with JavaMail.

  • How to install GD2 Library ?

    Hello,
    does anyone know a tutorial to install the gd2 library on leopard server?
    the tutorial from http://osx.topicdesk.com/ is not working properly.
    Is it necessary to recompile php 5.2.4 which is shipped with leo server?
    many questions here
    chico

    I am trying to setup GD with the default PHP build that comes preinstalled on Leopard, but I am unable to get it work correctly.
    So far I have followed these instructions to get PHP5 working with with Apache2, this works fine and I am able to setup multiple virtual hosts for each of my websites and I have also downloaded and installed MySQL 5.0.45 which is now working fine with PHP the only problem is trying to get the extensions working.
    I then tried following: Add the GD Extension to PHP5 on OS X Server 10.5.x guide to install GD2, which all seemed to work in the terminal, but after I restarted Apache and reloaded my phpinfo() there is still no mention of GD.
    Any ideas why it isn't working (PS I have installed Xcode and X11SDK, from the Leopard DVD)
    Heres my terminal log:
    <pre>Last login: Sun Nov 11 18:59:13 on ttys000
    Sebs-Mac-Mini:~ Seb$ cd /SourceCache/jpeg-6b
    Sebs-Mac-Mini:jpeg-6b Seb$ sudo cp /usr/share/libtool/config.sub .
    Password:
    Sebs-Mac-Mini:jpeg-6b Seb$ sudo cp /usr/share/libtool/config.guess .
    Sebs-Mac-Mini:jpeg-6b Seb$ sudo ./configure --enable-shared
    checking for gcc... gcc
    checking whether the C compiler (gcc ) works... yes
    checking whether the C compiler (gcc ) is a cross-compiler... no
    checking whether we are using GNU C... yes
    checking how to run the C preprocessor... gcc -E
    checking for function prototypes... yes
    checking for stddef.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for size_t... yes
    checking for type unsigned char... yes
    checking for type unsigned short... yes
    checking for type void... yes
    checking for working const... yes
    checking for inline... _inline_
    checking for broken incomplete types... ok
    checking for short external names... ok
    checking to see if char is signed... yes
    checking to see if right shift is signed... yes
    checking to see if fopen accepts b spec... yes
    checking for a BSD compatible install... /usr/bin/install -c
    checking for ranlib... ranlib
    checking host system type... i686-apple-darwin9.0.0
    checking for ranlib... ranlib
    checking for gcc... gcc
    checking whether we are using GNU C... yes
    checking for gcc option to produce PIC... -fPIC
    checking if gcc PIC flag -fPIC works... yes
    checking if gcc static flag -static works... none
    checking whether ln -s works... yes
    checking for ld used by GCC... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
    checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no
    checking whether the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... no
    checking for BSD-compatible nm... /usr/bin/nm -p
    checking command to parse /usr/bin/nm -p output... no
    checking how to hardcode library paths into programs... unsupported
    checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to reload object files... -r
    checking dynamic linker characteristics... no
    checking if libtool supports shared libraries... no
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    checking for objdir... .libs
    creating libtool
    checking libjpeg version number... 62
    creating ./config.status
    creating Makefile
    creating jconfig.h
    jconfig.h is unchanged
    Sebs-Mac-Mini:jpeg-6b Seb$ sudo make
    make: Nothing to be done for `all'.
    Sebs-Mac-Mini:jpeg-6b Seb$ mkdir -p /usr/local/include
    Sebs-Mac-Mini:jpeg-6b Seb$ mkdir -p /usr/local/bin
    Sebs-Mac-Mini:jpeg-6b Seb$ mkdir -p /usr/local/lib
    Sebs-Mac-Mini:jpeg-6b Seb$ mkdir -p /usr/local/man/man1
    Sebs-Mac-Mini:jpeg-6b Seb$ sudo make install
    /usr/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h
    /usr/bin/install -c -m 644 ./jpeglib.h /usr/local/include/jpeglib.h
    /usr/bin/install -c -m 644 ./jmorecfg.h /usr/local/include/jmorecfg.h
    /usr/bin/install -c -m 644 ./jerror.h /usr/local/include/jerror.h
    ./libtool --mode=install /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la
    /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la
    /usr/bin/install -c .libs/libjpeg.a /usr/local/lib/libjpeg.a
    ranlib /usr/local/lib/libjpeg.a
    chmod 644 /usr/local/lib/libjpeg.a
    Libraries have been installed in:
    /usr/local/lib
    To link against installed libraries in a given directory, LIBDIR,
    you must use the `-LLIBDIR' flag during linking.
    You will also need to do one of the following:
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ./libtool --mode=install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
    /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
    ./libtool --mode=install /usr/bin/install -c djpeg /usr/local/bin/djpeg
    /usr/bin/install -c djpeg /usr/local/bin/djpeg
    ./libtool --mode=install /usr/bin/install -c jpegtran /usr/local/bin/jpegtran
    /usr/bin/install -c jpegtran /usr/local/bin/jpegtran
    ./libtool --mode=install /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
    /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
    ./libtool --mode=install /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom
    /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom
    /usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1
    /usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1
    /usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1
    /usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1
    /usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1
    Sebs-Mac-Mini:jpeg-6b Seb$ cd /SourceCache/php-5.2.4/ext/gd
    Sebs-Mac-Mini:gd Seb$ sudo phpize
    Configuring for:
    PHP Api Version: 20041225
    Zend Module Api No: 20060613
    Zend Extension Api No: 220060519
    Sebs-Mac-Mini:gd Seb$ sudo ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc and cc understand -c and -o together... yes
    checking for system library directory... lib
    checking if compiler supports -R... no
    checking if compiler supports -Wl,-rpath,... yes
    checking build system type... i686-apple-darwin9.0.0
    checking host system type... i686-apple-darwin9.0.0
    checking target system type... i686-apple-darwin9.0.0
    checking for PHP prefix... /usr
    checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
    checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20060613
    checking for PHP installed headers prefix... /usr/include/php
    checking for re2c... no
    configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
    checking for gawk... no
    checking for nawk... no
    checking for awk... awk
    checking if awk is broken... no
    checking for GD support... yes, shared
    checking for the location of libjpeg... /usr/local/lib
    checking for the location of libpng... /usr/X11R6
    checking for the location of libz... /usr
    checking for the location of libXpm... /usr/X11R6
    checking for FreeType 1.x support... no
    checking for FreeType 2... /usr/X11R6
    checking for T1lib support... no
    checking whether to enable truetype string function in GD... no
    checking whether to enable JIS-mapped Japanese font support in GD... no
    checking for fabsf... yes
    checking for floorf... yes
    checking for jpegreadheader in -ljpeg... yes
    checking for pngwriteimage in -lpng... yes
    checking for XpmFreeXpmImage in -lXpm... yes
    checking for FTNewFace in -lfreetype... yes
    checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
    checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no
    checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -p
    checking whether ln -s works... yes
    checking how to recognise dependent libraries... pass_all
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory
    yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking the maximum length of command line arguments... 196608
    checking command to parse /usr/bin/nm -p output from gcc object... rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory
    ok
    checking for objdir... .libs
    checking for ar... ar
    checking for ranlib... ranlib
    checking for strip... strip
    rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory
    checking if gcc static flag works... rm: conftest.dSYM: is a directory
    yes
    checking if gcc supports -fno-rtti -fno-exceptions... rm: conftest.dSYM: is a directory
    no
    checking for gcc option to produce PIC... -fno-common
    checking if gcc PIC flag -fno-common works... rm: conftest.dSYM: is a directory
    yes
    checking if gcc supports -c -o file.o... rm: conftest.dSYM: is a directory
    yes
    checking whether the gcc linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin9.0.0 dyld
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    creating libtool
    appending configuration tag "CXX" to libtool
    configure: creating ./config.status
    config.status: creating config.h
    config.status: config.h is unchanged
    Sebs-Mac-Mini:gd Seb$ sudo make
    /bin/sh /SourceCache/php-5.2.4/ext/gd/libtool --mode=install cp ./gd.la /SourceCache/php-5.2.4/ext/gd/modules
    cp ./.libs/gd.so /SourceCache/php-5.2.4/ext/gd/modules/gd.so
    cp ./.libs/gd.lai /SourceCache/php-5.2.4/ext/gd/modules/gd.la
    Libraries have been installed in:
    /SourceCache/php-5.2.4/ext/gd/modules
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
    - add LIBDIR to the `DYLDLIBRARYPATH' environment variable
    during execution
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    Build complete.
    Don't forget to run 'make test'.
    Sebs-Mac-Mini:gd Seb$ sudo make install
    Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20060613/
    Installing header files: /usr/include/php/
    Sebs-Mac-Mini:gd Seb$</pre>

  • How to declare and initialize a STRING ARRAY (assign strings to array elements)

    How to declare and initialize a STRING ARRAY (assign desired strings to elements of an array, for example "abc", "def", "ghi", "jkl", etc.) in LabVIEW? I saw a "string array" block in help, but could not find it in the function palette. Does a spreadsheet string have to be in a file (or can it be in a string constant block)? Thank you.

    Hi,
    you can do it in several ways:
    1. Direct way: Create string array control on front panel and type strings in its elements
    2. Programmatically 1: Create string array indicator (or local variable of control), right click on it in block diagram, select "Create constant" from drop down menu. The array constant will appear. Now type values in this constant's strings
    3. Programmatically 1: Use "Build array", "Replace array subset", "Insert into array" or "Initialize array" functions from "Functions->Array" palette.
    And of course you can combine all of these methods.
    Good luck.
    Oleg Chutko.

  • How to add a library (libSomeRandomlib.so) to a project....??

    Ok, so I've been trying to get CERN's ROOT program/libraries to work in an xcode project for a while, but I'm running into one really weird error, and I think I may just not know how to add a library to a project correctly.
    Suppose I create a new Xcode C++ command line tool project. I hit Build and go, and it gives me a nice little Hello World! in the console, just as it should. If I then click on the project in Groups & Files, go to Project>Add to Project..., and choose, say, libCint.so, from my root/lib directory, and click ok, then click Build & Go, I get an error in the console:
    dyld: Library not loaded: @rpath/libCint.so
    Referenced from: /Users/paulthompson/Documents/Programming/Build Products/Debug/LibraryIncludeTest
    Reason: image not found
    sharedlibrary apply-load-rules all
    Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)
    My assumption is that either I'm missing a step in the process of adding a library, or else there is something jacked up with the libraries themselves. Anyone have any advice?
    Thanks,
    Paul
    EDIT* Oh, I should mention that the actuall binary that gets built after adding the library WILL execute properly in the Finder, or from terminal, just not with the Build & Go, or Go commands from within xcode.
    Message was edited by: TraxusIV

    TraxusIV wrote:
    Results of otool:
    LibraryIncludeTest:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
    Macintosh-9:Debug paulthompson$ otool -L /Applications/CERNRoot/root/lib/libCint.so
    /Applications/CERNRoot/root/lib/libCint.so:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    I honestly don't know much about @rpath. I found this page that explains it a bit more: http://blogs.sun.com/dipol/entry/dynamiclibraries_rpath_andmac
    So, since I don't want to deploy with the environment variable set, I should ask, what IS the correct, MacOS X way to do it?
    The best way to find that is to look at how Apple does it. They put frameworks in /System/Library/Frameworks and regular shared libraries in the standard places. You can do the same. Put your frameworks into /Library/Frameworks and your shared libraries into /usr/local-based paths.
    If you want to create stand-alone executables that can be installed via drag-n-drop, you can put shared libraries inside the application bundle. If your shared libraries/frameworks are elsewhere, you will need some sort of installer to get them installed.
    I've been sifting through Apple's developer documentation but I have yet to find a concise, straightforward explanation of how to add shared libraries. I'm horribly confused at this point. Is there a good tutorial available anywhere for both the general unix case of linking to dylibs and .so's, and the Mac specific case?
    Hopefully someone else knows an answer for this one.
    *EDIT* I do already have the variable defined both in ~/.MacOS/environment.plist and also in Xcode as an additional user variable.
    I'm not sure about the whole RPATH thing. Setting environment.plist will define environment variables for use in the Finder, but that is really a hack. There are better ways to do it, but if you are porting some open-source programs, that may be the only way. You should be able to define those variables in Xcode. You have to selected the debug executable under "Exectuables"

  • How do I process serial port strings as bits

    In response to my commands, my instrument is sending bytes to my serial
    port. In one instance, 2 bytes are received. I want to treat these 2 bytes
    as a group of 16 bits.
    The VISA and Compatibility Serial functions return these bytes from the
    serial port to Labview clearly labelled a "string".
    Everything I can find in the way of Labview functions and .vis don't want to
    do bit twiddling, bit swapping, and bit dropping, with "string" data.
    I thought "hex string to number" could be used here, but I can't find a way.
    The 2 Bytes in question can be represented as hex, but the data are not the
    ASCII codes for the hex representation of a binary number, they are the
    binary number. This "hex string to number" seems to want ASCII c
    odes.
    You can feed a hex number typed into a "control" box wired into "hex string
    to number" and you get a meaningful number. You can feed the 2 bytes from
    the serial port into an "indicator" set to read in hex and you get a hex
    number that is a correct representation. But that is Labview handing them
    around to itself. I need to get my "hands" on them.
    I can't feed those same bytes that show up as a correct hex representation
    in an indicator into the "hex string to number" or anything else, so far,
    and get a number that is useful for further processing.
    I thought "variant to data", but I can't find enough reference material to
    understand how to use it. A boolean array seems like a bit of a weird
    approach, so I thought I'd ask before I looked into that.
    I'm used to dealing directly with binary numbers on the processor stack, I
    call them whatever I want, and turn them into anything I feel like.
    I'm sure I'm staring the solution in the face, but I can't find any way to
    persuade
    Labview to treat this "string" data as 16 bits.
    I've got the 16 bits, which is better than not having them, but I don't have
    much hair left.

    duh, well I finally discovered the "Unflatten from String" function. A guy
    just feeds in the bytes he's collected from his serial port that Labview
    thinks are a "string", and out come lovely little unsigned 16 bit numbers,
    or whatever other type of number he wants to turn the bytes into. And there
    are great little bit twiddlers available after that, like "swap bytes", and
    you can mask out bits with the logic operators, why this is fun. There's
    nothing like being a moron...... fly me to the moon...................
    "David Lewis" wrote in message
    news:[email protected]..
    > The two bytes would come from a serial port read.vi in Labview, classed as
    a
    > string. For instance, D3 and 02. The output wou
    ld swap the two bytes,
    i.e.
    > to 02 and D3, consider the two swapped bytes as 16 bits, drop the six most
    > significant bits, and output the ten bits that are left as an integer
    > classed by Labview as some kind of number, not a string.
    >
    > Your example StringToBits_Converter.vi I found on the ni.com site
    > unfortunately gives an error message and refuses to open on my system
    saying
    > it comes from a newer version of Labview 6 than I am running. Mine says
    > 6.0.1b3. Thank you very much anyway.
    >
    > "FightOnSCTrojan" wrote in message
    > news:[email protected]..
    > > In another words, you want to create a VI in which the input is 2
    > > strings (i.e. AB) and the output is the converted array bits (e.g.
    > > 1010101010101010)?
    >
    >

  • How does iCloud Photo Library and Optimize iPhone Storage Work?

    Even Apple Phone support can't answer these questions:
    How does iCloud Photo Library (Beta) from yesterday's 8.1 update with Optimize iPhone Storage turned on work? (I'm on an iPhone 6)
    It only stores your iPhone/iPad versions on your device, which is amazing. Why would you need anything else? It freed up around 8-10GB of space on my device which is amazing. But how does it work when you use it?
    When you email it seems to ask you, when sending what size you want to send like it's always done. It gives you the original 2.4MB version. This works like I'd imagine and when I received the test email the photo was correct. In this case I assume it hits iCloud and sends it from there, not your actual device. (Like it doesn't re-download it to email it). Correct?
    When posting to Facebook, does it do this same thing? Or is this something Facebook has to build into their iOS app in an update? Or does it just work? Correct?
    When posting to Instagram, does it grab the right version. Obviously the phone optimized version should be fine, but when viewing on a Desktop version of Instagram at instagram.com, will it show the right version?
    Sometimes I backup photos using Image Capture on the Mac. If I did that right now, would it only grab the iPhone versions? Obviously I can just test it but it'd be amazing if someone who knows these things could explain all of these use cases.
    Do you need to be on
    In closing it's more of how does this work? Does it work? Why wouldn't you want to use this feature if it saved space and made more sense? I guess I just would love some real clarity since not even the blogs are explaining how it works in every application.
    In closing part 2. It does seem to work really well, it's just those fringe cases. I just viewed all my photos on https://beta.icloud.com/#photos and they're all there, easy download of the high res, delete, it deletes from my camera roll on my phone, it's amazing, it works, it's magic. Just tell me what issues there are with storing only low res iPhone on my device and if there are none, game on!
    Thanks!

    santiagofrommiami wrote:
    And of those 4.3GB of backup, my Photo Library is 1.4GB.
    So my question is, how do I prevent my Photo Library from being backed up to the cloud, since I already have a backup of it everytime I connect to iPhoto and it copies all those photos to my mac?
    I don't know, sorry. It's supposed to work alongside Photos & iCloud, so that photos are stored only once. When it doesn't work you have a couple of options as I see it –
    Delete the old backups on iCloud to hopefully start over (I don't like deleting the only backup of anything).
    Forget about iCloud backups & use iTunes to backup instead, it might not be suitable if you have no computer etc.
    Buy more storage for iCloud.
    I don't use iCloud backup, it bemuses me with issues like this, there is no easy way to resolve when it fails.
    And one more question while we are at it...can I erase iphoto from my computer now that I have the new Photos app?
    That is up to you. If you are happy you do not need it & have a backup of it go ahead & remove it. You can re-download it from the app store if it is already in your Mac App store account.

  • How to build the  FM data I_header and I_orgdata

    hi all,
    I’m working on the conversion program for AVL using the following function modules
    BBP_PD_AVL_GETLIST
    BBP_PD_AVL_CREATE
    BBP_PD_AVL_UPDATE
    BBP_PD_AVL_SAVE
    In the function module BBP_PD_AVL_CREATE , how to build the FM data  I_HEADER and I_ORGDATA.
    I'm giving 3 input in Export parameter in BBP_PD_AVL_GETLIST  and E_pdlist should contain data .
    but e_pdlist is not getting data...any suggestion..
    after execution it was showing  "Buffer table is not up to date"
    with regards,
    P.lokesh

    Hi Lokesh,
    We are also encountering same problem.
    How did you solve your problem?
    Would really appreciate your help.
    Thanks,
    Kezia

  • How to get sysnr value in a Function Module

    Hi all,
    I need to get the sysnr(system number) value of the R/3 system. I execute a RFC function module and need to get the value of sysnr of the system it executes in as a return parameter. Can somebody tell me how to get this value in the function module and return it.
    Thanks and Regards,
    Pratik

    Hello Pratik
    The system number has to be defined in the RFC destination. Thus, select on your local system (where you call the RFC function module) the corresponding RFC destination from table <b>RFCDES</b>. In field RFCDES-RFCOPTIONS you will find a string like this:
    H=<ip address>,S=21,R=N, ...
    S=system number
    Regards
      Uwe

  • Search and replace string function

    Hello, I am using the "search and replace string" function and it does nt seem to work consistently for me.   I am using it in a situation where I am taking an array of strings, converting this into a spreadsheet string then deleting all of the commas.  Has anyone experienced the same behavior? I have searched through other posts and found other simular faults but none of the fixes worked for this. I can post the code it needed.
    Thanks,
    Andrew

    I agree that commas are often not desirable, especially if your software should also work in countries where comma is used as a decimal seperator.
    Where are the commas coming from? Does (1) each element of the original array have one (or more), do you (2) use comma as seperator if you convert it to a spreadhseet string?
    For (1), you might just strip out the comma for each element right in the loop. For case (2) you would simply use a different separator to begin with, of course.
    Btw: you are abusing a WHILE loop as a FOR loop, because you have a fixed number of iterations. Please replace it with a FOR loop. If you use a FOR loop, LabVIEW can manage memory much more efficiently, because it can allocate the entire output array before the loop starts. For While loops, the total number of iterations is not known to the compiler. (Of course a real program would also stop the loop if an error occurs. In this case you would need to stay woth the WHILE loop. )
    Do you have a simple example how the raw array elements look like. How many commas are there?
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Graphics Card for Mac Pro 3,1 (Early 2008)

    Hello all, I'm finally in the market to purchase a graphics card this faithful sidekick for gaming-related reasons. But, there are a few things I'd like to know before I really get elbow-deep in researching to find the perfect one for the price. Firs

  • How do I get rid of spam pop ups and ads?

    how do I get rid of spam pop ups and ads?

  • HT2534 Why isn't there a 'none' option for my payment information?

    I have a debit card on my iTunes account and I added it a while ago. Now it is saying that my security code isn't valid so I just want to get my debit card off of my iTunes account COMPLETELY. My problem is that I can't find the 'none' option for pay

  • AcroPDF.dll User Licence and Allowed Usage

    I am developing a VB.Net program, part of its functionality is dispalying a pdf document. I am using the SDK AcroPDF.dll (AcroPDFLib.AxAcroPDF object) which works fine. Can I distribute the .dll with my VB code for free even if I sell the program for

  • Traversing data along foreign keys?

    Hi, I am just wondering whether the following scenario is possible. I have three tables A, B and C, The relationship between them is: A ----> C ( many-to-one ) B ----> C ( many-to-one ) Now user updates the table C and I know I can capture what has c