|
Hi,
This project is set up as a Dynamic Data Scaffolding project. Something that is new to me.
I am trying to insert an item, but it should have a dropdown list of the items.
|
|
|
|
|
vkEmerson wrote: This project is set up as a Dynamic Data Scaffolding project. Something that is new to me. It was also new to me, just bookmarked a howto on the subject.
I was trying to convince you to use a normal table; but that'd probably generate an edit-page for the table. I assume that by "static" you mean read-only? Can you base the dbml part on a view?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Sample .dbml file
<Table Name="dbo.DemocQ " Member="DemocQ">
<Type Name=" DemocQ ">
<Column Name="QuestionId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
<Column Name="QuestionText" Type="System.String" DbType="VarChar(256)" CanBeNull="true" />
<Column Name="Enabled" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
<Column Name="AnswerType" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
</Type>
</Table>
In this case, AnswerType, has 3 static values, which I would like to show as drop down list. Patient, Physician, Nurse. How can I do this? This is for the insert page.
Thanks, I will try to base this dbml as part of a view.
|
|
|
|
|
I'm using "system.speech" library to recognize voice commands, but I want to use genetic algorithms to improve recognition, and I'm new to GAs and I've some questions:
How to implement this (what is the population in this situation? the genomes..)
Can this be done using the c# speech recognition library or should I use FFT....
Any other advice ll be apprecited. Thank you
modified 15-Oct-13 10:21am.
|
|
|
|
|
I'd start with something simpeler; try training something to recognize something simple. Speech recognition is extremely hard, and it'll be quite the exercise to have it recognize and differentiate between "start" and "hard".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you for replying sir,
I can't understand how to do this, using speechrecognitionengine or something else?
And what about GA?
Can you please explain more or give me a link to some tutorials..
Thank you
|
|
|
|
|
Member 9973616 wrote: I can't understand how to do this, using speechrecognitionengine or something else? The speech-api as suggested by GuyThiebaut is your best option. There's quite some examples out there that use "MSAgent"; that makes responding to spoken commands somewhat easier.
Member 9973616 wrote: And what about GA? I doubt that you can "plug in" some GA code into some speech-engine. Unless you're familiar with one of either topics, there's little chance you'll be combining them succesfull.
Member 9973616 wrote: Can you please explain more or give me a link to some tutorials.. There's no tutorial on how to build your own speech-recognition engine. Google for MSAgent and follow the tutorials.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I wrote a speech recognition application using SAPI - which was relatively easy to do.
SAPI will allow you to train the speech system too - have a look at the articles on this site as I taught myself the basics of SAPI from this site.
If you are interested in seeing if a SAPI application works for you check out my app - it's called First Officer and can be found on my teboweb.com site.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
hi xperts,
Greetings from Imran.
i want to make an application which crop image in 5 different sections. but problem is that image size is not fixed and angle is also not same. so how to get exact size of inserted image.
|
|
|
|
|
You need to clarify what you are doing with the image. What, exactly, do you mean by "crop image in 5 different sections" ? Do you mean that you want to take a source image and trim away parts of it five times ? Or, do you want to take an image file and create five files each of which contains a part of the image ?
What exactly do you mean by "angle" here: what is it that "has" the angle. What is the "inserted" image ?
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
|
|
|
|
|
Hi
How do I find a server name using c #.net?
Thank You.
|
|
|
|
|
This isn't a good question, particularly: how do we know what kind of server you are looking for?
You can find all the IP addresses on your local LAN: Retrieving IP and MAC addresses for a LAN[^] and use the DNS to resolve the hostname:
string hostName = Dns.GetHostEntry(ipAddress).HostName;
How you identify the server you are looking for from that, though...up to you!
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
|
I would like to make a windows service that gets started when application is launched and internet connectivity is available then checks for updates. It checks for and notifies user to download new updates.
Now, services can not be interactive. SO how the launching and the making this interactive can be achieved.
Does making services interactive posses security threat and is there any alternative to achieve the same ?
Thanks in advance.
|
|
|
|
|
Yes, they are a threat. There is a reason why you can't make then interactive any more.
Do it the correct way and have the service listen on a named pipe. Then you can have a second application launch when the user logs in and communicates with the service over the pipe. That application can put up any user interface required.
It takes a bit more work, but is infinitely more secure, stable and supportable.
|
|
|
|
|
Abhay B wrote: and notifies user to download new updates In that case it should be a normal Windows application that runs in the user space. A service runs before the user logs on, when there is no desktop (and no user!) to notify.
A normal app does what you want, and wastes less resources when the user isn't logged in. Next, the service might have trouble if there are multiple users logged on that machine.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
select a.*,b.* from a
left join b on a.type = b.type and a.item = b.item
I want to use linq display all a.columns and b.columns
Column is dynamic!
|
|
|
|
|
Linq doesn't have an equivalent to *. Really, Linq never does a SELECT *. It always executes a query by naming each and every column in the source object. An example of a Left Join would be something like:
from itemA in a
join itemB in b on a.type equals b.type into bt
from itemB in bt.DefaultIfEmpty()
select new {
aObj = itemA,
bObj = itemB
}
In order to generate a new object from a list of unknown columns, you'd have to use so ugly Reflection code to get the columns and build a new object from them. Sorry, I don't have an example as I find the concept of SELECT * ugly and very prone to breaking code in the future, even in Linq.
You may want to read up on How to: Perform Left Outer Joins[^] and note the links in the left-side navigation pane.
|
|
|
|
|
Agreed - SELECT * FROM should be banned for a pile of good reasons!
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
OriginalGriff wrote: SELECT * FROM should be banned
Except in VIEWS
|
|
|
|
|
Even then it should be banned.
What if one of your columns called a user defined function on every row returned?? Say this function resulted in a large load on the server, but was fine for datasets of a couple of dozen records? Now what if this table had millions of records in it?? I really wouldn't want a * query beating the crap out of my server.
|
|
|
|
|
I meant using SELECT * in the definition of the view, not while doing a select on the view.
|
|
|
|
|
I know what you meant. It is NOT supported by Linq.
You would have to use some very ugly Reflection code in a seperate method to build a new object from the supplied objects, then build your collection from there. No, I don't have an example because it's a very bad idea to do what your thinking about.
Just because you can do it in a database engine doesn't mean you can do it in Linq. Linq is not a database engine.
modified 17-Oct-13 9:25am.
|
|
|
|
|
Nope. It should still be banned then. You should always know what's being returned. Relying on SELECT * is just being lazy - how long does it really take to explicitly select columns, especially given the number of code generators that abound.
|
|
|
|
|
I have seen many production systems where views are used to streamline access to tables and avoid direct access to tables. In these cases, a view is just a "wrapper" around a table. Imagine, if the underlying table structure changes (new column added or an existing column removed), then the view becomes invalid and has to be updated with the new structure. Doing a SELECT * in this situation will avoid this issue.
I know it is still bad, but there are already millions of systems that do this. Wherever I am asked to do a database upgrade or performance improvement, I am very cautious about views and don't touch them unless I'm sure of what I am doing.
|
|
|
|