Daily Archives

Articles indexed Sunday June 6 2010

Page 6/76 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Generate random number histogram using java

    - by Chewart
    Histogram -------------------------------------------------------- 1 ****(4) 2 ******(6) 3 ***********(11) 4 *****************(17) 5 **************************(26) 6 *************************(25) 7 *******(7) 8 ***(3) 9 (0) 10 *(1) -------------------------------------------------------- basically above is what my prgram needs to do.. im missing something somewhere any help would be great :) import java.util.Random; public class Histogram { /*This is a program to generate random number histogram between 1 and 100 and generate a table */ public static void main(String args[]) { int [] randarray = new int [80]; Random random = new Random(); System.out.println("Histogram"); System.out.println("---------"); int i ; for ( i = 0; i<randarray.length;i++) { int temp = random.nextInt(100); //random numbers up to number value 100 randarray[i] = temp; } int [] histo = new int [10]; for ( i = 0; i<10; i++) { /* %03d\t, this generates the random numbers to three decimal places so the numbers are generated with a full number or number with 00's or one 0*/ if (randarray[i] <= 10) { histo[i] = histo[i] + 1; //System.out.println("*"); } else if ( randarray[i] <= 20){ histo[i] = histo[i] + 1; } else if (randarray[i] <= 30){ histo[i] = histo[i] + 1; } else if ( randarray[i] <= 40){ histo[i] = histo[i] + 1; } else if (randarray[i] <= 50){ histo[i] = histo[i] + 1; } else if ( randarray[i] <=60){ histo[i] = histo[i] + 1; } else if ( randarray[i] <=70){ histo[i] = histo[i] + 1; } else if ( randarray[i] <=80){ histo[i] = histo[i] + 1; } else if ( randarray[i] <=90){ histo[i] = histo[i] + 1; } else if ( randarray[i] <=100){ histo[i] = histo[i] + 1; } switch (randarray[i]) { case 1: System.out.print("0-10 | "); break; case 2: System.out.print("11-20 | "); break; case 3: System.out.print("21-30 | "); break; case 4: System.out.print("31-40 | "); break; case 5: System.out.print("41-50 | "); break; case 6: System.out.print("51-60 | "); break; case 7: System.out.print("61-70 | "); break; case 8: System.out.print("71-80 | "); break; case 9: System.out.print("81-90 | "); break; case 10: System.out.print("91-100 | "); } for (int i = 0; i < 80; i++) { randomNumber = random.nextInt(100) index = (randomNumber - 1) / 2; histo[index]++; } } } }

    Read the article

  • creating objects in list

    - by prince23
    List myList = new List { new Users{ Name="Kumar", Gender="M", Age=75, Parent="All"}, new Users{ Name="Suresh",Gender="M", Age=50, Parent="Kumar"}, new Users{ Name="Bennette", Gender="F",Age=45, Parent="Kumar"}, new Users{ Name="kian", Gender="M",Age=20, Parent="Suresh"}, new Users{ Name="Nathani", Gender="M",Age=15, Parent="Suresh"}, new Users{ Name="Peter", Gender="M",Age=90, Parent="All"}, new Users{ Name="Mica", Age=56, Gender="M",Parent="Peter"}, new Users{ Name="Linderman", Gender="M",Age=51, Parent="Peter"}, new Users{ Name="john", Age=25, Gender="M",Parent="Mica"}, new Users{ Name="tom", Gender="M",Age=21, Parent="Mica"}, new Users{ Name="Ando", Age=64, Gender="M",Parent="All"}, new Users{ Name="Maya", Age=24, Gender="M",Parent="Ando"}, new Users{ Name="Niki Sanders", Gender="F",Age=2, Parent="Maya"}, new Users{ Name="Angela Patrelli", Gender="F",Age=3, Parent="Maya"}, }; now i need to format the data like here i need to check the parent based on the parent i will be creating objects under the parent objects now { Name="Kumar", Gender="M", Age=75, Parent="All" } this is the top level as a property Parent ="all" now under parent object kumar here we again create a new object to store these information under object(kumar who is the parent) new Users{ Name="Suresh",Gender="M", Age=50, Parent="Kumar"}, new Users{ Name="Bennette", Gender="F",Age=45, Parent="Kumar"}, what i need to do here is i need to check the parent based on the parent create further objects under it ex: i need to achive like this. looking for the syntax how i can do it. public class SampleProjectData { public static ObservableCollection<Product> GetSampleData() { DateTime dtS = DateTime.Now; ObservableCollection<Product> teams = new ObservableCollection<Product>(); teams.Add(new Product() { PDName = "Product1", OverallStartTime = dtS, OverallEndTime = dtS + TimeSpan.FromDays(3), }); Project emp = new Project() { PName = "Project1", OverallStartTime = dtS + TimeSpan.FromDays(1), OverallEndTime = dtS + TimeSpan.FromDays(6) }; emp.Tasks.Add(new Task() { StartTime = dtS, EndTime = dtS + TimeSpan.FromDays(2), TaskName = "John's Task 3" }); emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(3), EndTime = dtS + TimeSpan.FromDays(4), TaskName = "John's Task 2" }); teams[0].Projects.Add(emp); emp = new Project() { PName = "Project2", OverallStartTime = dtS + TimeSpan.FromDays(1.5), OverallEndTime = dtS + TimeSpan.FromDays(5.5) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(1), EndTime = dtS + TimeSpan.FromDays(4), TaskName = "Victor's Task" }); teams[0].Projects.Add(emp); emp = new Project() { PName = "Project3", OverallStartTime = dtS + TimeSpan.FromDays(2), OverallEndTime = dtS + TimeSpan.FromDays(5) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(1), EndTime = dtS + TimeSpan.FromDays(4), TaskName = "Jason's Task 1" }); emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(7), EndTime = dtS + TimeSpan.FromDays(9), TaskName = "Jason's Task 2" }); teams[0].Projects.Add(emp); teams.Add(new Product() { PDName = "Product2", OverallStartTime = dtS, OverallEndTime = dtS + TimeSpan.FromDays(3) }); emp = new Project() { PName = "Project4", OverallStartTime = dtS + TimeSpan.FromDays(0.5), OverallEndTime = dtS + TimeSpan.FromDays(3.5) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(1.5), EndTime = dtS + TimeSpan.FromDays(4), TaskName = "Vicky's Task" }); teams[1].Projects.Add(emp); emp = new Project() { PName = "Project5", OverallStartTime = dtS + TimeSpan.FromDays(2), OverallEndTime = dtS + TimeSpan.FromDays(6) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(2.2), EndTime = dtS + TimeSpan.FromDays(3.8), TaskName = "Oleg's Task 1" }); emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(5), EndTime = dtS + TimeSpan.FromDays(6), TaskName = "Oleg's Task 2" }); emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(8), EndTime = dtS + TimeSpan.FromDays(9.6), TaskName = "Oleg's Task 3" }); teams[1].Projects.Add(emp); emp = new Project() { PName = "Project6", OverallStartTime = dtS + TimeSpan.FromDays(2.5), OverallEndTime = dtS + TimeSpan.FromDays(4.5) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(0.8), EndTime = dtS + TimeSpan.FromDays(2), TaskName = "Kim's Task" }); teams[1].Projects.Add(emp); teams.Add(new Product() { PDName = "Product3", OverallStartTime = dtS, OverallEndTime = dtS + TimeSpan.FromDays(3) }); emp = new Project() { PName = "Project7", OverallStartTime = dtS + TimeSpan.FromDays(5), OverallEndTime = dtS + TimeSpan.FromDays(7.5) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(1.5), EndTime = dtS + TimeSpan.FromDays(4), TaskName = "Balaji's Task 1" }); emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(5), EndTime = dtS + TimeSpan.FromDays(8), TaskName = "Balaji's Task 2" }); teams[2].Projects.Add(emp); emp = new Project() { PName = "Project8", OverallStartTime = dtS + TimeSpan.FromDays(3), OverallEndTime = dtS + TimeSpan.FromDays(6.3) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(1.75), EndTime = dtS + TimeSpan.FromDays(2.25), TaskName = "Li's Task" }); teams[2].Projects.Add(emp); emp = new Project() { PName = "Project9", OverallStartTime = dtS + TimeSpan.FromDays(2), OverallEndTime = dtS + TimeSpan.FromDays(6) }; emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(2), EndTime = dtS + TimeSpan.FromDays(3), TaskName = "Stacy's Task" }); teams[2].Projects.Add(emp); return teams; } } above is an sample data where i am grouping them with static data in the same way i need **to for teh data which is cmg from DB and i need to store them list** all these three data are comig from different services. and i am storing them in a list now i have three tables data Product , Project, Task. all the data are coming from webservies. i have created three list where i am storing the data in list. List<Project>objpro= new List<Project>(); List<Product>objproduct= new List<Product>(); LIst<Task>objTask= new List<Task>(); **now what i need to do is i need to do the mapping between these tables. if you see above. i have object of Product under Product i have added object of Project and then under project object i have added task object.** now from the above data which is stored in the list i need to do the same mapping between class. and group the data. public class Product : INotifyPropertyChanged { public Product() { this.Projects = new ObservableCollection<Project>(); } public string PDName { get; set; } public ObservableCollection<Project> Projects { get; set; } private DateTime _st; public DateTime OverallStartTime { get { return _st; } set { if (this._st != value) { TimeSpan dur = this._et - this._st; this._st = value; this.OnPropertyChanged("OverallStartTime"); this.OverallEndTime = value + dur; } } } private DateTime _et; public DateTime OverallEndTime { get { return _et; } set { if (this._et != value) { this._et = value; this.OnPropertyChanged("OverallEndTime"); } } } #region INotifyPropertyChanged Members protected void OnPropertyChanged(string name) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(name)); } public event PropertyChangedEventHandler PropertyChanged; #endregion } public class Project : INotifyPropertyChanged { public Project() { this.Tasks = new ObservableCollection<Task>(); } public string PName { get; set; } public ObservableCollection<Task> Tasks { get; set; } DateTime _st; public DateTime OverallStartTime { get { return _st; } set { if (this._st != value) { TimeSpan dur = this._et - this._st; this._st = value; this.OnPropertyChanged("OverallStartTime"); this.OverallEndTime = value + dur; } } } DateTime _et; public DateTime OverallEndTime { get { return _et; } set { if (this._et != value) { this._et = value; this.OnPropertyChanged("OverallEndTime"); } } } #region INotifyPropertyChanged Members protected void OnPropertyChanged(string name) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(name)); } public event PropertyChangedEventHandler PropertyChanged; #endregion } public class Task : INotifyPropertyChanged { public string TaskName { get; set; } DateTime _st; public DateTime StartTime { get { return _st; } set { if (this._st != value) { TimeSpan dur = this._et - this._st; this._st = value; this.OnPropertyChanged("StartTime"); this.EndTime = value + dur; } } } private DateTime _et; public DateTime EndTime { get { return _et; } set { if (this._et != value) { this._et = value; this.OnPropertyChanged("EndTime"); } } } #region INotifyPropertyChanged Members protected void OnPropertyChanged(string name) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(name)); } public event PropertyChangedEventHandler PropertyChanged; #endregion } hope my question is clear

    Read the article

  • rule based file parsing

    - by user359490
    I need to parse a file line by line on given rules. Here is a requirement. file can have multiple lines with different data.. 01200344545143554145556524341232131 1120034454514355414555652434123213101200344545143554145556524341232131 2120034454514 and rules can be like this. if byte[0,1] == "0" then extract this line to /tmp/record0.dat if byte[0,1] == "1" then extract this line to /tmp/record1.dat if byte[0,1] == "2" then extract this line to /tmp/record2.dat I am looking for any language which can do this in a fast manner with a very long file size like 2 GB. Appreciate all the help in advance. Thanks

    Read the article

  • Scaling mouse coordinates for GlScale?

    - by user146780
    Right now I have a GL context that is set up with a top left coordinate system. I made my mouse so that its 0,0 is the top left of the Open GL frame. If I apply GlScalef(2,2,2) for example to my scene, how would I have to change my mouse so that drawing stil maps out correctly. Thanks

    Read the article

  • Using the MongoDB Ruby driver in Rails? (without an object mapper)

    - by Mark L
    I have recently been getting my feet wet in MongoDB using Mongoid w/ Rails 3, but I'm now interested in learning the low level MongoDB features using only the Ruby driver, and trying some map/reduce that would not be possible through Mongoid (afaik) I'm not entirely sure where in Rails I should be setting up the db connections etc, and any pointers would be much appreciated!

    Read the article

  • What is the best Java numerical method package?

    - by Bob Cross
    I am looking for a Java-based numerical method package that provides functionality including: Solving systems of equations using different numerical analysis algorithms. Matrix methods (e.g., inversion). Spline approximations. Probability distributions and statistical methods. In this case, "best" is defined as a package with a mature and usable API, solid performance and numerical accuracy. Edit: derick van brought up a good point in that cost is a factor. I am heavily biased in favor of free packages but others may have a different emphasis.

    Read the article

  • Learning Haskell: How to remove an item from a List in Haskell

    - by BM
    Trying to learn Haskell. I am trying to write a simple function to remove a number from a list without using built-in function (delete...I think). For the sake of simplicity, let's assume that the input parameter is an Integer and the list is an Integer list. Here is the code I have, Please tell me what's wrong with the following code areTheySame :: Int -> Int-> [Int] areTheySame x y | x == y = [] | otherwise = [y] removeItem :: Int -> [Int] -> [Int] removeItem x (y:ys) = areTheySame x y : removeItem x ys

    Read the article

  • Wireshark Dissector: How to Identify Missing UDP Frames?

    - by John Dibling
    How do you identify missing UDP frames in a custom Wireshark dissector? I have written a custom dissector for the CQS feed (reference page). One of our servers gaps when receiving this feed. According to Wireshark, some UDP frames are never received. I know that the frames were sent because all of our other servers are gap-free. A CQS frame consists of multiple messages, each having its own sequence number. My custom dissector provides the following data to Wireshark: cqs.frame_gaps - the number of gaps within a UDP frame (always zero) cqs.frame_first_seq - the first sequence number in a UDP frame cqs.frame_expected_seq - the first sequence number expected in the next UDP frame cqs.frame_msg_count - the number of messages in this UDP frame And I am displaying each of these values in custom columns, as shown in this screenshot: I tried adding code to my dissector that simply saves the last-processed sequence number (as a local static), and flags gaps when the dissector processes a frame where current_sequence != (previous_sequence + 1). This did not work because the dissector can be called in random-access order, depending on where you click in the GUI. So you could process frame 10, then frame 15, then frame 11, etc. Is there any way for my dissector to know if the frame that came before it (or the frame that follows) is missing? The dissector is written in C. (See also a companion post on serverfault.com)

    Read the article

  • How to Validate mac address & ipaddress in client side(using javascript) & server side(using c#)

    - by amexn
    My team doing a project related to network using Asp.net MVC(c#). I need to validate mac address & ipaddress in client side(using javascript) & server side(using c#). I didn't get a good solution for validating mac address & ip addresss. I searched google for finding a good user interface for validating mac address by giving colon after two number eg: "XX:XX:XX:XX:XX:XX" by using Masked Input.Please give reference/guidance for implementing this. Any jquery plugin for implementing Masked Input.

    Read the article

  • How to "cast" from generic List<> to ArrayList

    - by Michael Freidgeim
    We are writing new code using generic List<> , e.g. List<MyClass>.   However we have legacy functions, that are expect ArrayList as a parameter. It is a second time, when I and my colleague asked, how to "cast" generic List<MyClass> to ArrayList. The answer is simple- just use ArrayList constructor with ICollection parameter. Note that it is not real cast, it  copies  references to ArrayList. var list=new List<MyClass>(); //Fill list items ArrayList al=new ArrayList(list);//"cast"-

    Read the article

  • How can I recursively verify the permissions within a given subdirectory?

    - by Mike
    I'd like to verify that nothing within /foo/bar is chmod 777. Or, alternatively, I'd like to make sure that nothing within /foo/bar us owned by user1 or in group1. Is there any way I can recursively verify the permissions within a given subdirectory to make sure there aren't any security holes? Notice that I do not want to change all the permissions to something specific, nor do I want to change the owner to something specific, so a recursive chmod or chown won't do it... Thanks!

    Read the article

  • PHP/MySQL time zone migration

    - by El Yobo
    I have an application that currently stores timestamps in MySQL DATETIME and TIMESTAMP values. However, the application needs to be able to accept data from users in multiple time zones and show the timestamps in the time zone of other users. As such, this is how I plan to amend the application; I would appreciate any suggestions to improve the approach. Database modifications All TIMESTAMPs will be converted to DATETIME values; this is to ensure consistency in approach and to avoid having MySQL try to do clever things and convert time zones (I want to keep the conversion in PHP, as it involves less modification to the application, and will be more portable when I eventually manage to escape from MySQL). All DATETIME values will be adjusted to convert them to UTC time (currently all in Australian EST) Query modifications All usage of NOW() to be replaced with UTC_TIMESTAMP() in queries, triggers, functions, etc. Application modifications The application must store the time zone and preferred date format (e.g. US vs the rest of the world) All timestamps will be converted according to the user settings before being displayed All input timestamps will be converted to UTC according to the user settings before being input Additional notes Converting formats will be done at the application level for several main reasons The approach to converting time zones varies from DB to DB, so handing it there will be non-portable (and I really hope to be migrating away from MySQL some time in the not-to-distant future). MySQL TIMESTAMPs have limited ranges to the permitted dates (~1970 to ~2038) MySQL TIMESTAMPs have other undesirable attributes, including bizarre auto-update behaviour (if not carefully disabled) and sensitivity to the server zone settings (and I suspect I might screw these up when I migrate to Amazon later in the year). Is there anything that I'm missing here, or does anyone have better suggestions for the approach?

    Read the article

  • How to manually disable/blacklist Maven repository

    - by cetnar
    In my base project I use dependency of JasperReports which has non-existent repository declaration in its pom. When I run every Maven commad there is dependency looking for commons-collection in this Jasper repository so I need to wait for timeout. This is my base project and is used as dependency in my others projects so again I need to wait for timeout. Is there are a way to move this repository to blacklisted or override this settings? Notes: 1.Why it search in Jasper repository, maybe bacause of ranges <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>[2.1,)</version> <scope>compile</scope> </dependency> 2.My idea to resolve this problem is to change jasper pom and use proxy repository, but I looking to another option. 3.I use jasperreports 1.3.3 version and I'd like don't change it.

    Read the article

  • Prevent default on a click within a JQuery tabs in Google Chrome.

    - by Sydney
    I would like to prevent the default behaviour of a click on a link. I tried the return false; also javascript:void(0); in the href attribute but it doesn’t seem to work. It works fine in Firefox, but not in Chrome and IE. I have a single tab that loads via AJAX the content which is a simple link. <script type="text/javascript"> $(function() { $("#tabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); }, success: function() { alert('hello'); $('#lk').click(function() { alert('Click Me'); return false; }); } }, load: function(event, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); }); </script> <body> <div id="tabs"> <ul> <li><a href="linkChild.htm">Link</a></li> </ul> </div> </body> The content of linkChild.htm is <a href="javascript:void(0)" id="lk">Click Me</a> So basically when the tab content is loaded with success, a click event is attached to the link “lk”. When I click on the link, the alert is displayed but then link disappears. I check the HTML and the element is actually removed from the DOM.

    Read the article

  • How can I access data that's stored in my App Delegate from my various view controllers?

    - by BeachRunnerJoe
    This question is similar to this other post, but I'm new to iPhone development and I'm getting used to the good practices for organizing my data throughout my app. I understand the ApplicationDelegate object to be the best place to manage data that is global to my app, correct? If so, how can I access data that's stored in my App Delegate from various view controllers? Specifically, I have an array of table section titles for my root table view controller created as such... appdelegate.m sectionTitles = [[NSArray alloc] initWithObjects: @"Title1", @"Title2", @"Title3", nil]; rootViewController.appDelegate = self; and I need to access it throughout the different views of my app, like such... rootviewcontroller.m NSUInteger numSections = [self.appDelegate.sectionTitles count]; Is this the best way to do it or are there any reasons I should organize my data a better way? Thanks so much in advance for your help!

    Read the article

  • Magento - blank lines being added to wsdl file

    - by dan.codes
    I am trying to call the API but I keep getting a soap error that can't load the file. I found that the reason is there are about 3 blank lines at the top of the XML file that is returned. I found this by doing wget url. This use to work just fine, when I debug through the API controller the response or xml looks fine all the way through, I don't see any spaces at all. I have no idea what might be causing this. I don't think there is anything we modified that would do this.

    Read the article

  • How much more productive are three monitors than two?

    - by Sir Graystar
    I am mulling over whether to buy a new monitor, to go along side my current setup of two 24 (ish) inch monitors. What I want to know is whether this is worth the money (probably around £200)? I think most of us will agree that two monitors is much more productive than one when programming and developing (Jeff Atwood has said this many times on his blog, and I imagine that most of you are fans of his), but is three much more productive than two? What I'm worried about is that I will have so much space that one monitor will be used for things that are not related to the task (music, facebook etc.) and it will actually make me less productive.

    Read the article

  • Storing millions of URLs in a database for fast pattern matching

    - by Paras Chopra
    I am developing a web analytics kind of system which needs to log referring URL, landing page URL and search keywords for every visitor on the website. What I want to do with this collected data is to allow end-user to query the data such as "Show me all visitors who came from Bing.com searching for phrase that contains 'red shoes'" or "Show me all visitors who landed on URL that contained 'campaign=twitter_ad'", etc. Because this system will be used on many big websites, the amount of data that needs to log will grow really, really fast. So, my question: a) what would be the best strategy for logging so that scaling the system doesn't become a pain; b) how to use that architecture for rapid querying of arbitrary requests? Is there a special method of storing URLs so that querying them gets faster? In addition to MySQL database that I use, I am exploring (and open to) other alternatives better suited for this task.

    Read the article

  • How can I pare down Vim's buffer list to only include active buffers

    - by nelstrom
    How can I pare down my buffer list to only include buffers that are currently open in a window/tab? When I've been running Vim for a long time, the list of buffers revealed by the :ls command is too large to work with. Ideally, I would like to delete all of the buffers which are not currently visible in a tab or window by running a custom command such as :Only. Can anybody suggest how to achieve this? It looks like the :bdelete command can accept a list of buffer numbers, but I'm not sure how to translate the output from :ls to a format that can be consumed by the :bdelete command. Any help would be appreciated. Clarification Lets say that in my Vim session I have opened 4 files. The :ls command outputs: :ls 1 a "abc.c" 2 h "123.c" 3 h "xyz.c" 4 a "abc.h" Buffer 1 is in the current tab, and and buffer 4 is in a separate tab, but buffers 2 and 3 are both hidden. I would like to run the command :Only, and it would wipe buffers 2 and 3, so the :ls command would output: :ls 1 a "abc.c" 4 a "abc.h" This example doesn't make the proposed :Only command look very useful, but if you have a list of 40 buffers it would be very welcome.

    Read the article

  • See anything wrong with this JSON2 push/stringify?

    - by nobosh
    dynamictextareas.push({guideid:targeteditorID, guideitemtext : textareacontents }); alert( JSON.stringify(dynamictextareas) ); See anything wrong with this JSON2 javascript code? For some reason this come is making a mess of things. I want to push: <p>DDDDDD</p> But instead it's pushing: [{"guideid":"1","guideitemtext":"<p>\u000a\u0009u000au0009DDDDDD</p>\u000a"}] Any ideas? Is there a better way I can build this JSON object?

    Read the article

  • VS 2010 snippet manager and quickCode

    - by Michael Freidgeim
    During the last few years I've used QuickCode and it was very helpful. VS 2010 has  Code Snippets Manager that MS finally made quite convenient to use, so I will use it in a future.   I will need to convert my QuickCode commands to VS snippets. I am sure I will miss Alt-Q hotkey for some time.

    Read the article

  • What is the difference between System.Speech.Recognition and Microsoft.Speech.Recognition?

    - by Michael
    There are two similar namespaces and assemblies for speech recognition in .NET. I’m trying to understand the differences and when it is appropriate to use one or the other. There is System.Speech.Recognition from the assembly System.Speech (in System.Speech.dll). System.Speech.dll is a core DLL in the .NET Framework class library 3.0 and later There is also Microsoft.Speech.Recognition from the assembly Microsoft.Speech (in microsoft.speech.dll). Microsoft.Speech.dll is part of the UCMA 2.0 SDK I find the docs confusing and I have the following questions: System.Speech.Recognition says it is for "The Windows Desktop Speech Technology", does this mean it cannot be used on a server OS or cannot be used for high scale applications? The UCMA 2.0 Speech SDK ( http://msdn.microsoft.com/en-us/library/dd266409%28v=office.13%29.aspx ) says that it requires Microsoft Office Communications Server 2007 R2 as a prerequisite. However, I’ve been told at conferences and meetings that if I do not require OCS features like presence and workflow I can use the UCMA 2.0 Speech API without OCS. Is this true? If I’m building a simple recognition app for a server application (say I wanted to automatically transcribe voice mails) and I don’t need features of OCS, what are the differences between the two APIs?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >