Search Results

Search found 4755 results on 191 pages for 'scripting dictionary'.

Page 18/191 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • License of popular dictionary word lists (e.g. SOWPODS, TWL)? Copyright? Trademarks?

    - by BobbyJim
    (I'm not sure if this off-topic. I found a lot of voted-up questions about software licenses and this is related. Plus, I'm sure many of us have had the situation that we need to use a dictionary in our code) I'm making a (maybe commercial) word game and need to use a good word dictionary for checking words. The most common dictionaries to use are the SOWPODS or TWL lists that are used Scrabble tournaments; see here: http://www.scrabblist.com/ (I have nothing to do with this site by the way). I've seen loads of websites offering these two dictionaries for download and loads of word games advertise that they use them. However, I cannot find any licensing terms attached to these dictionaries wherever I download them. For the players of my game, I'd want to say what dictionary I'm using (e.g. "this game uses SOWPODS"). However, I'm nervous about what I can do legally. Does anyone know about if you can copyright lists of words? Does anyone know the licenses of TWL and SOWPODS? TWL and SOWPODS don't seem to have trademarks on them but I'd like to know for sure. I cannot find any good sources for this information. EDIT: Great, now the top result for "SOWPODS license" is my stackoverflow question. :)

    Read the article

  • Word frequency tally script is too slow

    - by Dave Jarvis
    Background Created a script to count the frequency of words in a plain text file. The script performs the following steps: Count the frequency of words from a corpus. Retain each word in the corpus found in a dictionary. Create a comma-separated file of the frequencies. The script is at: http://pastebin.com/VAZdeKXs Problem The following lines continually cycle through the dictionary to match words: for i in $(awk '{if( $2 ) print $2}' frequency.txt); do grep -m 1 ^$i\$ dictionary.txt >> corpus-lexicon.txt; done It works, but it is slow because it is scanning the words it found to remove any that are not in the dictionary. The code performs this task by scanning the dictionary for every single word. (The -m 1 parameter stops the scan when the match is found.) Question How would you optimize the script so that the dictionary is not scanned from start to finish for every single word? The majority of the words will not be in the dictionary. Thank you!

    Read the article

  • Dictionary object syntax?

    - by posfan12
    I'm having trouble figuring out the syntax for a JScript .NET dictionary object. I have tried private var myDictionary: Dictionary<string><string>; but the compiler complains that it's missing a semicolon and that the Dictionary object is not declared. I know JScript does have a native dictionary-like object format, but I'm not sure if there are disadvantages to using it instead of the .NET-specific construct. I.e., what if someone wants to extend my script using another .NET language?

    Read the article

  • Would javascript and similar scripting languages benefit from being strongly typed?

    - by cwap
    Just had my mind going today. I spent some time in IE debug mode, browsing the web as usual, and oh boy do I see many errors :) Most of these errors are because some value are of a different type than expected (at least as far as I interpret the error messages). What are the reasons JavaScript and similar scripting languages aren't strongly typed? Is it just to make the languages "easier" to understand and more accessable, or is the lack of a "compile-time" the real problem?

    Read the article

  • Which TextEditor is easiest to customize for a new scripting language?

    - by Simone Margaritelli
    It's been more than an year that i'm developing a new scripting language with its own grammar rules and constructs. I'd like to give the users of this language some minimalistic ide to work with, but i don't want/have time to make one from scratch so i'd like to take one already existing (it has to run on Linux platforms natively, so no windows-only editors plz) and customize it. Well, which one is the easiest to customize without changing the source code and recompiling it, maybe even with plugin support? Thank you.

    Read the article

  • Arrays and For Loop [closed]

    - by java
    I wrote this code: import java.io.*; public class dictionary { public static void main(String args[]) { String[] MyArrayE=new String[5]; String[] MyArrayS=new String[5]; String[] MyArrayA=new String[5]; MyArrayE[0]="Language"; MyArrayE[1]="Computer"; MyArrayE[2]="Engineer"; MyArrayE[3]="Home"; MyArrayE[4]="Table"; MyArrayS[0]="Lingua"; MyArrayS[1]="Computador"; MyArrayS[2]="Ing."; MyArrayS[3]="Casa"; MyArrayS[4]="Mesa"; System.out.println("Please enter a word"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String word= null; try { word= br.readLine(); } catch (IOException e) { System.out.println("Error!"); System.exit(1); } System.out.println("Your word is " + word); for(int i=0; i<MyArrayA.length; i++) { if(word.equals(MyArrayS[i])) { System.out.println(MyArrayE[i]); } } } } My Question: What about if the user inputs a word not in MyArrayS, I want to check that and print a statement like "Word does not exist". I think that it might look like: if(word!=MyArrayS) { System.out.println("Word does not exist"); }

    Read the article

  • Using string[] as a Dictionary key e.g. Dictionary<string[], StringBuilder>

    - by Nick Allen - Tungle139
    The structure I am trying to achieve is a composite Dictionary key which is item name and item displayname and the Dictionary value being the combination of n strings So I came up with var pages = new Dictionary<string[], StringBuilder>() { { new string[] { "food-and-drink", "Food & Drink" }, new StringBuilder() }, { new string[] { "activities-and-entertainment", "Activities & Entertainment" }, new StringBuilder() } }; foreach (var obj in my collection) { switch (obj.Page) { case "Food": case "Drink": pages["KEY"].Append("obj.PageValue"); break; ... } } The part I am having trouble with is accessing the Dictionary Key pages["KEY"] How do I target the Dictionary Key whose value at [0] == some value? Hope that makes sense

    Read the article

  • Adding new events to be handled by script part without recompilation of c++ source code

    - by paul424
    As in title I want to write an Event system with handling methods written in external script language, that is Angelscript. The AS methods would have acess to game's world modifing API ( which has to be regsitered for Angelscript Machine as the game starts) . I have come to this problem : if we use the Angelsript for rapid prototyping of the game's world behavior , we would like to be able to define new Event Types, without recompiling the main binary. Is that ever possible , don't stick to Angelscript, I think about any possible scripting language. The main thought is this : If there's some really new Event possible to be constructed , we must monitor some information coming from the binary, for example some variable value changing and the Events are just triggered on some conditions on those changes , wer might be monitoring the Creatures HP, by having a function call on each change, there we could define new Events such as Creature hurt, creature killed, creature healed , creature killed and tormented to pieces ( like geting HP very much below 0 ) . Are there any other ideas of constructing new Events at the scripting side ?

    Read the article

  • Markup format or script for data files?

    - by Aaron
    The game I'm designing will be mainly written in a high level scripting language (leaning towards either Lua or Squirrel) with a C++ core. In addition to scripts I'm also going to need different data files. Many data files will be for static information such as graphical assets and monster types. I'd also want to create and update data files at runtime for user information like option settings and game saves. Can I get away with using plain script files (i.e. .lua or .nut files) for my data files, or is it better to use dedicated markup formats like XML or YAML? If I use script files, loaded separately from my true scripts, then I wouldn't need an extra library to read those files. Scripting languages like Lua also have table syntax that lend themselves towards data definition. On the other hand I'd have to write my own schema check code. These languages also don't seem to support serialization "out of the box" like the markup format libraries do.

    Read the article

  • Document key usage in Dictionary

    - by phq
    How can I document the key usage in a Dictionary so that it shows in Visual studio when coding using that object? I'm looking for something like: /// <param name="SpecialName">That Special Name</param> public Dictionary<string,string> bar; So far the best attempt has been to write my own class: public class SpecialNameDictionary : IDictionary<string, string> { private Dictionary<string, string> data = new Dictionary<string, string>(); /// <param name="specialName">That Special Name</param> public string this[string specialName] { get { return data[specialName]; } } } But It adds a lot of code that doesn't do anything. Additionally I must retype every Dictionary method to make it compile. Is there a better way to achive the above?

    Read the article

  • Is JScript dying? If so, where should I go? [closed]

    - by David Is Not Here
    I recently poked around Google for a little bit, looking for information about coding JScript. It's very sparse, which surprised me -- it took a link to a link to find Microsoft's own reference, which appears to omit most if not all references to console-based scripting that extends past Javascript. I'm working with the console here, not a webpage, so input and output seems very different than what Microsoft explains. If JScript is dying (and it appears to be so), where do I go from here? VBScript? My options are limited because the computers I'm using this on are carefully patrolled for new software. JScript's similarity to JavaScript was the biggest reason I had chosen it for porting over some of my prior work. I'm specifically looking for, at best, a console scripting language that doesn't need any extra software on Windows XP or higher, that at least supports standard input, output, pause, and file manipulation, little else.

    Read the article

  • Android dictionary application

    - by mawia
    Hi, I wanted to develop an application on top of a dictionary i.e. an application that uses dictionary as a part of it.Is their any dictionary application available in the market for this purpose?Application which come under GPL is preferable.Also those which uses local database instead of using network connection is preferable. If not,is there any dictionary database available in the market on the top of which a dictionary application can be developed which can then be used for said purpose? Hope I am clear. Thanks in advance.

    Read the article

  • Display values and how many times they occured using a Dictionary

    - by user1730056
    I've been told to By using a dictionary (or your solution to Part 4), write a method at_least(a, n) that takes a list, a, and an integer, n, as arguments and returns a list containing only the elements of a that occur at least n times. For complete marks, the list should contain the elements in order of their first occurrence in a. I was able to figure this without using a dictionary, with def at_least2(a, n): return [x for x in a if a.count(x) is n] I was wondering how I can write this using a dictionary? The input is: a = [-6, 8, 7, 3, 2, -9, 1, -3, 2, -4, 4, -8, 7, 8, 2, -2, -7, 0, 1, -9, -3, -7, -3, -5, 6, -3, 6, -3, -10, -8] def at_least(a, 2): and the output: [8, 7, 2, -9, 1, -3, 2, -8, 7, 8, 2, -7, 1, -9, -3, -7, -3, 6, -3, 6, -3, -8] Edit: I don't understand how a dictionary is being used, yet the output isn't in dictionary form? My understanding is that dictionaries have values for each object. I'm not sure if I'm using the right terms.

    Read the article

  • From Dictionary To File Python

    - by user3600560
    I am basically trying to write this information from my dictionary to this file. I have this dictionary named files = {} and it is for a filing system I am making. Anyhow it is always being update with new items, and I want those items to be uploaded to the file. Then if you exit the program the files are loaded back to the dictionary files = {}. Here is the code I have so far: file = {} for i in files: g = open(i, 'r') g.read(i) g.close() EDIT I want the contents of the dictionary to be written to a file. The items inside the dictionary are all stored like this: files[filename] = {filedate:filetext} where filename is the file's name, filedate is the date that the file was made on, and the filetext is the files contents.

    Read the article

  • Dictionary not deserializing

    - by Shadow
    I'm having a problem where one Dictionary in my project is either not serializing or not deserializing. After deserializing, the data I serialized is simply not in the object. Here's the relevant snip of the class being serialized: class Person : ISerializable { private Dictionary<Relation,List<int>> Relationships = new Dictionary<Relation,List<int>>(); public Person(SerializationInfo info, StreamingContext context) { this.Relationships = (Dictionary<Relation, List<int>>) info.GetValue("Relationships", typeof(Dictionary<Relation, List<int>>)); } public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("Relationships", this.Relationships); } } Note, this is binary serialization. Everything else in the project serializes and deserialzes correctly.

    Read the article

  • Python dictionary formating

    - by None
    I made a python function to convert dictionaries to formatted strings. My goal was to have a function take a dictionary for input and turn it into a string that looked good. For example, something like "{'text':'Hello', 'blah':{'hi':'hello','hello':'hi'}}" would be turned into this: text: Hello blah: hi: hello hello: hi This is the code I wrote: indent = 0 def format_dict(d): global indent res = "" for key in d: res += (" " * indent) + key + ":\n" if not type(d[key]) == type({}): res += (" " * (indent + 1)) + d[key] + "\n" else: indent += 1 res += format_dict(d[key]) indent -= 1 return res #test print format_dict({'key with text content':'some text', 'key with dict content': {'cheese': 'text', 'item':{'Blah': 'Hello'}}}) It works like a charm. It checks if the dictionary item is another dictionary, in which it process that, or something else, in which it would use that as the value. The problem is: I can't have a dictionary and a string together in a dictionary item. For example: if I wanted blah: hi hello: hello again there'd be no way to do it. Is there some way I could have something like a list item in a dictionary. Something like this "{'blah':{'hi', 'hello':'hello again'}}"? And if you provide a solution could you tell me how I would need to change my code (if it did require changes). Note: I am using python 2.5

    Read the article

  • XML Serializing a class with a Dictionary<string, List<string>> object

    - by Matt
    Is it possible to implement IXmlSerializable and in my XML file capture an object of type Dictionary ? I have the following public class coolio : IXmlSerializable { private int a; private bool b; private string c; private Dictionary<string, List<string>> coco; public coolio(int _a, bool _b, string _c, Dictionary<string, List<string>> _coco) { a=_a; b=_b; c=_c; coco=_coco; } public System.Xml.Schema.XmlSchema GetSchema() { return null; } public void WriteXml(XmlWriter writer) { const string myType = "coolio"; writer.WriteStartElement(myType); writer.WriteAttributeString("a", a.ToString()); writer.WriteAttributeString("b", b.ToString()); writer.WriteAttributeString("c", c); // How do I add a subelement for Dictionary<string, List<string>> coco? writer.WriteEndElement(); } public void ReadXml(XmlReader reader) { if (reader.MoveToContent() != XmlNodeType.Element || reader.LocalName != "coolio") return; a= int.Parse(reader["a"]); b = bool.Parse(reader["b"]); c= reader["c"]; // How do I read subelement into Dictionary<string, List<string>> coco? } } But I am stumped as to how I could add the Dictionary (XML seriliazed to my XML file)

    Read the article

  • Merging dictionaries in C#

    - by orip
    What's the best way to merge 2 or more dictionaries (Dictionary<T1,T2>) in C#? (3.0 features like LINQ are fine). I'm thinking of a method signature along the lines of: public static Dictionary<TKey,TValue> Merge<TKey,TValue>(Dictionary<TKey,TValue>[] dictionaries); or public static Dictionary<TKey,TValue> Merge<TKey,TValue>(IEnumerable<Dictionary<TKey,TValue>> dictionaries); EDIT: Got a cool solution from JaredPar and Jon Skeet, but I was thinking of something that handles duplicate keys. In case of collision, it doesn't matter which value is saved to the dict as long as it's consistent.

    Read the article

  • Performance of String literals vs constants for Session[...] dictionary keys

    - by FreshCode
    Session[Constant] vs Session["String Literal"] Performance I'm retrieving user-specific data like ViewData["CartItems"] = Session["CartItems"]; with a string literal for keys on every request. Should I be using constants for this? If yes, how should I go about implementing frequently used string literals and will it significantly affect performance on a high-traffic site? Related question does not address ASP.NET MVC or Session.

    Read the article

  • Interesting AS3 hash situation. Is it really using strict equality as the documentation says?

    - by Triynko
    AS3 Code: import flash.utils.Dictionary; var num1:Number = Number.NaN; var num2:Number = Math.sqrt(-1); var dic:Dictionary = new Dictionary( true ); trace(num1); //NaN trace(num2); //NaN dic[num1] = "A"; trace( num1 == num2 ); //false trace( num1 === num2 ); //false trace( dic[num1] ); //A trace( dic[num2] ); //A Concerning the key comparison method... "The Dictionary class lets you create a dynamic collection of properties, which uses strict equality (===) for key comparison. When an object is used as a key, the object's identity is used to look up the object, and not the value returned from calling toString() on it." If Dictionary uses strict equality, as the documentation states, then how is it that num1 === num2 is false, and yet dic[num1] resolves to the same hash slot as dic[num2]?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >