Can I deploy Mathscript subfunctions without revealing .m source code?

Good morning.
I am developing MATLAB algorithms containing functions and subfunctions. To integrate them in LabVIEW, I plan to use Mathscript nodes. And if I do so, I have to leave the subfunctions .m files in a repository on the PC (right?).
My problem is that I do not want to reveal these easily readable files when deploying my LabVIEW code. So I am looking for a way to deploy this code without making my source code available and open to all.
Thanks for any help!

Thanks smercurio.
smercurio_fc wrote:
I think Ravens Fan was referring to actually putting the MathScript code inside a MathScript node, not leaving it as its own file. That way the code is saved with the VI.
Please allow me to illustrate my question through an example.
Let's say my code is script S1. S1 contains functions f1, f2 and f3, f1 contains subfunctions sf1 and sf2, and so on. I end with a code structure looking like this one (all .m files):
S1
- f1
---sf1
---sf2
-f2
---sf3
-f3
---sf4
---sf5
If S1 is copied in a Mathscript node, how can it work without leaving f1.m, sf1.m and others available on the user's pc after deployment?
Now, as I understand from my readings and my experimentations, when I put the function and subfunction files in the "LabVIEW Data" file, the functions name in the script S1 copied in a Mathscript node will appear in purple (by default). The node executes fine then. But if I copy the functions in Mathscript nodes in other VIs, the functions name appear in grey, and the node won't work. I don't know how to point to these other Mathscripts... Is there something I miss here?
smercurio_fc wrote:
You started out by saying you're developing Matlab algorithms. You should keep in mind that MathScript and Matlab are two different languages. While there are many similarities, there are also a lot of differences, and Matlab code is definitely not 100% compatible in MathScript. Thus, if you write the code in Matlab there is no guarantee it will even work in MathScript.
Thanks for the warning. I tried my algorithms using the method described above, and they work well.

