Search Results

Search found 510 results on 21 pages for 'neil chen'.

Page 1/21 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Relationships in a Chen ERD

    - by Nibroc A Rehpotsirhc
    I am working on a Chen ERD to model our organizations merchandise. Our central entity is a Style. We have supplemental entities of Color and Season. I am defining our assortment as the relationship between these three entities, and this relationship itself will have attributes and is defined by the three entities which participate in the mandatory relationship. The rules are; Many Styles can be offered in a Season, and a Style can be offered in many Seasons. Within a Season, a Style can be offered in Many Colors. I then have 2 other entities, one of which I believe is a weak entity, Climate, and the other may be weak, but I am not sure, this being Transaction Channel. I am thinking of these as relationships off of a relationship? Meaning, for a given Style/Color combination offered in a Season, it can be available through 1 or more Transaction Channels. Additionally, within a season, a given Style/Color combination can be intended for 1 or more Climates. Is it valid to have relationships off of relationships? Or does this requirement dictate that I should think of this Style/Color/Season relationship as an entity itself, and define the relationships to Climate and Transaction Channel off of this entity?

    Read the article

  • PASS Data Architecture VC presents Neil Hambly on Improve Data Quality & Integrity using Constraints

    On Tuesday June 19th 12PM noon Central, Neil Hambly will discuss "Leveraging the power of constraints to improve both data quality and performance of your databases." What are your servers really trying to tell you? Find out with new SQL Monitor 3.0, an easy-to-use tool built for no-nonsense database professionals.For effortless insights into SQL Server, download a free trial today.

    Read the article

  • What does NT_STATUS_BAD_NETWORK_NAME mean in Samba?

    - by Neil
    I set up a share like this: [global] security = user map to guest = Bad Password usershare allow guests = yes [vms] comment = VirtualBox Virtual Machines path = /home/neil/VirtualBox/HardDisks guest ok = yes read only = yes And when I access the share as myself, and type in my password, it works fine: $ smbclient //neil-ubuntu/vms -U neil Enter neil's password: Domain=[SHUTTERSTOCK] OS=[Unix] Server=[Samba 3.4.0] smb: \> But when I access it as guest, it doesn't work: $ smbclient //neil-ubuntu/vms -U guest Enter guest's password: Domain=[SHUTTERSTOCK] OS=[Unix] Server=[Samba 3.4.0] tree connect failed: NT_STATUS_BAD_NETWORK_NAME Regardless of what password I type in. Does anyone know why? Also, why does smbclient print such useless error messages?

    Read the article

  • Low graphics performance with Intel HD graphics

    - by neil
    hey, my laptop should be capable of running some games fine but doesn't. Examples are egoboo and tome. http://www.ebuyer.com/product/237739 this is my laptop. I tried the gears test and i only get 60 FPS, on IRC they said thats a big issue and should try the forums. I am using Ubuntu 11.04 and was told I should have the newest drivers. neil@neil-K52F:~$ /usr/lib/nux/unity_support_test --print OpenGL vendor string: Tungsten Graphics, Inc OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile GEM 20100330 DEVELOPMENT OpenGL version string: 2.1 Mesa 7.10.2 Not software rendered: yes Not blacklisted: yes GLX fbconfig: yes GLX texture from pixmap: yes GL npot or rect textures: yes GL vertex program: yes GL fragment program: yes GL vertex buffer object: yes GL framebuffer object: yes GL version is 1.4+: yes Unity supported: yes

    Read the article

  • Minimum Baseline for Extended Support are you Ready ?

    - by gadi.chen
    As you all know the Premier support for 11i was ended last year. The extended support is available, but to use it you are advised to be at a minimum patch level as describe in note: 883202.1. So how you can know if you are in the minimum patch level? So, there are few ways. Patch wizard. Contact Oracle Support. Upload me Patch wizard Easy to use, very intuitive, required installing patch 9803629. Check MOS note: 1178133.1 Oracle Support You can log an SR thru My Oracle Support a.k.a MOS. Upload me In this option you will need to run simple sql statement (attached below or you can download it from here patchinfo.sql ) via sql*plus and upload/mail me the output and I will mail you back as soon as I can a detailed report of the required patches to be installed in order to be supported. Gadi Chen Oracle Core Technology Consultant [email protected] -------------------------------- Start from Here --------------------------------- set pagesize 0 echo off feedback off trimspool on timing off col prod format a8 col patchset format a15 spool patchinfo.txt select instance_name, version from v$instance; select bug_number from ad_bugs; prompt EOS select decode(nvl(a.APPLICATION_short_name,'Not Found'), 'SQLAP','AP','SQLGL','GL','OFA','FA', 'Not Found','id '||to_char(fpi.application_id), a.APPLICATION_short_name) prod, fpi.status, nvl(fpi.patch_level,'Unknown') patchset from fnd_application a, fnd_product_installations fpi where fpi.application_id = a.application_id(+) and fpi.status != 'N' and fpi.patch_level is not null order by 2,1; spool off; exit

    Read the article

  • Types of ER Diagrams

    - by syrion
    I'm currently taking a class for database design, and we're using the ER diagram style designed by Peter Chen. I have a couple of problems with this style: Keys in relationships don't seem realistic. In practice, synthetic keys like "orderid" seem to be used in almost all tables, including association tables, but the Chen style diagrams heavily favor (table1key, table2key) compound keys. There is no notation for datatype. The diamond shape for associations is horrible, and produces a cluttered diagram. In general, it just seems hard to capture some relationships with the Chen system. What ERD style, if any, do you use? What has been the most popular in your workplaces? What tools have you used, or do you use, to create these diagrams?

    Read the article

  • Problems building application for Ubuntu App Showdown

    - by Neil Munro
    I have managed to submit my source application to the Ubuntu build servers, however it's not building. This is the build output: https://launchpadlibrarian.net/109592385/buildlog_ubuntu-precise-i386.liberedit_12.07.20_FAILEDTOBUILD.txt.gz I know that there is a dependency on lxml for my application but I don't know how to correct that, but I can also see that it's failing to find my own python modules. I am not sure what is going on in it's entirety here, but I would greatly appreciate getting this to build so I can submit it to the Ubuntu App Showdown. Thanks, Neil

    Read the article

  • Hosted version of Yahoo! answers

    - by Neil
    Hi all. Does anyone know of a hosted version of Yahoo! Answers (or Stackoverflow/Superuser) that I could integrate with my site? I know that there are some open-source implementations (see http://meta.stackoverflow.com/questions/2267/stack-overflow-clones?page=1&tab=votes#tab-top) but I'd rather have some hosted if possible. I know there is http://stackexchange.com/ as well, but I really want some tight integration with the rest of my site. Failing that, has anyone got any experience with the open source versions? Some of them look a little, erm, unfinished... Thanks. Neil.

    Read the article

  • dput keeps selecting the wrong ppa

    - by Neil Munro
    I am trying to upload my application for Ubuntu app showdown and I have built it with quickly package --extras, however when I run quickly submit ubuntu I get an email telling me the package was rejected because it was trying to upload to an older ppa I deleted months ago. I can upload the source to the right area with dput, but obviously I need a built deb package. This is starting to stress me out somewhat because I have been fighting this for over a day or more now. Any help is greatly appreciated, I understand quickly is supposed to do a lot of the grunt work for me so it's getting frustrating not knowing what's going on. Thanks, Neil

    Read the article

  • Introducing Glimpse – Firebug for your server

    - by Neil Davidson
    Here at Red Gate, we spend every waking hour trying to wow .NET and SQL developers with great products.  Every so often, though, we find something out in the wild which knocks our socks off by taking “ingeniously simple” to a whole new level.  That’s what a little community led by developers Nik Molnar and Anthony van der Hoorn has done with the open source tool Glimpse. Glimpse describes itself as ‘Firebug for the server.’  You drop the NuGet package into your ASP.NET project, and then — like magic* — your web pages will bare every detail of their execution.  Even by our high standards, it was trivial to get running: if you can use NuGet, you’re already there. You get all that lovely detail without changing any code. Our feelings go beyond respect for the developers who designed and wrote Glimpse; we’re thrilled that Nik and Anthony have come to work for Red Gate full-time. They’re going to stay in control of the project and keep doing open source development work on Glimpse.  In the medium term, we’re hoping to make paid-for products which plug into the free open source framework, especially in areas like performance profiling where we already have some deep technology.  First, though, Glimpse needs to get from beta to a v1. Given the breakneck pace of new development, this should only be a month or so away. Supporting an open source project is a first for Red Gate, so we’re going to be working with Nik and Anthony, with the Glimpse community and even with other vendors to figure out what ‘great’ looks like from the a user perspective.  Only one thing is certain: this technology deserves a wider audience than the 40,000 people who have already downloaded it, so please have a look and tell us what you think. You can hear more about what the Glimpse developers think on the Glimpse blog, and there are plenty more technical facts over at our product manager’s blog. If you have any questions or queries, please tweet with the #glimpse hashtag or contact the Glimpse team directly on [email protected]. [*That’s ”magic” in the Arthur C. Clarke “sufficiently advanced technology” sense, of course] Neil Davidson co-founder and Joint CEO Red Gate Software http://twitter.com/neildavidson    

    Read the article

  • STLport5.2.1 question in VC6.0

    - by vincent.chen
    hi all, today i install the STLPort5.2.1 to my VC6.0 and i test it out, it's okay in the console project, but it issue following question in the MFC project: Compiling... testMFCDlg.cpp d:\sw\vc6\vc98\stlport-5.2.1\stlport\errno.h(55) : fatal error C1189: #error : errno has been defined before inclusion of errno.h header. Error executing cl.exe. how could i avoid this question correctly, help , friends. best wishes, vincent.chen

    Read the article

  • Upgrade TFS 2008 to 2010 on different server

    - by Chen
    Hi, I have been looking for a way to migrate and upgrade our TFS 2008 server to 2010 server preferably without losing any data. I have been looking at the TFS Integration Platform http://tfsintegration.codeplex.com/ and also Visual Studio 2010 TFS Upgrade Guide vs2010upgradeguide.codeplex.com Looking at the document TFS Integration Platform - Migration Guidance.xps using the first link, it seems to suggest that I could preserve all the data by first migrating the TFS 2008 from one server to the other and then upgrade the TFS 2008 to 2010. Is this true? Thank you, Chen

    Read the article

  • TFS 2008 to TFS 2010 upgrade to exclude sharepoint

    - by Chen
    Hi, I'm currently planning to upgrade our TFS 2008 server to TFS 2010 with the condition below: 1. upgrade everything except for the sharepoint 2. upgrade everything including sharepoint but sharepoint will be enabled only at later stage. will this stop us from using TFS for our development? Thanks, Chen

    Read the article

  • DC Comics Identifies Krypton on the Star Map

    - by Jason Fitzpatrick
    This week Action Comics Superman #14 hits the stands and DC comics reveals the actual location of Kyrpton, delivered by none other than beloved astrophysicist Neil Tyson. Phil Plait at Bad Astronomy reports on the resolution of fans’ long standing curiosity about the location of Krypton: Well, that’s about to change. DC comics is releasing a new book this week – Action Comics Superman #14 – that finally reveals the answer to this stellar question. And they picked a special guest to reveal it: my old friend Neil Tyson. Actually, Neil did more than just appear in the comic: he was approached by DC to find a good star to fit the story. Red supergiants don’t work; they explode as supernovae when they are too young to have an advanced civilization rise on any orbiting planets. Red giants aren’t a great fit either; they can be old, but none is at the right distance to match the storyline. It would have to be a red dwarf: there are lots of them, they can be very old, and some are close enough to fit the plot. I won’t keep you in suspense: the star is LHS 2520, a red dwarf in the southern constellation of Corvus (at the center of the picture here). It’s an M3.5 dwarf, meaning it has about a quarter of the Sun’s mass, a third its diameter, roughly half the Sun’s temperature, and a luminosity of a mere 1% of our Sun’s. It’s only 27 light years away – very close on the scale of the galaxy – but such a dim bulb you need a telescope to see it at all (for any astronomers out there, the coordinates are RA: 12h 10m 5.77s, Dec: -15° 4m 17.9 s). 6 Ways Windows 8 Is More Secure Than Windows 7 HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8

    Read the article

  • Bash completion doesn't work, or is ignoring what I've typed; but works for commands

    - by Neil Traft
    Bash completion seems to be ignoring what I've typed (it tries to complete, but acts as if there's nothing under the cursor). I know I saw it work on this machine earlier today, but I'm not sure what has changed. Some examples: cd shows all directories under my current folder: $ cd co<tab><tab> cmake/ config/ doc/ examples/ include/ programs/ sandbox/ src/ .svn/ tests/ Commands like ls and less show all files and directories under my current folder: $ ls co<tab><tab> cmake/ config/ .cproject Doxyfile.in include/ programs/ README.txt src/ tests/ CMakeLists.txt COPYING.txt doc/ examples/ mainpage.dox .project sandbox/ .svn/ Even when I try to complete things from a different folder, it gives me only the results for my current folder (telling me that it is completely ignoring what I've typed): $ cd ~/D<tab><tab> cmake/ config/ doc/ examples/ include/ programs/ sandbox/ src/ .svn/ tests/ But it seems to be working fine for commands and variables: $ if<tab><tab> if ifconfig ifdown ifnames ifquery ifup $ echo $P<tab><tab> $PATH $PIPESTATUS $PPID $PS1 $PS2 $PS4 $PWD $PYTHONPATH I do have this bit in my .bashrc, and I have confirmed that my .bashrc is indeed getting sourced: if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion fi I've even tried manually executing that file, but it doesn't fix the problem: $ . /etc/bash_completion There was even one point in time where it was working for ls, but was not working for cd ... but I can't replicate that result now. Update: I also just discovered that I have terminals open from earlier that still work. I ran source .bashrc in one of them and afterwards completion was broken. Here is my .bashrc: # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # # Modified by Neil Traft #source ~/.profile # Allow globs to expand hidden files shopt -s dotglob nullglob # If not running interactively, don't do anything [ -z "$PS1" ] && return # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # Color the prompt export PS1="\[$(tput setaf 2)\]\u@\h:\[$(tput setaf 5)\]\W\[$(tput setaf 2)\] $\[$(tput sgr0)\] " # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion fi

    Read the article

  • how to display these text on blackberry and how to show the hyperlinks

    - by Changqi
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>A history of Canoe Cove /</title> </head> <body> <div class="tei"> <p> A History of </p> <p> The General Stores </p> <p> There were several general stores in our <a class="search orgName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22Cove%22+AND+dc.type:collection">Cove</a> at different times. The one that lasted longest was at the Corner across from the school and it had many owners. Who established it is unclear but John MacKenzie, the piper, who was also a shoe maker lived there. He was a relative of the present day MacKenzies of <a class="search placeName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22Canoe Cove%22+AND+dc.type:collection">Canoe Cove</a>. William MacKay who married Christena MacLean was operating it when it burned down and a store which had belonged to Neil "Cooper" MacLean was moved across to the site. This was later bought by <span class="persName"><a class="search persName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22MacCannell+Neil%22+AND+dc.type:collection"> Neil MacCannell </a></span> of Long Creek , a schoolteacher who taught in the <a class="search orgName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22Cove%22+AND+dc.type:collection">Cove</a> for a few years. <span class="persName"><a class="search persName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22MacNevin+Hector%22+AND+dc.type:collection"> Hector MacNevin </a></span> from <a class="search placeName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22St. Catherines%22+AND+dc.type:collection">St. Catherines</a> operated it for a year while it still belonged to <span class="persName"><a class="search persName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22MacCannell+Neil%22+AND+dc.type:collection"> Neil MacCannell </a></span> because Neil had accepted a job in <a class="search placeName" target="_blank" href="http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22Charlottetown%22+AND+dc.type:collection">Charlottetown</a> as clerk of the Court. Later Mrs. John Angus Darrach bought it and she and her son George ran it for years until both had health problems, and had to close the store after which closing it never reopened. After George died and his wife Hazel moved to Montague to live with her family the building was sold to Robert Patterson . Rob lived in it for a few years, making many improvements then sold it to Kirk McAleer. </p> </div>

    Read the article

  • Hosted version of Yahoo! answers [closed]

    - by Neil
    Hi all. Does anyone know of a hosted version of Yahoo! Answers (or Stackoverflow/Superuser) that I could integrate with my site? I know that there are some open-source implementations (see http://meta.stackoverflow.com/questions/2267/stack-overflow-clones?page=1&tab=votes#tab-top) but I'd rather have some hosted if possible. I know there is http://stackexchange.com/ as well, but I really want some tight integration with the rest of my site. Failing that, has anyone got any experience with the open source versions? Some of them look a little, erm, unfinished... Thanks. Neil.

    Read the article

  • Adobe AIR - file locked by air

    - by Neil
    Hello I am downloading and storing files locally in the app storage domain. For some reason one of the files gets locked by air. I found this by looking at process explorer. If I clear the browser cache the file never gets locked, only if it attempts to download the file but it exists in browser cache does air lock the damn file. Please can you help? Neil

    Read the article

  • Table filtering in jquery - a more elegant solution please

    - by Neil Burton
    I want to filter certain rows out of a table and am using classes to categorise the rows. The below code enables me to show and hide row data categorised as "QUO" and "CAL" (eventually there will be other categories. Can someone point me towards a more elegant solution, so I don't have to duplicate code for each category as I have below? Thanks! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <title>Untitled</title> <style> </style> <script src="Javascript/jquery-1.4.2.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $("#toggle_ac_cal").click(function() { var checked_status = this.checked; if (checked_status==true) { $(".ac_cal").show() } else { $(".ac_cal").hide() } }); $("#toggle_ac_quo").click(function() { var checked_status = this.checked; if (checked_status==true) { $(".ac_quo").show() } else { $(".ac_quo").hide() } }); }); </script> </head> <body> <input type="checkbox" id="toggle_ac_cal" checked="checked" />CAL<br/> <input type="checkbox" id="toggle_ac_quo" checked="checked" />QUO<br/> <table> <tbody> <tr class="ac_cal"> <td>CAL</td> <td>10 Oct</td> <td>John Barnes</td> </tr> <tr class="ac_cal"> <td>CAL</td> <td>10 Oct</td> <td>Neil Burton</td> </tr> <tr class="ac_quo"> <td>QUO</td> <td>11 Oct</td> <td>Neil Armstrong</td> </tr> </tbody> </table> </body> </html>

    Read the article

  • What operation type invoked a trigger in SQL Server 2008?

    - by Neil Moss
    I'm contemplating a single SQL trigger to handle INSERT, UPDATE and DELETE operations as part of an auditing process. Is there any statement, function or @@ variable I can interrogate to find out which operation type launched the trigger? I've seen the following pattern: declare @type char(1) if exists (select * from inserted) if exists (select * from deleted) select @Type = 'U' else select @Type = 'I' else select @Type = 'D' but is there anything else a little more direct or explicit? Thanks, Neil.

    Read the article

  • How to assert on number of html table rows in ruby using capybara + cucumber

    - by Neil
    I am trying to get to grips with BDD web development in Ruby using cucumber + capybara and I am stuck at what should be an easy task - just to check the number of rows in a table. Something along the lines of: page.should have_xpath("//table[@id='myTable']") find("//table[@id='myTable']/tr").length.should = 3 But this doesn't work and I can't find a way to assert against the table length. Any ideas anyone (please be easy on me tho' I'm a ruby nooby) Thanks in advance Neil

    Read the article

  • Alternative to distributed caching

    - by Chen
    Hi, There is a technical requirement to scale a new system easily. This new system consists of three tiered applications (as a batch processors). Each tier will contains at least 2 servers with the same application resides on each server. So, when one of the tier reaches peak performance, we could extend the scalability easily by adding a new server and the same application to off-load some of the processing loads. The problem is that one or two of the three tiers require heavy caching (about 3 million records and increasing). I'm thinking of using distributed caching system to overcome this problem but the new distributed caching system will means an additional point of failure as applications now need to interact with additional caching systems for processing. I'm currently looking at ncache but just wondering if there is an alternatives to this problem? or is there any other comparable distributed caching system that maybe similar or better than ncache and provide enterprise supports too? Thanks, Chen

    Read the article

  • A Nondeterministic Engine written in VB.NET 2010

    - by neil chen
    When I'm reading SICP (Structure and Interpretation of Computer Programs) recently, I'm very interested in the concept of an "Nondeterministic Algorithm". According to wikipedia:  In computer science, a nondeterministic algorithm is an algorithm with one or more choice points where multiple different continuations are possible, without any specification of which one will be taken. For example, here is an puzzle came from the SICP: Baker, Cooper, Fletcher, Miller, and Smith live on different floors of an apartment housethat contains only five floors. Baker does not live on the top floor. Cooper does not live onthe bottom floor. Fletcher does not live on either the top or the bottom floor. Miller lives ona higher floor than does Cooper. Smith does not live on a floor adjacent to Fletcher's.Fletcher does not live on a floor adjacent to Cooper's. Where does everyone live? After reading this I decided to build a simple nondeterministic calculation engine with .NET. The rough idea is that we can use an iterator to track each set of possible values of the parameters, and then we implement some logic inside the engine to automate the statemachine, so that we can try one combination of the values, then test it, and then move to the next. We also used a backtracking algorithm to go back when we are running out of choices at some point. Following is the core code of the engine itself: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Public Class NonDeterministicEngine Private _paramDict As New List(Of Tuple(Of String, IEnumerator)) 'Private _predicateDict As New List(Of Tuple(Of Func(Of Object, Boolean), IEnumerable(Of String))) Private _predicateDict As New List(Of Tuple(Of Object, IList(Of String))) Public Sub AddParam(ByVal name As String, ByVal values As IEnumerable) _paramDict.Add(New Tuple(Of String, IEnumerator)(name, values.GetEnumerator())) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(1, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(2, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(3, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(4, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(5, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(6, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(7, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Public Sub AddRequire(ByVal predicate As Func(Of Object, Object, Object, Object, Object, Object, Object, Object, Boolean), ByVal paramNames As IList(Of String)) CheckParamCount(8, paramNames) _predicateDict.Add(New Tuple(Of Object, IList(Of String))(predicate, paramNames)) End Sub Sub CheckParamCount(ByVal count As Integer, ByVal paramNames As IList(Of String)) If paramNames.Count <> count Then Throw New Exception("Parameter count does not match.") End If End Sub Public Property IterationOver As Boolean Private _firstTime As Boolean = True Public ReadOnly Property Current As Dictionary(Of String, Object) Get If IterationOver Then Return Nothing Else Dim _nextResult = New Dictionary(Of String, Object) For Each item In _paramDict Dim iter = item.Item2 _nextResult.Add(item.Item1, iter.Current) Next Return _nextResult End If End Get End Property Function MoveNext() As Boolean If IterationOver Then Return False End If If _firstTime Then For Each item In _paramDict Dim iter = item.Item2 iter.MoveNext() Next _firstTime = False Return True Else Dim canMoveNext = False Dim iterIndex = _paramDict.Count - 1 canMoveNext = _paramDict(iterIndex).Item2.MoveNext If canMoveNext Then Return True End If Do While Not canMoveNext iterIndex = iterIndex - 1 If iterIndex = -1 Then Return False IterationOver = True End If canMoveNext = _paramDict(iterIndex).Item2.MoveNext If canMoveNext Then For i = iterIndex + 1 To _paramDict.Count - 1 Dim iter = _paramDict(i).Item2 iter.Reset() iter.MoveNext() Next Return True End If Loop End If End Function Function GetNextResult() As Dictionary(Of String, Object) While MoveNext() Dim result = Current If Satisfy(result) Then Return result End If End While Return Nothing End Function Function Satisfy(ByVal result As Dictionary(Of String, Object)) As Boolean For Each item In _predicateDict Dim pred = item.Item1 Select Case item.Item2.Count Case 1 Dim p1 = DirectCast(pred, Func(Of Object, Boolean)) Dim v1 = result(item.Item2(0)) If Not p1(v1) Then Return False End If Case 2 Dim p2 = DirectCast(pred, Func(Of Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) If Not p2(v1, v2) Then Return False End If Case 3 Dim p3 = DirectCast(pred, Func(Of Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) If Not p3(v1, v2, v3) Then Return False End If Case 4 Dim p4 = DirectCast(pred, Func(Of Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) If Not p4(v1, v2, v3, v4) Then Return False End If Case 5 Dim p5 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) If Not p5(v1, v2, v3, v4, v5) Then Return False End If Case 6 Dim p6 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) Dim v6 = result(item.Item2(5)) If Not p6(v1, v2, v3, v4, v5, v6) Then Return False End If Case 7 Dim p7 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) Dim v6 = result(item.Item2(5)) Dim v7 = result(item.Item2(6)) If Not p7(v1, v2, v3, v4, v5, v6, v7) Then Return False End If Case 8 Dim p8 = DirectCast(pred, Func(Of Object, Object, Object, Object, Object, Object, Object, Object, Boolean)) Dim v1 = result(item.Item2(0)) Dim v2 = result(item.Item2(1)) Dim v3 = result(item.Item2(2)) Dim v4 = result(item.Item2(3)) Dim v5 = result(item.Item2(4)) Dim v6 = result(item.Item2(5)) Dim v7 = result(item.Item2(6)) Dim v8 = result(item.Item2(7)) If Not p8(v1, v2, v3, v4, v5, v6, v7, v8) Then Return False End If Case Else Throw New NotSupportedException End Select Next Return True End FunctionEnd Class    And now we can use the engine to solve the problem we mentioned above:   Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Sub Test2() Dim engine = New NonDeterministicEngine() engine.AddParam("baker", {1, 2, 3, 4, 5}) engine.AddParam("cooper", {1, 2, 3, 4, 5}) engine.AddParam("fletcher", {1, 2, 3, 4, 5}) engine.AddParam("miller", {1, 2, 3, 4, 5}) engine.AddParam("smith", {1, 2, 3, 4, 5}) engine.AddRequire(Function(baker) As Boolean Return baker <> 5 End Function, {"baker"}) engine.AddRequire(Function(cooper) As Boolean Return cooper <> 1 End Function, {"cooper"}) engine.AddRequire(Function(fletcher) As Boolean Return fletcher <> 1 And fletcher <> 5 End Function, {"fletcher"}) engine.AddRequire(Function(miller, cooper) As Boolean 'Return miller = cooper + 1 Return miller > cooper End Function, {"miller", "cooper"}) engine.AddRequire(Function(smith, fletcher) As Boolean Return smith <> fletcher + 1 And smith <> fletcher - 1 End Function, {"smith", "fletcher"}) engine.AddRequire(Function(fletcher, cooper) As Boolean Return fletcher <> cooper + 1 And fletcher <> cooper - 1 End Function, {"fletcher", "cooper"}) engine.AddRequire(Function(a, b, c, d, e) As Boolean Return a <> b And a <> c And a <> d And a <> e And b <> c And b <> d And b <> e And c <> d And c <> e And d <> e End Function, {"baker", "cooper", "fletcher", "miller", "smith"}) Dim result = engine.GetNextResult() While Not result Is Nothing Console.WriteLine(String.Format("baker: {0}, cooper: {1}, fletcher: {2}, miller: {3}, smith: {4}", result("baker"), result("cooper"), result("fletcher"), result("miller"), result("smith"))) result = engine.GetNextResult() End While Console.WriteLine("Calculation ended.")End Sub   Also, this engine can solve the classic 8 queens puzzle and find out all 92 results for me.   Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Sub Test3() ' The 8-Queens problem. Dim engine = New NonDeterministicEngine() ' Let's assume that a - h represents the queens in row 1 to 8, then we just need to find out the column number for each of them. engine.AddParam("a", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("b", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("c", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("d", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("e", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("f", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("g", {1, 2, 3, 4, 5, 6, 7, 8}) engine.AddParam("h", {1, 2, 3, 4, 5, 6, 7, 8}) Dim NotInTheSameDiagonalLine = Function(cols As IList) As Boolean For i = 0 To cols.Count - 2 For j = i + 1 To cols.Count - 1 If j - i = Math.Abs(cols(j) - cols(i)) Then Return False End If Next Next Return True End Function engine.AddRequire(Function(a, b, c, d, e, f, g, h) As Boolean Return a <> b AndAlso a <> c AndAlso a <> d AndAlso a <> e AndAlso a <> f AndAlso a <> g AndAlso a <> h AndAlso b <> c AndAlso b <> d AndAlso b <> e AndAlso b <> f AndAlso b <> g AndAlso b <> h AndAlso c <> d AndAlso c <> e AndAlso c <> f AndAlso c <> g AndAlso c <> h AndAlso d <> e AndAlso d <> f AndAlso d <> g AndAlso d <> h AndAlso e <> f AndAlso e <> g AndAlso e <> h AndAlso f <> g AndAlso f <> h AndAlso g <> h AndAlso NotInTheSameDiagonalLine({a, b, c, d, e, f, g, h}) End Function, {"a", "b", "c", "d", "e", "f", "g", "h"}) Dim result = engine.GetNextResult() While Not result Is Nothing Console.WriteLine("(1,{0}), (2,{1}), (3,{2}), (4,{3}), (5,{4}), (6,{5}), (7,{6}), (8,{7})", result("a"), result("b"), result("c"), result("d"), result("e"), result("f"), result("g"), result("h")) result = engine.GetNextResult() End While Console.WriteLine("Calculation ended.")End Sub (Chinese version of the post: http://www.cnblogs.com/RChen/archive/2010/05/17/1737587.html) Cheers,  

    Read the article

  • How do I fix “Ubuntu is running in low-graphics mode?” for NVIDIA GeForce GT555M

    - by David Chen
    As title, I'm using Ubuntu 10.04, and my ubuntu kept showing the sign “Ubuntu is running in low-graphics mode”. I've read another question with same topic (http://askubuntu.com/questions/10664/how-do-i-fix-ubuntu-is-running-in-low-graphics-mode ), but the other one is using ATI Radeon X1200. How can I fix the problem? I'm running Ubuntu on a 200GB partition, and the rest of my computer is Windows7. My graphic card is NVIDIA GeForce GT 555M, and my computer is ACER ASPIRE 5951G.

    Read the article

  • I tried to transplant the wireless_tools to Android4.0 system, but I have a problem with Java

    - by Chen Guoli
    My Linux system is Ubuntu Kylin, a new branch of Ubuntu spreading mainly in China. I have changed some files, such as wireless.22.h, ifrename.c and iwlib.h, in wireless_tools.29/ which is located in Android4.0 root directory. Then I followed these steps: $ cd ~/Android4.0 $ su $[key](change to root) root# source build/envsetup.sh root# cd ~/Android4.0/wireless_tools.2.9/ root# mm Then I got a message telling me that: Your version is: java version "1.7.0_21". The correct version is: Java SE 1.6. Then I did as How can I uninstall my current java and install sun java 1.6 The java was installed successfully, but when i tried mm again: Your version is: java version "1.6.0_27". The correct version is: Java SE 1.6. Then I tried https://source.android.com/source/initializing.html , but it didn't work. How can I install "java SE 1.6." correctly?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >