'\n' and other notations in string concatonations!

Can anyone tell me what the notation for tab is in string concatonations. The only one I know is '\n' for new line. I have looked for a list of these in many places, but as yet I'm unsuccessful.
Thanks in advace,
murrayjr.

From the JLS:
http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#101089
EscapeSequence:
     \ b               /* \u0008: backspace BS */
     \ t               /* \u0009: horizontal tab HT */
     \ n               /* \u000a: linefeed LF */
     \ f               /* \u000c: form feed FF */
     \ r               /* \u000d: carriage return CR */
     \ "               /* \u0022: double quote " */
     \ '               /* \u0027: single quote ' */
     \ \               /* \u005c: backslash \ */Cheers, Neil

Similar Messages

  • Array access notation with strings?

    I may be confused, but I thought you could use array access
    notation with strings. Can someone tell me why this code doesn't
    work (or suggest new code):
    the code is meant to rewrite the block of text in tText at a
    rate of one character per frame... (when the function is called
    once per frame) but it doesn't work.

    DZ-015,
    > I may be confused, but I thought you could use
    > array access notation with strings.
    It's made for objects, actually. The array access operator,
    [], allows
    you to access elements from an Array instance and also lets
    you access
    properties from any sort of object. The "trick" it provides,
    in this latter
    case, is that you can refer to these properties -- within the
    brackets --
    with strings, so it's often used to reference objects
    dynamically.
    > var sWorkingText:String = tText.text;
    Here you've declared a String variable and set it to the
    TextField.text
    property of some textfield. So far, so good.
    > var sNewText:String = oPhotoText[sPageFocus];
    Here, you've declared a String variable, but it seems that
    you're
    setting it to a property of the oPhotoText object. That's now
    how this
    works.
    The array access operator allows you to *use* strings to get
    at an
    object's properties:
    // functionally equivalent
    someObject.property1
    someObject["property" + 1];
    var x:Number = 1;
    someObject["property" + x];
    Does that help?
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Fix many web access problems with IFS 9.0.1 on Solaris (and other OS's)...

    When the installation is done according to the documentation,
    web access does not work because the scripts that add entries to
    the jserv.properties file add duplicate references to
    wrapper.env and wrapper.classpath. Look at the jserv.properties
    file below and look at the remarked-out (#) lines of the
    duplicate references. For example, look at the references to the
    wrapper.env=LD_LIBRARY_PATH
    Oracle, please note this bug so the web access problems are
    minimized when the product is intstalled.
    Thank you,
    William T.
    # Apache JServ Configuration
    File #
    ################################ W A R N I N G
    # Unlike normal Java properties, JServ configurations have some
    important
    # extensions:
    # 1) commas are used as token separators
    # 2) multiple definitions of the same key are concatenated in
    a
    # comma separated list.
    # Execution parameters
    # The Java Virtual Machine interpreter.
    # Syntax: wrapper.bin=[filename] (String)
    # Note: specify a full path if the interpreter is not visible in
    your path.
    wrapper.bin=/d3/Apache/jdk/bin/java
    # Arguments passed to Java interpreter (optional)
    # Syntax: wrapper.bin.parameters=[parameters] (String)
    # Default: NONE
    wrapper.bin.parameters=-Xms64m
    wrapper.bin.parameters=-Xmx128m
    # Apache JServ entry point class (should not be changed)
    # Syntax: wrapper.class=[classname] (String)
    # Default: "org.apache.jserv.JServ"
    # Arguments passed to main class after the properties filename
    (not used)
    # Syntax: wrapper.class.parameters=[parameters] (String)
    # Default: NONE
    # Note: currently not used
    # PATH environment value passed to the JVM
    # Syntax: wrapper.path=[path] (String)
    # Default: "/bin:/usr/bin:/usr/local/bin" for Unix systems
    # "c:\(windows-dir);c:\(windows-system-dir)" for Win32
    systems
    # Notes: if more than one line is supplied these will be
    concatenated using
    # ":" or ";" (depending wether Unix or Win32) characters
    # Under Win32 (windows-dir) and (windows-system-dir) will
    be
    # automatically evaluated to match your system
    requirements
    # CLASSPATH environment value passed to the JVM
    # Syntax: wrapper.classpath=[path] (String)
    # Default: NONE (Sun's JDK/JRE already have a default classpath)
    # Note: if more than one line is supplied these will be
    concatenated using
    # ":" or ";" (depending wether Unix or Win32) characters.
    JVM must be
    # able to find JSDK and JServ classes and any utility
    classes used by
    # your servlets.
    # Note: the classes you want to be automatically reloaded upon
    modification
    # MUST NOT be in this classpath or the classpath of the
    shell
    # you start the Apache from.
    wrapper.classpath=/d3/Apache/jdk/lib/tools.jar
    wrapper.classpath=/d3/Apache/Jserv/libexec/ApacheJServ.jar
    wrapper.classpath=/d3/Apache/Jsdk/lib/jsdk.jar
    # An environment name with value passed to the JVM
    # Syntax: wrapper.env=[name]=[value] (String)
    # Default: NONE on Unix Systems
    # SystemDrive and SystemRoot with appropriate values on
    Win32 systems
    wrapper.env=PATH=/d3/bin
    # An environment name with value copied from caller to Java
    Virtual Machine
    # Syntax: wrapper.env.copy=[name] (String)
    # Default: NONE
    # Uncomment the following lines to set the default locale and
    NLS_LANG
    # setting based on the environment variables.
    # wrapper.env.copy=LANG
    # wrapper.env.copy=NLS_LANG
    # Copies all environment from caller to Java Virtual Machine
    # Syntax: wrapper.env.copyall=true (boolean)
    # Default: false
    # Protocol used for signal handling
    # Syntax: wrapper.protocol=[name] (String)
    # Default: ajpv12
    # General parameters
    # Set the default IP address or hostname Apache JServ binds (or
    listens) to.
    # If you have a machine with multiple IP addresses, this address
    # will be the one used. If you set the value to localhost, it
    # will be resolved to the IP address configured for the locahost
    # on your system (generally this is 127.0.0.1). This feature is
    so
    # that one can have multiple instances of Apache JServ listening
    on
    # the same port number, but different IP addresses on the same
    machine.
    # Use bindaddress=* only if you know exactly what you are doing
    here,
    # as it could let JServ wide open to the internet.
    # You must understand that JServ has to answer only to Apache,
    and should not
    # be reachable by nobody but mod_jserv. So localhost is usually a
    # good option. The second best choice would be an internal
    network address
    # (protected by a firewall) if JServ is running on another
    machine than Apache.
    # Ask your network admin.
    # "*" may be used on boxes where some of the clients get
    connected using
    # "localhost"and others using another IP addr.
    # Syntax: bindaddress=[ipaddress] or [localhost] or [*]
    # Default: localhost
    bindaddress=localhost
    # Set the port Apache JServ listens to.
    # Syntax: port=[1024,65535] (int)
    # Default: 8007
    port=8007
    # Servlet Zones parameters
    # List of servlet zones Apache JServ manages
    # Syntax: zones=[servlet zone],[servlet zone]... (Comma
    separated list of String)
    # Default: NONE
    zones=root
    # Configuration file for each servlet zone (one per servlet zone)
    # Syntax: [servlet zone name as on the zones list].properties=
    [full path to configFile]
    (String)
    # Default: NONE
    # Note: if the file could not be opened, try using absolute
    paths.
    root.properties=/d3/Apache/Jserv/etc/zone.properties
    # Thread Pool parameters
    # Enables or disables the use of the thread pool.
    # Syntax: pool=true (boolean)
    # Default: false
    # WARNING: the pool has not been extensively tested and may
    generate
    deadlocks.
    # For this reason, we advise against using this code in
    production environments.
    pool=false
    # Indicates the number of idle threads that the pool may contain.
    # Syntax: pool.capacity=(int)>0
    # Default: 10
    # NOTE: depending on your system load, this number should be low
    for contantly
    # loaded servers and should be increased depending on load
    bursts.
    pool.capacity=10
    # Indicates the pool controller that should be used to control
    the
    # level of the recycled threads.
    # Syntax: pool.controller=[full class of controller] (String)
    # Default: org.apache.java.recycle.DefaultController
    # NOTE: it is safe to leave this unchanged unless special
    recycle behavior
    # is needed. Look at the "org.apache.java.recycle" package
    javadocs for more
    # info on other pool controllers and their behavior.
    pool.controller=org.apache.java.recycle.DefaultController
    # Security parameters
    # Enable/disable the execution of org.apache.jserv.JServ as a
    servlet.
    # This is disabled by default because it may give informations
    that should
    # be restricted.
    # Note that the execution of Apache JServ as a servlet is
    filtered by the web
    # server modules by default so that both sides should be enabled
    to let this
    # service work.
    # This service is useful for installation and configuration
    since it gives
    # feedback about the exact configurations Apache JServ is using,
    but it should
    # be disabled when both installation and configuration processes
    are done.
    # Syntax: security.selfservlet=true (boolean)
    # Default: false
    # WARNING: disable this in a production environment since may
    give reserved
    # information to untrusted users.
    security.selfservlet=true
    # Set the maximum number of socket connections Apache JServ may
    handle
    # simultaneously. Make sure your operating environment has
    enough file
    # descriptors to allow this number.
    # Syntax: security.maxConnections=(int)>1
    # Default: 50
    security.maxConnections=50
    # Backlog setting for very fine performance tunning of JServ.
    # Unless you are familiar to sockets leave this value commented
    out.
    # security.backlog=5
    # List of IP addresses allowed to connect to Apache JServ. This
    is a first
    # security filtering to reject possibly unsecure connections and
    avoid the
    # overhead of connection authentication.
    # <warning>
    # (please don't use the following one unless you know what you
    are doing :
    # security.allowedAddresses=DISABLED
    # allows connections on JServ'port from entire internet.)
    # You do need only to allow YOUR Apache to talk to JServ.
    # </warning>
    # Default: 127.0.0.1
    # Syntax: security.allowedAddresses=[IP address],[IP Address]...
    (Comma
    separated list of IP addresses)
    #security.allowedAddresses=127.0.0.1
    # Enable/disable connection authentication.
    # NOTE: unauthenticated connections are a little faster since
    authentication
    # handshake is not performed at connection creation.
    # WARNING: authentication is disabled by default because we
    believe that
    # connection restriction from all IP addresses but localhost
    reduces your
    # time to get Apache JServ to run. If you allow other addresses
    to connect and
    # you don't trust it, you should enable authentication to
    prevent untrusted
    # execution of your servlets. Beware: if authentication is
    disabled and the
    # IP address is allowed, everyone on that machine can execute
    your servlets!
    # Syntax: security.authentication=[true,false] (boolean)
    # Default: true
    security.authentication=false
    # Authentication secret key.
    # The secret key is passed as a file that must be kept secure
    and must
    # be exactly the same of those used by clients to authenticate
    themselves.
    # Syntax: security.secretKey=[secret key path and filename]
    (String)
    # Default: NONE
    # Note: if the file could not be opened, try using absolute
    paths.
    #security.secretKey=./etc/jserv.secret.key
    # Length of the randomly generated challenge string (in bytes)
    used to
    # authenticate connections. 5 is the lowest possible choice to
    force a safe
    # level of security and reduce connection creation overhead.
    # Syntax: security.challengeSize=(int)>5
    # Default: 5
    #security.challengeSize=5
    # Logging parameters
    # Enable/disable Apache JServ logging.
    # WARNING: logging is a very expensive operation in terms of
    performance. You
    # should reduced the generated log to a minumum or even disable
    it if fast
    # execution is an issue. Note that if all log channels (see
    below) are
    # enabled, the log may become really big since each servlet
    request may
    # generate many Kb of log. Some log channels are mainly for
    debugging
    # purposes and should be disabled in a production environment.
    # Syntax: log=[true,false] (boolean)
    # Default: true
    log=true
    # Set the name of the trace/log file. To avoid possible
    confusion about
    # the location of this file, an absolute pathname is recommended.
    # This log file is different than the log file that is in the
    # jserv.conf file. This is the log file for the Java portion of
    Apache
    # JServ.
    # On Unix, this file must have write permissions by the owner of
    the JVM
    # process. In other words, if you are running Apache JServ in
    manual mode
    # and Apache is running as user nobody, then the file must have
    its
    # permissions set so that that user can write to it.
    # Syntax: log.file=[log path and filename] (String)
    # Default: NONE
    # Note: if the file could not be opened, try using absolute
    paths.
    log.file=/d3/Apache/Jserv/logs/jserv.log
    # Enable the timestamp before the log message
    # Syntax: log.timestamp=[true,false] (boolean)
    # Default: true
    log.timestamp=true
    # Use the given string as a data format
    # (see java.text.SimpleDateFormat for the list of options)
    # Syntax: log.dateFormat=(String)
    # Default: [dd/MM/yyyy HH:mm:ss:SSS zz]
    log.dateFormat=[dd/MM/yyyy HH:mm:ss:SSS zz]
    # Since all the messages logged are processed by a thread
    running with
    # minimum priority, it's of vital importance that this thread
    gets a chance
    # to run once in a while. If it doesn't, the log queue overflow
    occurs,
    # usually resulting in the OutOfMemoryError.
    # To prevent this from happening, two parameters are used:
    log.queue.maxage
    # and log.queue.maxsize. The former defines the maximum time for
    the logged
    # message to stay in the queue, the latter defines maximum
    number of
    # messages in the queue.
    # If one of those conditions becomes true (age > maxage || size
    maxsize),# the log message stating that fact is generated and the log
    queue is
    # flushed in the separate thread.
    # If you ever see such a message, either your system doesn't
    live up to its
    # expectations or you have a runaway loop (probably, but not
    necessarily,
    # generating a lot of log messages).
    # WARNING: Default values are lousy, you probably want to tweak
    them and
    # report the results back to the development team.
    # Syntax: log.queue.maxage = [milliseconds]
    # Default: 5000
    log.queue.maxage = 5000
    # Syntax: log.queue.maxsize = [integer]
    # Default: 1000
    log.queue.maxsize = 1000
    # Enable/disable logging the channel name
    # Default: false
    # log.channel=false
    # Enable/disable channels, each logging different actions.
    # Syntax: log.channel.[channel name]=[true,false] (boolean)
    # Default: false
    # Info channel - quite a lot of informational messages
    # hopefully you don't need them under normal circumstances
    # log.channel.info=true
    # Servlets exception, i.e. exception caught during
    # servlet.service() processing are monitored here
    # you probably want to have this one switched on
    log.channel.servletException=true
    # JServ exception, caught internally in jserv
    # we suggest to leave it on
    log.channel.jservException=true
    # Warning channel, it catches all the important
    # messages that don't cause JServ to stop, leave it on
    log.channel.warning=true
    # Servlet log
    # All messages logged by servlets. Probably you want
    # this one to be switched on.
    log.channel.servletLog=true
    # Critical errors
    # Messages produced by critical events causing jserv to stop
    log.channel.critical=true
    # Debug channel
    # Only for internal debugging purposes
    # log.channel.debug=true
    #wrapper.classpath=/d3/ord/jlib/ordim.zip
    #wrapper.classpath=/d3/ord/jlib/ordhttp.zip
    # Oracle XSQL Servlet
    wrapper.classpath=/d3/lib/oraclexsql.jar
    # Oracle JDBC
    wrapper.classpath=/d3/jdbc/lib/classes12.zip
    # Oracle XML Parser V2 (with XSLT Engine)
    wrapper.classpath=/d3/lib/xmlparserv2.jar
    # Oracle XML SQL Components for Java
    wrapper.classpath=/d3/rdbms/jlib/xsu12.jar
    # XSQLConfig.xml File location
    wrapper.classpath=/d3/xdk/admin
    # Oracle BC4J
    wrapper.classpath=/d3/ord/jlib/ordim.zip
    wrapper.classpath=/d3/ord/jlib/ordvir.zip
    wrapper.classpath=/d3/ord/jlib/ordhttp.zip
    wrapper.classpath=/d3/BC4J/lib/jndi.jar
    wrapper.classpath=/d3/BC4J/lib/jbomt.zip
    wrapper.classpath=/d3/BC4J/lib/javax_ejb.zip
    wrapper.classpath=/d3/BC4J/lib/jdev-rt.jar
    wrapper.classpath=/d3/BC4J/lib/jbohtml.zip
    wrapper.classpath=/d3/BC4J/lib/jboremote.zip
    wrapper.classpath=/d3/BC4J/lib/jdev-cm.jar
    wrapper.classpath=/d3/BC4J/lib/jbodomorcl.zip
    wrapper.classpath=/d3/BC4J/lib/jboimdomains.zip
    wrapper.classpath=/d3/BC4J/lib/collections.jar
    wrapper.classpath=/d3/Apache/Apache/htdocs/onlineorders_html
    #wrapper.classpath=/d3/Apache/Apache/htdocs/OnlineOrders_html/Onl
    ineOrders.jar
    # The following classpath entries are necessary for EJBs to run
    in IAS or DB when
    present
    wrapper.classpath=/d3/lib/aurora_client.jar
    wrapper.classpath=/d3/lib/vbjorb.jar
    wrapper.classpath=/d3/lib/vbjapp.jar
    # Oracle Servlet
    wrapper.classpath=/d3/lib/servlet.jar
    # Oracle Java Server Pages
    wrapper.classpath=/d3/jsp/lib/ojsp.jar
    # Oracle Util
    wrapper.classpath=/d3/jsp/lib/ojsputil.jar
    # Oracle Java SQL
    wrapper.classpath=/d3/sqlj/lib/translator.zip
    # Oracle JDBC
    #wrapper.classpath=/d3/jdbc/lib/classes12.zip
    # SQLJ runtime
    wrapper.classpath=/d3/sqlj/lib/runtime12.zip
    # Oracle Messaging
    wrapper.classpath=/d3/rdbms/jlib/aqapi.jar
    wrapper.classpath=/d3/rdbms/jlib/jmscommon.jar
    # OJSP environment settings
    #wrapper.env=ORACLE_HOME=/d3
    # The next line should be modified to reflect the value of the
    SID for your
    webserver.
    #wrapper.env=ORACLE_SID=cmpdb
    #wrapper.env=LD_LIBRARY_PATH=/d3/lib
    ## Enable the flag below if you are using jdk 1.2.2_05a or above
    #wrapper.env=JAVA_COMPILER=NONE
    # Advanced Queuing - AQXML
    wrapper.classpath=/d3/rdbms/jlib/aqxml.jar
    #wrapper.classpath=/d3/rdbms/jlib/xsu12.jar
    #wrapper.classpath=/d3/lib/xmlparserv2.jar
    wrapper.classpath=/d3/lib/xschema.jar
    #wrapper.classpath=/d3/jlib/jndi.jar
    wrapper.classpath=/d3/jlib/jta.jar
    oemreporting.properties=/d3/Apache/Jserv/oemreporting/oemreportin
    g.properties
    zones = root, oemreporting
    wrapper.classpath=/d3/jlib/share-opt-1_1_9.zip
    wrapper.classpath=/d3/jlib/caboshare-opt-1_0_3.zip
    wrapper.classpath=/d3/jlib/marlin-opt-1_0_7.zip
    wrapper.classpath=/d3/jlib/tecate-opt-1_0_4.zip
    wrapper.classpath=/d3/jlib/ocelot-opt-1_0_2.zip
    wrapper.classpath=/d3/jlib/regexp.jar
    wrapper.classpath=/d3/jlib/sax2.jar
    #wrapper.classpath=/d3/jlib/servlet.jar
    wrapper.bin.parameters= -DORACLE_HOME=/d3
    #wrapper.env=LD_LIBRARY_PATH=/d3/lib32
    wrapper.env.copy=DISPLAY
    wrapper.bin.parameters=-DORACLE_HOME=/d3
    #wrapper.classpath=/d3/lib/vbjorb.jar
    #wrapper.classpath=/d3/lib/vbjapp.jar
    wrapper.classpath=/d3/classes/classesFromIDLVisi
    wrapper.classpath=/d3/jlib/swingall-1_1_1.jar
    wrapper.classpath=/d3/jlib/ewtcompat3_3_15.jar
    wrapper.classpath=/d3/jlib/ewt-3_3_18.jar
    wrapper.classpath=/d3/jlib/share-1_1_9.jar
    wrapper.classpath=/d3/jlib/help-3_2_9.jar
    wrapper.classpath=/d3/jlib/ice-5_06_3.jar
    wrapper.classpath=/d3/jdbc/lib/classes111.zip
    wrapper.classpath=/d3/classes
    wrapper.classpath=/d3/jlib/oembase-9_0_1.jar
    wrapper.classpath=/d3/jlib/oemtools-9_0_1.jar
    wrapper.classpath=/d3/jlib
    wrapper.classpath=/d3/jlib/javax-ssl-1_1.jar
    wrapper.classpath=/d3/jlib/jssl-1_1.jar
    wrapper.classpath=/d3/jlib/netcfg.jar
    wrapper.classpath=/d3/jlib/dbui-2_1_2.jar
    #wrapper.classpath=/d3/lib/aurora_client.jar
    #wrapper.classpath=/d3/lib/xmlparserv2.jar
    wrapper.classpath=/d3/network/jlib/netmgrm.jar
    wrapper.classpath=/d3/network/jlib/netmgr.jar
    wrapper.classpath=/d3/network/tools
    wrapper.classpath=/d3/jlib/kodiak-1_2_1.jar
    wrapper.classpath=/d3/sysman/jlib/netchart360.jar
    wrapper.classpath=/d3/jlib/pfjbean.jar
    wrapper.env=SHLIB_PATH=/d3/lib32
    wrapper.env=LIBPATH=/d3/lib32
    wrapper.classpath=/d3/ultrasearch/lib/isearch_midtier.jar
    wrapper.classpath=/d3/ultrasearch/lib/isearch_query.jar
    wrapper.classpath=/d3/ultrasearch/lib/jgl3.1.0.jar
    wrapper.classpath=/d3/lib/mail.jar
    wrapper.classpath=/d3/lib/activation.jar
    wrapper.classpath=/d3/ultrasearch/jsp/admin/config
    # Additions for iFS
    ## DO NOT REMOVE OR ALTER THE FOLLOWING LINE ....
    # iFS true
    # Uncomment if you want to use the same Jserv as other
    applications
    wrapper.classpath=/d3/9ifs/custom_classes
    wrapper.classpath=/d3/9ifs/settings
    wrapper.classpath=/d3/9ifs/lib/adk.jar
    wrapper.classpath=/d3/9ifs/lib/email.jar
    wrapper.classpath=/d3/9ifs/lib/http.jar
    wrapper.classpath=/d3/9ifs/lib/release.jar
    wrapper.classpath=/d3/9ifs/lib/repos.jar
    wrapper.classpath=/d3/9ifs/lib/utils.jar
    wrapper.classpath=/d3/9ifs/lib/webui.jar
    wrapper.classpath=/d3/9ifs/lib/provider.jar
    wrapper.classpath=/d3/jlib/javax-ssl-1_2.jar
    wrapper.classpath=/d3/jlib/jssl-1_2.jar
    wrapper.env=ORACLE_HOME=/d3
    wrapper.env=ORACLE_SID=cmpdb
    wrapper.env=LD_LIBRARY_PATH=/d3/lib:/d3/ctx/lib:/d3/lib32
    wrapper.env=NLS_LANG=.US7ASCII
    ## Additions for the iFS zone
    # Uncomment if you want to use the same Jserv as other
    applications
    zones=ifs
    ifs.properties=/d3/Apache/Jserv/etc/ifs.properties
    # End iFS section

    About your home page; Manually set up Firefox with the window(s) and tab(s)
    the way you want them to be. Then;
    '''''Firefox Options > General > Homepage'''''.
    Press the button labeled ''''Use Current'''.'
    =====================================
    Open a new window or tab. In the address bar, type '''''about:config'''''.
    If a warning screen comes up, press the '''''Be Careful''''' button.
    This is where Firefox finds information it needs to run.
    At the top of the screen is a search bar. Enter '''''browser.newtab.url'''''
    and press enter. '''''browser.newtab.url'''''
    tells Firefox what to show when a new tab is opened.
    If you want, right click and select '''''Modify'''''. You can change the
    setting to;<BR><BR>about:home (Firefox default home page),<BR>
    about:newtab (shows the sites most visited),<BR>
    about:blank (a blank page),<BR>
    or you can enter any web page you want.<BR><BR>
    The same instructions are used for the new window setting, listed as
    '''''browser.startup.homepage'''''.

  • Should I use Standard C++ Containers and Stuff for games and other real time activities?

    Hello,
    I'm a C++ developer using VS 2012 and VS 2010 for developing AAA titles. I have read about not using STL and other stuff provided in the standard headers that come with VS. I read most of the stuff on the websites based on game programming and some
    are really from the people well known in the industry. I have seen cases where they wont even use vector, list, map and others and not even use utility functions and algorithms. In such cases they write those containers and stuff themselves which has almost
    the same interface and so much of debug and implementation time spent on such huge code.
    I have two questions:
    1: Isn't the C++ implementation that comes with VS optimized for the platform for better performance? Isn't it using some intrinsic functions that people on the client end doesn't know about and supplying their own implementation would indeed be
    more slower in basic container operations such as insert, remove, find, swap, copy? Lets assume that we supply our own custom allocators for faster memory management to every container that we use. Also, they take care of fragmentation, alignment and stuff.
    Why develop custom containers with almost same interface, why not spend that time on writing allocators and other stuff that might actually help?
    2: There are times when we include a lot, a lot, of unnecessary stuff through the standard headers in a huge code base. Unnecessary, because we only needed a thing or two from such huge headers including other huge headers and so on. Now, I know templates
    aren't instantiated unless used, same goes for the members functions inside them and blah blah. Since, these are precompiled headers, it is safe to assume that there is no compile time hit for that unnecessary stuff. My question is, is there any hidden effect
    of such inclusions on code size (executable) that grows with the huge growth of the code base? In my opinion there shouldn't be, but I wanna know I'm not mistaken just in case. 

    Hi
    I can tell you a story about one of our projects. We had to implement a block management system for harddisks (like the parts of file systems that allocate, free blocks and do the bookkeeping stuff). Now, one guy was convinced, that we should use the STL,
    because it's easy to use and very well optimized and things like that. An other one said, that he would implement it by hand. So we decided to do both for a little test. The result was, that the hand implemented thing was much easier to write and much faster...
    and the one using STL saw, that some classes were so slow, that he couldn't believe it... he then tryed to build some classes by hand and exchange them (e.g. array classes and stuff like that) and it was way faster than the STL and he wrote them in minutes
    (!)... since then nobody wanted to use STL again... we don't even try it. It ended that we wrote our own string and array classes and stuff like that... easy little things that we understand. Now it's easy to use and fast and still flexible, because we know
    what it's doing...
    ... but, that's just a story about our development and of course, we're often programming very close to the hardware and also using assembler languages often... so, I don't know what this tells us... you have to decide :-)
    Rudolf

  • Splitting and type casting huge string into arrays

    Hello,
    I'm developing an application which is supposed to read measurement files. Files contain I16 and SGL data which is type casted into string. I16 data is data from analog input and SGL is from CAN-bus data in channel form. CAN and analog data is recorded using same scan rate.
    For example, if we have 6 analog channels and 2 CAN channels string will be (A represents analog and C represents CAN):
    A1 A2 A3 A4 A5 A6 C1 C2 A1 A2 A3 A4 A5 A6 C1 C2 A1 A2 .... and so on
    Anyway, I have problems reading this data fast enough into arrays. Most obvious solution to me was to use shift registers and split string in for loop. I created a for loop with two inner for loops. Number of scans to read from string is wired to N terminal of the outermost loop. Shift register is initialized with string read from file.
    First of the inner loops reads analog input data. Number of analog channels is wired to its N terminal. It's using split string to read 2 bytes at a time and then type casts data to I16. Rest of the string is wired to shift register. When every I16 channel from scan is read, rest of the string is passed to shift register of the second for loop.
    Second loop is for reading CAN channels. It's similar to first loop except data is read 4 bytes at a time and type casted to SGL. When every CAN channel from scan is read, rest of the string is passed to shift register of the outermost loop. Outputs of type cast functions are tunneled out of loops to produce 2D arrays.
    This way reading about 500 KB of data can take for example tens of seconds depending on PC and number of channels. That's way too long as we want to read several megabytes at a time.
    I created also an example with one inner loop and all data is type casted to I16. That is extremely fast when compared to two inner loops!
    Then I also made a test with two inner loops where I replaced shift register and split string with string subset. That's also faster than two inner loops + shift register, but still not fast enough. Any improvement ideas are highly appreciated. Shift register example attached (LV 7.1)
    Thanks in advance,
    Jakke Palonen
    Attachments:
    String to I16 and SGL arrays.vi ‏39 KB

    OK, there is clearly room for improvement. I did some timing and my two above suggestions are already about 100x faster than yours. A few teeaks led to a version that is now over 500x faster than the original code.
    A few timings on my rather slow computer (1GHz PIII Laptop) are shown on the front panel. For example with 10000 scans (~160kB data as 6+2) my new fastest version (Reshape II) takes 14 ms versus the original 7200ms! It can do 100000 scans (1.6MB data) in under 200 ms and 1000000 scans (15MB data) in under 2 seconds.
    I am sure the code could be further improved. I recommend the Reshape II algoritm. It is fastest and can deal with variable channel counts. Modify as needed.
    Attached is a LabVIEW 7.1 version of the benchmarking code, containing all algorithms. I have verified that all algorithms produce the same result (with the limitation that the cluster version only works for 6*I16+2*SGL data, of course). Remember that the reshape function is extremely efficient, because it does not move the data in memory. I have some ideas for further improvements, but this should get you going.
    Message Edited by altenbach on 08-05-2005 03:06 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    StringI16SGLCastingTimer.png ‏48 KB
    StringtoI16andSGLArraysMODTimer.vi ‏120 KB

  • Adding AdSense and Other Script Based Items to iWeb Websites

    For all those who are trying to figure out how to add AdSense and other script based content, here is a tutorial on how to do so. You can see this article with graphics and other niceties on my website:
    http://keylime.ca/adsense%20on%20iweb.html
    For now, here is the text-only version.
    The following is a simple step by step how-to for adding script based items to iWeb based websites easily and quickly.
    First things first, you need a tool to use for finding and replacing text in numerous files quickly and easily. This one works great, and is free:
    http://lonestar.utsa.edu/llee/applescript/simplefindreplace.html
    This tutorial will show you how to add AdSense banners--but you could easily add any sort of script based content with the same instructions.
    1. Open your iWeb project.
    2. Click on the Inspector. Click on the Page properties icon.
    3. In the Header Height field, increase it enough to add your AdSense banner. The banners are of various sizes. You should know this value from when you generated your AdSense code.
    4. Add a Text item to your page. Make the text item as large as your banner.
    5. Add a unique string to your text item, such as mywebsitenamegoogleads. It is vital that the text string be unique and not be anywhere else in the page. The string must be the same in each text item on each page you will be adding AdSense banners to. You can center the text, but no not vertically center it. Vertically centering the text will turn the text item into a PNG file as opposed to a document division!
    6. Cmd-Click the text item and drag it into the header. Cmd-Clicking an item allows you to move it into a footer or header.
    7. Repeat steps 1 through 6 for each page you will be adding AdSense banners to. Take note: Once you lay out your page header, you can select all of it, copy, and paste it to each page. iWeb remembers its original position, so you don’t have to move it around!
    8. Publish your site to a folder. It is against the terms and conditions of .mac to have ads on your .mac account, so you will have to put your site on a regular server.
    9. Open Simple Find and Replace.
    10. Drag and drop the folder you published your website to into the target field in Simple Find and Replace.
    11. Put your unique string from step 5 into the Find field.
    12. Put your AdSense code into the Replace field.
    13. Click Start Replacing.
    14. Put your website online. That’s it!
    I hope Apple decides to integrate a tool to make this easier!
      Mac OS X (10.4.5)  

    Should be the same process whether you publish to .Mac or any other host. You're dealing with the same files in either case. Just follow the directions and you'll do just fine! Good luck!
    James
    ==> www.DirtDoog.com <==</a>    
    Place A Virtual Pin On Putt-Putt's GuestMap!

  • I want to take a series of hex characters in a string control and produce an HDLC string indicator for example if the data string control is 3F27 then the HDLC string indicator is 7E003F2700B57E

    I want to take a series of hex characters in a string control and produce an HDLC string indicator for example if the data string control is 3F27 then the HDLC string indicator is 7E003F2700B57E

    "thanks for your help "
    Does that mean you figured it out already?
    If not, see this thread for some HDLC related code.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=146859&query.id=3388#M146859
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • NEW SOLUTION TO UR MISSING CONTENT OF LOGIC STUDIOS  EXS24 and others...

    hi folks...you're be suprise i've dunn possibly EVERYthing to ressurect the missing contents of EXS24 and other sounds thats has been gone due to installation of Logic Studio...Now for those who transfer there LP7 to the LS8 songs sumtym get no strings and blah blah blah...to limit this down for you...
    heres wat to do...
    go on to garageband...
    create new song and click the plus button to add a new software instrument and you'll get a panel on the rightside of the GB screen with ur desired instruments you'd like to use for to create music...now go on to strings...and you'll see the highlighted outcasted string such as hollywood string and others...double click on it and it'll ask to install GB componant/jam packs and click accept and follow instructions...as its all done and dusted you got all ur preset sounds on ur new logic and everything that wasn't working from LP7 to LS8 is now sorted...and works fully like LP7...lol
    and i half expected that it wudn't work i'm now literally over the moon i can continue doing my mixtape...:D

    wt i wasn't clear enough is to make sure you have garageband '08 and not garageband 3 or oldies...i figure dthis out wen i did the same on my macbook coz i originally done this on my imac...and figured out the software versions wer different in order to get these missing components...make sure you have Garageband '08 in order to get the missing samplers on ur logic..i've hoped i've helped you out...:) enjoy.

  • GOOP queues and other stored references

     need to ask this because Im not at the target machine to try it myself until Monday.
    Re Endevo by ref Goop Wizard 3.0.5
    I am using queues in process objects.
    WHen I create the object I create the queue and store the queue reference in the attributes of the object.
    Then I use the queue for controlling public status and shutdown functions etc..
    Question is the following.
    I ran into a glitch today whereby the queue refs and some other refs go invalid while the Goop repository is showing "live" objects.
    The values of the refs are intact but they are invalid
    Anyone have any Idea what I am describing?
    Thank You
    PS: I hope this isn't simply Labview not running. How can that be when I am using the object inspector. I don't yet get it.

    No I do not think it is an error.
    It turns out the queue and DAQ Task references go invalid because of the relationship of the endevo GOOP object to LabVIEW. (or so it seems)  I think it is because the VI that created the object goes idle and so LabVIEW assumes the ref is no longer needed (despite any  options settings. )
    I am seeing the objects in the Goop repository however references to queues and Data acquisition tasks are invalidated as
    soon as the VI that uses them goes idle.
    It does not seem to afffect field point references or VIsa com ports and also all other data in the goop object seems fine. I guess thats because FP and VIsa are only strings
    Its a real snag to me because I did not see it coming. Now I have to create the queue and reestablish the Daq tasks to insure it is valid
    after the create method even if the object exists. 
     I prefer to use the create or look up existing feature of the method because it gives a lot of flexibility.
    Thank You

  • How to block MacKeeper and other browser ads

    how to
    block MacKeeper and other browser ads

    There is no need to download anything to solve this problem. You may have installed a variant of the "VSearch" ad-injection malware. Follow Apple Support's instructions to remove it.
    If you have trouble following those instructions, see below.
    Malware is always changing to get around the defenses against it. This procedure works as of now, as far as I know. It may not work in the future. Anyone finding this comment a few days or more after it was posted should look for a more recent discussion, or start a new one.
    The VSearch malware tries to hide itself by varying the names of the files it installs. To remove it, you must first identify the naming pattern.
    Triple-click the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination  command-C:
    /Library/LaunchDaemons
    In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder named "LaunchDaemons" may open. Look inside it for two files with names of the form
              com.something.daemon.plist
    and
               com.something.helper.plist
    Here something is a variable string of characters, which can be different in each case. So far it has always been a string of letters without punctuation, such as "cloud," "dot," "highway," "submarine," or "trusteddownloads." Sometimes it's a meaningless string such as "e8dec5ae7fc75c28" rather than a word. Sometimes the string is "apple," and then you must be especially careful not to delete the wrong files, because many built-in OS X files have similar names.
    If you find these files, leave the LaunchDaemons folder open, and open the following folder in the same way:
    /Library/LaunchAgents
    In this folder, there may be a file named
              com.something.agent.plist
    where the string something is the same as before.
    If you feel confident that you've identified the above files, back up all data, then drag just those three files—nothing else—to the Trash. You may be prompted for your administrator login password. Close the Finder windows and restart the computer.
    Don't delete the "LaunchAgents" or "LaunchDaemons" folder or anything else inside either one.
    The malware is now permanently inactivated, as long as you never reinstall it. You can stop here if you like, or you can remove two remaining components for the sake of completeness.
    Open this folder:
    /Library/Application Support
    If it has a subfolder named just
               something
    where something is the same string you saw before, drag that subfolder to the Trash and close the window.
    Don't delete the "Application Support" folder or anything else inside it.
    Finally, in this folder:
    /System/Library/Frameworks
    there may an item named exactly
                v.framework
    It's actually a folder, though it has a different icon than usual. This item always has the above name; it doesn't vary. Drag it to the Trash and close the window.
    Don't delete the "Frameworks" folder or anything else inside it.
    If you didn't find the files or you're not sure about the identification, post what you found.
    If in doubt, or if you have no backups, change nothing at all.
    The trouble may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Then, still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • 10g won't recognize ellipsis and other special characters.

    I'm trying to insert data into both VARCHAR2 and CLOB columns that contains characters such as ellipsis and other special characters. Oracle doesn't recognize the characters and just converts it to garbage. Is there a way to make Oracle easily recognize these characters?
    For example, it won't recognize the following ellipsis in the string:
    "Here we are … right now."

    My bad...I did look at the national character set instead.
    When I performed theq query you posted, I got the following:
    NLS_CHARACTERSET
    WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    I hope this new information helps. Also, the tool involved is SQL *Plus, but I'm currently concentrated on getting the insert to work via JDBC. Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Yosemite finder crashes with previewig .txt and other files

    Hello,
    under Yosemite  the Finder crashes with previewig .txt and other files.
    Is this just my problem? Help please.
    Thank you very much.
    Regards.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the name of the crashed application or process. For example, if Safari crashed, you would enter "Safari" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ User Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of crash reports. The name of each report starts with the name of the process, and ends with ".crash". Select the most recent report related to the process in question. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    If you don't see any reports listed, but you know there was a crash, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • How do I get rid of 97] in Cookies and other website data

    When I open Preferences/Privacy and select "Details" under "Cookies and other website data" the first entry which pops up is
                 97] plug-ins
    If I highlight this entry and click remove, It is removed for perhaps 10 seconds, and then re-appears in the list.
    1- What is this?
    2- How do I get rid of it?
    This is clearly a prvacy issue, or Apple would not be listing it in this listing with the associated warning.

    Linc Davis wrote:
    Log out, then log back in while holding down the shift key after you enter your login password. Keep holding until the desktop appears. That will prevent third-party add-ons from loading. Try again to delete that item.
    If you still can't delete it, and you still want to, proceed as follows.
    Back up all data if you haven’t already done so. Before proceeding, you must be sure you can restore your system to the state it’s in now. If you skip this step, no one but you will be responsible for the consequences.
    Quit Safari if it’s running.
    Step 1
    Select /Applications/Safari in the Finder and open the Info window. There’s a checkbox in that window labeled “Open in 32-bit mode.” If that box is checked, uncheck it. Close the window.
    Hold down the option key and select Go > Library from the Finder menu bar (Lion) or open the Library subfolder of your home folder (pre-Lion). Delete the following items from the Library folder (some may not exist):
    Caches/com.apple.Safari
    Caches/Metadata/Safari
    Saved Application State/com.apple.Safari.savedState
    Leave the Finder window open. Try Safari again.
    Step 2
    If it still doesn’t work right, quit, go back to the Finder, and move the following file to the Desktop:
    Safari/Bookmarks.plist
    Then delete the following items (some may not exist):
    Cookies/Cookies.binarycookies
    Cookies/Cookies.plist
    Preferences/com.apple.Safari.LSSharedFileList.plist
    Preferences/com.apple.Safari.plist
    Preferences/com.apple.Safari.RSS.plist
    PubSub/Database
    Safari
    Try again. This time Safari should perform normally, but your settings will be lost. Select File > Import Bookmarks from the Safari menu bar. Import from the bookmarks file you moved to the Desktop. Recreate the rest of your Safari settings. You can then delete the old bookmarks file.
    Note: This step will remove your Safari Extensions, if any, and their settings. If you choose to restore them, do so one at a time, testing after each to make sure you haven’t restored the problem.
    If you don’t like the results of step 2, you can undo it completely by quitting Safari and restoring the items you deleted in that step from your backup, overwriting any that were created in their place. You don’t need to restore the files you deleted in step 1.
    Ok... completed step1 with no change.
    went on to "part of "step 2...
    I kept the Bookmarks.plist, but then deleted the assortment of safari related Caches and Cookies
    Cookies/Cookies.binarycookies
    Cookies/Cookies.plist
    (I found several entries in Cache, but forgot to write down which ones I deleted ... sorry.)
    did not delete any of the preferences or the last two entries in your list above.
    Tried again and "the perp" was still there. "Remove all" on the Details tab did not change things...
    However, there were now only 2 entries -- the 97] AND my bank's entry (Chase)!
    Going back to the main privacy tab and clicking "Remove all Website Data" this time DID remove the last two entries.
    =====
    Now when I open the details tab, (I run my own webserver as my home page) Safari showed ONLY the cache entry for my server, no cookies.
    However, I then noticed something quite intersting.
    I left the details tab open and pulled to the side (the joy of having a 27 inch iMac) and naviaged to Apple.com
    and then to support and then logged in to here.
    As I was doing this. the Details window first showed, "Apple.com" .. Cache, Cookies, Local Storage
    but then virtually immediately poped up entries:
    doubleclick.net ... Cache
    edgekey.net ... Cache
    google.com ... Cookies
    Very interesting, both from the point of view that "details" was showing me what was happening in "real time."
    And the fact that, even with zero external ads, the web site, Apple.com, was inserting entries in the cache for doubleclick.net and edgekey.net. I can "almost" understand the "google.com" cookie, ecept for the fact that the search engine selected in the tool bar is "bing."... as I said "interesting."
    With this new "insight" on the Details screen, It may be possible to determine WHERE this 97] actually came from. However, I would still like an explanation of what it actually is.... since the "]" (right square bracket) character is evidently a "special character" for search engines -- google, Yaho and Bing all treat it the same way -- they ignor it.... even when the entire 3 character string is quoted -- "97]" -- the pages returned all are for entries with only 97 in them.

  • How do I Enable Crud and other properties in ListViewWebPart programmatically

    In SharePoint (SharePoint Designer) 2010, to use a custom list in different sites, we used the resource to export the to site gallery. So the list became a list web part where I could use all the available resource list created on the
    same site (examples: list settings, crud, views ...)
    We need to provide the same functionality in 2013 programmatically for the user. We try ListViewWebPart class to use, but the resources of crud on the list were not available.
    I Would like to how do I enable crud and other properties in ListViewWebPart or if there is another class that does it.
    Thanks in advance

    Try below:
    http://www.dotnetcodesg.com/Article/UploadFile/2/216/CRUD%20%28Create%20Read%20Update%20Delete%29%20Operations%20on%20a%20SharePoint%20List%20programmatically.aspx
    usingSystem;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Microsoft.SharePoint;
    namespace SharePoint__CRUD_Operations_on_a_List
    {   publicpartialclass Form1
    : Form   {
         public
    Form1()     {
              InitializeComponent();
        private voidForm1_Load(object
    sender, EventArgs e)
             BindAllRecords();
        private void BindAllRecords()
              using
    (SPSite site = newSPSite("http://localhost:7000"))
                    using
    (SPWeb web = site.OpenWeb())                 {
    SPList list = web.Lists["MyContacts"];
    SPListItemCollection items
    = list.Items; cmbItemId.DataSource = items.GetDataTable();
    cmbItemId.DisplayMember =
    "Id";
    cmbItemId.ValueMember =
    "Id";
    private void btnAllItems_Click(object
    sender, EventArgs e)         {
    GetAllItems(0);
    private void btn_Search_Click(object
    sender, EventArgs e)
    using (SPSite
    site = newSPSite("http://localhost:7000"))
    using (SPWeb
    web = site.OpenWeb())                 
    SPList list
    = web.Lists["MyContacts"]; SPListItemCollection items
    = list.Items; foreach(SPListItemlistItemin
    items)                 {
    if (listItem["ID"].ToString()
    == cmbItemId.SelectedValue.ToString())                         {
    textBoxTitle.Text = (string)listItem["Title"].ToString();
    textBoxName.Text = listItem["Name"].ToString();
    textBoxAddress.Text = listItem["Address"].ToString();
    textBoxContactNo.Text = listItem["ContactNo"].ToString();
    textBoxCountry.Text = listItem["Country"].ToString();
    lblErrorMsg.Text =
    "Search Result";
    lblErrorMsg.Visible =
    true;
    DataView dv = items.GetDataTable().DefaultView;
    dv.RowFilter="ID="
    + cmbItemId.SelectedValue; dataGridViewAllItems.DataSource = dv;
    private void btn_AddItem_Click(object
    sender, EventArgs e)
    using (SPSite
    site = newSPSite("http://localhost:7000"))
    using (SPWeb
    web = site.OpenWeb())                 {
    web.AllowUnsafeUpdates =
    true;
    SPList list
    = web.Lists["MyContacts"]; SPListItem Item
    = list.Items.Add(); Item["Title"]
    = textBoxTitle.Text; Item["Name"]
    = textBoxName.Text; Item["Address"]
    = textBoxAddress.Text; Item["ContactNo"]
    = textBoxContactNo.Text; Item["Country"]
    = textBoxCountry.Text; textBoxTitle.Text =
    textBoxName.Text =
    textBoxAddress.Text =
    textBoxContactNo.Text =
    textBoxCountry.Text =
     Item.Update();
    web.AllowUnsafeUpdates =
    false;
    lblErrorMsg.Text =
    "Item Added Successfully...";
    lblErrorMsg.Visible =
    false;
    GetAllItems(0);
    private void GetAllItems(
    intItemID)
    using(SPSite
    site = newSPSite("http://localhost:7000"))
    using (SPWeb
    web = site.OpenWeb())                 {
    SPList list
    = web.Lists["MyContacts"]; SPListItemCollection items
    = list.Items; if (ItemID == 0)
    dataGridViewAllItems.DataSource = items.GetDataTable();
    else
    DataView dv = items.GetDataTable().DefaultView;
    dv.RowFilter =
    "ID=" + cmbItemId.SelectedValue;
    dataGridViewAllItems.DataSource = dv;
        private void btn_UpdateItem_Click(object
    sender, EventArgs e)     {
                using (SPSite
    site = newSPSite("http://localhost:7000"))
                       using
    (SPWeb web = site.OpenWeb())                    {
    web.AllowUnsafeUpdates = true;
    SPList list
    = web.Lists["MyContacts"];                          SPListItem
    Item = list.GetItemById(Convert.ToInt32(cmbItemId.SelectedValue));
    Item["Title"]
    = textBoxTitle.Text; Item["Name"]
    = textBoxName.Text; Item["Address"]
    = textBoxAddress.Text; Item["ContactNo"]
    = textBoxContactNo.Text; Item["Country"]
    = textBoxCountry.Text; textBoxTitle.Text =
    textBoxName.Text =
    textBoxAddress.Text =
    textBoxContactNo.Text =
    textBoxCountry.Text =
    Item.Update();
    web.AllowUnsafeUpdates =
    false;
    lblErrorMsg.Text =
    "Item Updated Successfully...";
    lblErrorMsg.Visible =
    true;
    GetAllItems(Convert.ToInt32(cmbItemId.SelectedValue));
           private void btnDeleteItem_Click(object
    sender, EventArgs e)        {
                using
    (SPSite site = newSPSite("http://localhost:7000"))
                      using
    (SPWeb web = site.OpenWeb())                   {
    web.AllowUnsafeUpdates =
    true;
                            SPList
    list = web.Lists["MyContacts"];                         SPListItem
    Item = list.GetItemById(Convert.ToInt32(cmbItemId.SelectedValue));
                            Item.Delete();
    web.AllowUnsafeUpdates = false;
    lblErrorMsg.Text =
    "Item Deleted Successfully...";
    lblErrorMsg.Visible =
    true;
    BindAllRecords();
    GetAllItems(0);
    http://blogs.msdn.com/b/vssharepointtoolsblog/archive/2010/05/05/walkthrough-of-enabling-crud-for-sharepoint-2010-external-lists-using-visual-studio-2010.aspx
    If this helped you resolve your issue, please mark it Answered

  • TS2755 I received a message from my wife, to which I replied but the response went to her and others in her contact list. How is this possible?

    I received a message from my wife, to which I replied but the response went to her and others in her contact list. How is this possible?

    I have had a similar but worse issue.  I sent a text with photo to 6 friends and family members.  Their replies went to folks in my contacts list who were not even part of the original string.  In fact, one of the replies went to someone whom I had evidently called once but was not in my contact list. This is very strange.

Maybe you are looking for