Similar Messages

  • Customize interface without touching the source code

    My VP of of marketing is at it again. I have pasted in the exact email that he sent me. If anyone has ideas or suggestions or knows if Forms 9i has this built-in capability, please let me know.
    Thanks.
    Can you post this on metalink and see if someone at Oracle (or elsewhere) has an answer for us? Somehow, other LIMS developers are distributing LIMS products that allow their users to customize the interface without touching the source code -- no impact on their ability to take new releases. How do they do that?
    Here's my question:
    Anyone familiar with the Tools / Forms / Design this Form feature in MS Outlook? This allows a mere mortal to actually create and publish a custom Outlook form (could be a Contact, Task, Note, Journal, etc. form) across the organization. Is there such a capability built into Oracle9i Forms? In other words, can a developer easily build and distribute an Oracle software app such that the end-user can use an administrative tool to modify the interface/forms, add fields, change field names, move things around on the form, change colors, etc. -- without needing the Oracle Developer tool used by the original software developer, along with source code?
    Here's my original email from a few months ago:
    Our VP of marketing has been on my case about the ability to allow customers to "map" a form label (prompt) to a "custom" label of their choosing. The only way I know to do this is to create a "mapping" table and each time a form opens have code in the Post-Query trigger that changes the prompt of each column to the label that is in the "mapper" table. My fear here is Performance. Also, if the user closes that form and comes back to it - that logic has to be executed again - once again Performance. We have thought about the global variable idea, but we have over 100 tables with approx. 20 columns each. That's alot of globals to carry around. What's the overhead of carring around let's say 150 global variables?
    My questions to all of you are:
    1) Is anyone else doing this exact thing?
    2) If so, what is the performance hit?
    3) Is there a way to "remember" after the first time it paints - until the application is closed (not just that form) - other than global variables?
    4) Is there a solution already in place within Forms for this?
    5) Is there newer technology that has overcome this problem?
    My VP doesn't like the mapping idea. He wants to know isn't there a better way instead of mapping all the fields. Isn't there some simple utility provided by Oracle that allows the user to simply change the form labels (no, he's not talking about Oracle Developer). He is a real Outlook nut. So he's always comparing everything to how Outlook works. This is how it works in Outlook -- you click on Design Form, modify it, then install it on the machine. Surely Oracle must have something like this. He thinks we're asking the wrong question or not asking it in the right way. I'm not sure how else to ask it. Our users want to see "Date of Birth" spelled out instead of "DOB" as the label for a column on a form. Is there a way for them to take the fmx and change that label? Is there a better way other than storing this in a table and querying it up each time the form opens? Yes, I could use a global so I don't have to query it from the database every time, but I still have to evaluate every time the form is opened during that session to see which label I need to use and then set the prompt accordingly. Our VP doesn't like this, he wants this to be a one time change.
    Thanks so much for you help,
    Tina

    Hmmm.... either your VP of marketing or the users have too much time on their hands. ;-)
    I would go with a lookup table. If your database is responsive and you index the table by form name, you can retrieve a number of rows and setup the screen quickly enough that nobody would notice any time lag.
    If there aren't too many titles stored in the form, you could use a PLL library procedure and stuff all of them into a few globals -- just stack them into a single string separated by an odd character, like maybe chr(3). Then when the form is called again, it could first check to see if the globals exist, and parse the titles from there.
    But be careful about changing field titles. If they change DOB to Date of Birth, the length changes, and so you need to determine where the extra length goes. The title field must be wide enough and the text justification should be set properly.

  • How can I deploy my AAMEE without Apple Remote Desktop?

    Hi everyone,
    I created a build for Adobe CS6 Production Premium for Mac with the serial number embedded, along with the current updates. All is well with that; however, this is the issue that I am having:
    I have tried to test the build on a local machine (the computer I created the build on) and was able to install the package with no issues; however, when I try to deploy build onto a networked machine, it doesn't work.
    I have read through the AAMEE Reference Guide and have read (if I am not mistaken) that for CS6, you can only deploy an AAMEE build through Apple Remote Desktop onto multiple machines. I have also read that you would need Apple Remote Desktop on all of the machines you want the build to deploy on.
    If that is case, if I have read the guide correctly, what is the point of deploying the build through a network if you have to still install ARD onto all the machines you want the software one? How can you get around this to be able to deploy your AAMEE successfully onto a network on machines?
    When I tried it last night on one network Mac with ARD, I received the error message for "Validating packages...". I'm not sure what that means because the build works perfectly on local machine.
    Any ideas would help as far as deploying the build on a network without using ARD, or really, just a simpler alternative that works?
    PLEASE HELP.
    Thanks.

    Hi,
    You can deploy package using any of these tools - ARD, SSH, Casper suite, Absolute manage, Land desk..and may be more but we have only tried these.
    We have mentioned ARD as an example, but other standard tools can be very well used for deploying package. and there is no need to have ARD installed on all machines where you want to deploy the package, but only on admin machine.
    can you please let me know - which client OS are you trying to deploy the package and whether the client machine is logged or logged in? please forward install.log if you are facing the error.
    thanks,
    Rahul | [email protected]

  • Can't deploy web app with resource: New source location

              I can't deploy a web app (.war) if I already have a resource (.rar) deployed, weblogic
              7.0 reports
              weblogic.management.ManagementException: New source location, C:\projects\j2ee\dev\ra\dist\rware.war,
              cannot be deployed to configured application, rware. Application source is at
              C:\projects\j2ee\dev\ra\dist.
                   at weblogic.management.deploy.DeployerRuntime.validatePath(DeployerRuntime.java:786)
                   at weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRuntime.java:319)
                   at weblogic.management.deploy.DeployerRuntime.access$0(DeployerRuntime.java:282)
                   at weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:947)
              The resource works ok, and the web app does not use or reference
              the resource (it's a simple servlet that just displays a message), so why is there
              an interdependence?
              

              Thanks! We'll follow up on this.
              >
              >I discovered the cause - the .war and .rar both had the same
              >filename root, i.e. myFilename.war and myFilename.rar. I
              >solved the problem by changing the .war to myFilenameWeb.war.
              >
              >And yes, this is with WLS 7.0.
              >
              >"Deb June" <[email protected]> wrote:
              >>
              >>Hi Glen,
              >>
              >>Could you please describe the steps that you took to get this?
              >>
              >>Thanks!
              >>
              >>P.S. For others looking at this - it looks like this is using WLS 7.0.
              >>
              >>>
              >>>I can't deploy a web app (.war) if I already have a resource (.rar)
              >>deployed,
              >>>weblogic
              >>>7.0 reports
              >>>
              >>>weblogic.management.ManagementException: New source location, C:\projects\j2ee\dev\ra\dist\rware.war,
              >>>cannot be deployed to configured application, rware. Application source
              >>>is at
              >>>C:\projects\j2ee\dev\ra\dist.
              >>>     at weblogic.management.deploy.DeployerRuntime.validatePath(DeployerRuntime.java:786)
              >>>     at weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRuntime.java:319)
              >>>     at weblogic.management.deploy.DeployerRuntime.access$0(DeployerRuntime.java:282)
              >>>     at weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:947)
              >>>
              >>>The resource works ok, and the web app does not use or reference
              >>>the resource (it's a simple servlet that just displays a message),
              >so
              >>>why is there
              >>>an interdependence?
              >>
              >
              

  • How can I get login.c, passwd.c command source code in Solaris 8.0 ?

    Hi, Everybody,
    How are you doing?
    I have lots of questions.
    Q1)
    I can't rebuild kernel of Solaris 8.0 source.
    If someone has an answer, would you give it to me ?
    It will help for me.
    Q2)
    In addition I want get login.c and passwd.c command source.
    I unziped the CD of Solaris 8.0 source, buf I cannot find the source code for login.c and passwd.c command.
    Would you help me ?
    Thank you

    http://www.4shared.com/file/210566155/c080d93a/db_online.html

  • How to reveal JSP source code

    I was just wondering if the source code of a JSP page can be viewed any way?
    The JSP gets translated to a servlet, which pretty much generates HTML and only that is visible to the client browser but is there a way around it?
    E.g. would be secure/suicidal to include usernames and passwords to the JSP source code?
    I would greatly appreciate any feedback.

    The HTML delivered will contain only the output from JSP execution -- you're safe there.
    Every JSP when it is compiled produces a .java file that contains that actual servlet code. There is a risk of a user finding that and downloading it. To avoid this, you want to do one or more of the following:
    1. Turn off the server's retaining of this .java file (it's basically a debugging tool).
    2. Ensure that the .java files are created in a directory that is not accessible via the browser (i.e. outside of docroot).
    3. Apply file system permissions to the directory the files are created in such that they cannot be accessed from the web.
    #1 and #2 should be pretty easily configurable in your application server's settings. #3 is trickier, as you have to set the permissions such that the server can access them, but a web user can't.

  • Load CF varibales into javascript array without outputing to source code

    I have a javascript array for dynamic dropdowns - Automobile, makes,models, etc.
    The javascript arrays are populated by by cf queries
    Everythign works and functions fine - but it also loads the entire array (hundreds of lines of code) into the browser source code.
    I would like to have the javascript arrays hidden from the browser source code by calling it:
    <script language="JavaScript" type='text/javascript' src='../js/super.js'></script>
    But when I code like this, the js file 'super.js' does not run the cf variables.
    The only way I can get it to function right now is to save a cf file called 'super.cfm' and have it run the cf query, then list the javascript code under the query on this cf template.
    THis works - but again, it causes the entire javascript code to be visible to the browser source code...
    any ideas? - I am on cf 7
    thanks in advance

    thanks for your idea
    I ended up rethinking the whole process and realized that I only update my vehicle make/model list about once a week
    So what I ended up doing was creating the the dynamic javascript arrays through cf - and rendered them in a browser, then took the browser source code (the fully rendered javascript arrays) and saved them as a static js file
    My website uses this js file on every page, so I no longer need to call queries on every single page to populate the javascript arrays - they are already built and I am guessing cached by the browser  (browsers cache js files right?)
    SO this runs more efficiently.
    The only draw back is that when I add a new vehicle to the list in my database, I will need to manually do the same process of rendering the new js code, then cutting and pasting it into my static js file that gets called by all pages.
    So it loses the realtime updates - but this only happened once a week anyway - and it only takes me five minutes to create the new file.
    We'll see if I get sick of manually creating a new js file each week - probably, but this seems better than making the server re-render the code on each page.
    Does this make sense? - would this be less overhead on the server than implimenting your concept?
    thanks.

  • Where can i get Oracle JDeveloper 9i  Handbook exercise source code?

    Hi
    I'm studying JDeveloper 10g by read the book &lt;&lt;Oracle JDeveloper 9i Handbook &gt;&gt; which written by Peter Koletzke,Paul Dorsey and Avrom Faderman, Where can i get exercise source code? In chapter 13,I can't create the application module AccountantPromotionModule,who can help me or some idea?
    thank you
    li xinzhu
    2004.9.2

    Hi,
    You can download source code for the 9i Handbook from either of the following websites:
    http://ourworld.compuserve.com/homepages/Peter_Koletzke
    http://www.dulcian.com
    Note that, if you're using Oracle JDeveloper 10g (rather than Oracle9i JDeveloper), you might be interested in the just-published Oracle JDeveloper 10g Handbook. Oracle JDeveloper 10g has some very significant differences from Oracle9i JDeveloper--especially the introduction of Oracle Application Development Framework (ADF)--and these are covered in the new book but not the old one.
    If you do get the new book, you can download code for it (or rather, will be able to by the end of this week) from either of the above websites or from
    http://avromroyfaderman.com
    Hope this helps,
    Avrom

  • Can anyone help - VIA VT6656 WLAN Controller - GPL source code package

    I recently purchased a new netbook, and I would very much like to run Arch Linux on it. I downloaded the Chakra installer USB image, copied it to a SDHC card using dd, and then booted from it. Everything appeared to go swimmingly during the installation except for the Wireless LAN device, it was simply not detected.
    Unfortunately this appears to be a very obscure device. There is nothing like it mentioned on the Arch Linux wiki. I tried several ways to try to discover what the chip was, and to find a Linux driver for it. It appears to be a VIA chip, reported by lshw as a "VNT USB 802.11 Wireless lan adapter". It appears to use the VIA VT6656 wireless chipset. This one:
    http://www.via.com.tw/en/products/netwo … ss/vt6656/
    I tracked down a "bug" on Ubuntu forums about the chip that I think it is.
    https://bugs.launchpad.net/ubuntu/+bug/162671
    This Ubuntu bug report includes a message that, very recently, VIA have released new GPL v2 license source code for a driver for this chip. There is talk about trying to get the driver included in the Linux kernel, and other musings about the possibility of making a dkms package for it.
    The source code is Version - 1.19.12, released on 02 February 2009. The source code is a 4.4 MB zip file, so it is probably too big to attach to this post.
    Link to source code:
    http://www.viaarena.com/default.aspx?Pa … bCatID=176
    So this post is a hopeful appeal for help. I do not personally have the skills required to compile this source for myself, and thereby make a working driver for Arch from it. Would there possibly be anyone interested enough to take this on?
    I would be immensely grateful if so.
    Last edited by hal2k1 (2009-04-23 13:04:57)

    A very quick-and-dirty build attempt fails here:
    $ make
    set -e; for d in driver; do make -C $d ; done
    make[1]: Entering directory `/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver'
    make -C /lib/modules/2.6.29-ARCH/build SUBDIRS=/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver modules
    make[2]: Entering directory `/usr/src/linux-2.6.29-ARCH'
    CC [M] /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.o
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_release_WPADEV':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:783: warning: assignment makes integer from pointer without a cast
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'vntwusb_found1':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:902: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_open':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1208: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_close':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1351: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_dma0_tx_80211':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1510: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_xmit':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1538: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'Config_FileOperation':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1663: error: 'struct task_struct' has no member named 'fsuid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1664: error: 'struct task_struct' has no member named 'fsgid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1665: error: 'struct task_struct' has no member named 'fsuid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1666: error: 'struct task_struct' has no member named 'fsgid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1700: error: 'struct task_struct' has no member named 'fsuid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1701: error: 'struct task_struct' has no member named 'fsgid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_set_multi':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1766: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_get_stats':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1831: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_ioctl':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1838: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'vntwusb_init_module':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:2387: error: implicit declaration of function 'info'
    make[3]: *** [/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.o] Error 1
    make[2]: *** [_module_/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver] Error 2
    make[2]: Leaving directory `/usr/src/linux-2.6.29-ARCH'
    make[1]: *** [default] Error 2
    make[1]: Leaving directory `/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver'
    make: *** [all] Error 2
    It's possible the 1.19.12 release needs a kernel older than our current 2.6.29 version.
    Oh, and the Arch "automated package compiler script" is called makepkg, and it's the heart of the Arch Build System (ABS). Full details available in the wiki.

  • Changed in orion-ejb-jar.xml - can I deploy that jar without restart?

    Hi,
    When I modify orion-ejb-jar.xml and restart the server, it sees that it has changed, and redeploys that ejb jar.
    Is it possible to do this without a restart?
    Roxanne

    I use jdeveloper 903 version to create only one entity bean, and set the force-update=true in the orion-ejb-jar.xml, when verify it, it is ok, when deploy it to the oc4j 903 version, it throws error message.
    you may try it using jdeveloper 9.0.3 version.

  • How can I make local calls without using a country code when it's in my Contacts?

    The phone numbers in my Contacts all contain country codes because I do a lot of travelling.
    An example of this might be:
    +1 (229) 123-4567
    +44 (0)12 345 6789
    +31 (0)10 2345 6789
    I have an unlocked phone so when I travel, I usually pick up a local SIM and use that to make calls.
    The problem I have is that when I am abroad and select a phone number from my contact list it doesn' work. For example, if I select a contact with the number:
    +31 (0)10 2345 6789
    A voice-recording comes on saying that the number I had dialed was incorrect.
    But when I dial the number manually:
    010 2345 6789
    It works.
    In the US I do not have this problem because for some reason, the phone knows whether the +1 is needed or not. I'm sure if it uses it at all when you're in the US. When I dial internationally from within the US, the number dialing works fine.
    So this problem only occurs when I'm dialing locally in the country I'm in while travelling outside the US.
    Anyone have any idea of why this is happening and more importantly, what I need to do to fix this? I would hate to have go and change all my contact numbers and get rid of the country codes. If I ever have to call those numbers internationally, I'll need to manually add the country code back in.
    Very annoying!
    Advice anyone?

    If you include a country number, you have to drop the initial 0 from the area code. eg +31 10 2345 6789 instead of +31 (0)10 2345 6789

  • How can I use my remote, without using Media Sourc

    I have an audigy2ZS Platinum Pro, and I hate the mediasource remote plugin, I was much happier with my Remote Center, that was on my Audigy Platinum.. Is there anyway to get remote center on this model, or do I have to use media source?

    Intelliremote is a software program that replaces the cumbersome Creative Remotecenter software that is bundled with Soundblaster Li've!, Audigy, Audigy ZS and, X-Fi. Creative had an excellent idea bundling an infrared remote control with their product...it's just to bad the software "RemoteCenter" is a 2MB behemoth that doesn't even do what you want it to do!
    http://melloware.com/products/intelliremotev2/

  • How can i add a new count to this source code ?

    [4shared.com - document sharing - download db.txt|http://www.4shared.com/file/210566155/c080d93a/db_online.html] Hi everyone
    I have 5 variables
    1. XTSM is between 0~200
    2. XTS is between 0~2
    3. XRX is 0~3
    4. XHAN is 0~7
    5. ZHTYPE is one of these : (1)TCHF_HLF (2)TCHSD (3)TCHFULL
    they are related to their with this shape .
    XTSM->XTS->XRX->XHAN->ZHTYPE (Just Logical)
    Please tell me how can i see this output?
    ----Type------------------Total---------------------Total of ZHTYPE-----------------
        XTSM:0/XTS:0               in this case is : 29     TCHF_HLF:28 TCHSD:1 TCHFULL:0
        XTSM:0/XTS:1               No. of found  
        XTSM:0/XTS:2               No. of found  
        XTSM:1/XTS:0               No. of found  
        XTSM:1/XTS:1               No. of found  
        XTSM:1/XTS:2               No. of foundI get XTSM/XTS/TRX/XHAN and now i want count total of this
    ZHTYPE is one of these : (1)TCHF_HLF (2)TCHSD (3)TCHFULL
    they are related to their with this shape .
    * Each XTSM has 3 XTS (0-2)
    * Each XTS has 4 XRX (0-3)
    * Each XRX has 8 XCHAN (0-7)
    * and Each line has a type of ZHTYPE
    This is sample file: 4shared.com - document sharing - download db.txt
    This output with this code is true but I want add ZHTYPE at the end of each line + XTSM/XTS please help me ???(for example this : XTSM:0/XTS:0 : 29 TCHF_HLF:28 TCHSD:1 TCHFULL:0)
    public class Test {
        public static void main(String[] args) throws IOException {
            Test test = new Test();
            test.execute();
        private static String TYPE_XTSM = "XTSM";
        private static String TYPE_XTS = "XTS";
        private static String TYPE_XRX = "XRX";
        private static String TYPE_XHAN = "XHAN";
        private void execute() throws IOException {
            InputStream in = null;
            BufferedReader br = null;
            TreeMap<Integer, TreeMap<Integer, Integer>> xtsmMap = new TreeMap<Integer, TreeMap<Integer, Integer>>();
            try {
                in = Test.class.getResourceAsStream("db.txt");
                br = new BufferedReader(new InputStreamReader(in));
                String line;
                while ((line = br.readLine()) != null) {
                    Record rec = new Record(line);
                    processRecord(xtsmMap, rec);
            } finally {
                if (br != null) {
                    br.close();
            printResults(xtsmMap);
        private void processRecord(
                TreeMap<Integer, TreeMap<Integer, Integer>> xtsmMap, Record rec) {
            TreeMap<Integer, Integer> xtsMap;
            if (xtsmMap.containsKey(rec.getXtsm())) {
                xtsMap = xtsmMap.get(rec.getXtsm());
            } else {
                xtsMap = new TreeMap<Integer, Integer>();
                xtsmMap.put(Integer.valueOf(rec.getXtsm()), xtsMap);
            if (xtsMap.containsKey(rec.getXts())) {
                Integer count = xtsMap.get(rec.getXts());
                xtsMap.put(Integer.valueOf(rec.getXts()), Integer.valueOf(count
                        .intValue() + 1));
            } else {
                xtsMap.put(Integer.valueOf(rec.getXts()), Integer.valueOf(1));
        private void printResults(
                TreeMap<Integer, TreeMap<Integer, Integer>> xtsmMap) {
            System.out.println("Type\t\tTotal");
            Set<Integer> xtsmSet = xtsmMap.navigableKeySet();
            for (Integer xtsm : xtsmSet) {
                TreeMap<Integer, Integer> xtsMap = xtsmMap.get(xtsm);
                Set<Integer> xtsSet = xtsMap.navigableKeySet();
                for (Integer xts : xtsSet) {
                    Integer count = xtsMap.get(xts);
                    String outputLine = TYPE_XTSM + ":" + xtsm + "/" + TYPE_XTS
                            + ":" + xts + "\t" + count;
                    System.out.println(outputLine);
        private static class Record {
            private Integer xtsm, xts, xrk, xhan;
            Record(String line) {
                StringTokenizer st = new StringTokenizer(line, "/");
                while (st.hasMoreTokens()) {
                    String token = st.nextToken();
                    String type = token.substring(0, token.indexOf(":"));
                    String valueStr = token.substring(token.indexOf(":") + 1, token
                            .length());
                    Integer value = Integer.valueOf(valueStr);
                    if (TYPE_XTSM.equals(type)) {
                        xtsm = value;
                    } else if (TYPE_XTS.equals(type)) {
                        xts = value;
                    } else if (TYPE_XRX.equals(type)) {
                        xrk = value;
                    } else if (TYPE_XHAN.equals(type)) {
                        xhan = value;
            public Integer getXtsm() {
                return xtsm;
            public Integer getXts() {
                return xts;
            public Integer getXrk() {
                return xrk;
            public Integer getXhan() {
                return xhan;
    }I want add ZHTYPE to this ...
    Code:
    Type        Total
    XTSM:0/XTS:0    29        such as this : TCHF_HLF:28 TCHSD:1 TCHFULL:0
    XTSM:0/XTS:1    29
    XTSM:0/XTS:2    29
    XTSM:1/XTS:0    29
    XTSM:1/XTS:1    29
    XTSM:1/XTS:2    29
    XTSM:2/XTS:0    29
    XTSM:2/XTS:1    29
    XTSM:2/XTS:2    29
    XTSM:3/XTS:0    14
    XTSM:3/XTS:1    14
    XTSM:3/XTS:2    14
    XTSM:4/XTS:0    13Thanks a lot.

    http://www.4shared.com/file/210566155/c080d93a/db_online.html

  • I recently upgraded to FireFox 8.0. Now I can no longer see the option to view source code. Where has this gone?

    Nothing more to add, cannot find view source.

    "Ctrl+U" or in the View Menu
    If you want to see the keyboard shortcuts in Windows 7 menus, the removal was Microsoft's doing, and can be restored see item #9 in
    * http://dmcritchie.mvps.org/windows-7/win7.htm#steps
    If you made source be Notepad for you local files, you can still see the formatted source by bookmarking the following chrome shortcut. I give a keyword shortcut of "source:"
    * javascript:location="view-source:"+location
    Keyboard shortcuts
    * Keyboard shortcuts | How to | Firefox Help<br>https://support.mozilla.com/kb/Keyboard%20shortcuts
    * Firefox and other Browser Keyboard Shortcuts (Comparison Table)<br>http://dmcritchie.mvps.org/firefox/keyboard.htm
    Keyword shortcuts:
    * Firefox Keyword Shortcuts<br>http://dmcritchie.mvps.org/firefox/kws.htm
    You can make '''Firefox 8.0''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface
    <p>There is a lot more beyond those first 10 steps listed, if you want to make Firefox more functional.</p>
    <p><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small></p>

  • SharePoint forums reveal html source code in Firefox

    Our website is built in MOSS. We have online forums and when users try to post to them, the html coding is visible. Our users are primaily non-techical types who find this confusing. Is there any way to prevent this?

    You see the HTML code if the servers sends a file as text/plain. That can happen if the server doesn't recognize the file extension or there is no file extension at all.
    See http://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types

Maybe you are looking for