|
clientSurfer wrote: 3. What does it mean to you when I say strings are immutable? I'd say you have a managed mind
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: I'd say you have a managed mind
heheh! You are implying, kind sir, that my mind is part of some kind of Common Language Runtime; which troubles me because I never really considered my hopes, dreams and most innermost naissance-laden tendernesses in the context of being symbolically reduced to some sort of IL with all of the resulting compiler directives and localizations and identifiers and what-not.
But I refuse to be bytecode... So I endeavor to control and comply. I'm trying to dig deeply and greedily like Gloin and the Dwarve-lords, lower and lower into the hardware layer until I smote a Balrog or at least prove that a dry cell can power a light bulb in series.
Thanks in advance for your support all!
"... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute
"Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning. - gavindon
|
|
|
|
|
clientSurfer wrote: You are implying, kind sir, that my mind is part of some kind of Common Language
Runtime No, since only the strings of Microsoft are part of the CLR
I prefer to escalate these kind of questions; having the answer is one thing, seeing consequences another.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Then I'm guessing I must have a short between my seat and keyboard
"... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute
"Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning. - gavindon
|
|
|
|
|
Quick reactions:
0. overall: your answers are thoughtful and detailed, but I agree with other respondents here who have questioned the meaningfulness of the process.
1. Interfaces
"a way to achieve polymorphism within modules so that similar classes that need to readily utilize methods implemented in other common classes can do so without having to incur the overhead of instantiating the other classes within themselves." This seems "off" to me: specifically, this seems to imply an interface actually provides reusable something-or-other, and it most definitely does not. An abstract class, however, does "provide."
cheers, Bill
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
BillWoodruff wrote: 0. overall: your answers are thoughtful and detailed, but I agree with other respondents here who have questioned the meaningfulness of the process
0. Thank you Bill for your positive feedback on my answers. I also agree with anyone who will question the meaningfulness of the current interview process; I've been on the giving as well as receiving end of technical interviews and I know for a fact that any one of us 12 millions CP'ers could easily right now come up with some obscure programming questions for a technical interview that would be so specific that not a single one of the other 12 million members would be able to answer in their right minds.
BillWoodruff wrote: 1. This seems "off" to me: specifically, this seems to imply an interface actually provides reusable something-or-other, and it most definitely does not. An abstract class, however, does "provide."
Thanks Bill I appreciate the schooling on this... Methinks I need to readdress this whole area of my understanding of interfaces vs. abstract classes vs. virtual classes/methods
Thanks CPians for failing to disappoint as usual... Cheers!
"... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute
"Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning. - gavindon
|
|
|
|
|
I can't claim to be at a "guru level" on choosing whether to use "standard," or virtual, or abstract classes, and using your choice of those with interface definitions.
It took me a long time to "grok" that on one level using interfaces was a contract, a compile-time enforced promise that any object that inherited from the interface implemented every specification in the interface ... and, that interfaces also functioned as a way to establish a kind of "semantic viewport" on objects, so you could expose an object instance "filtered" in a carefully controlled way by passing it cast to the interface.
Later, when I discovered that you can use generics with interfaces, that interfaces can inherit from interfaces ... well, I'm still digesting that
I'm still looking (eagerly) for wisdom in terms of best practices in OO design; and I doubt I'll ever quit looking.
cheers, Bill
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
BillWoodruff wrote: I can't claim to be at a "guru level" on choosing whether to use "standard," or virtual, or abstract classes, and using your choice of those with interface definitions.
Wow that's actually saying a lot and is somehow comforting to me considering your impressive background and experience Bill!
BillWoodruff wrote: It took me a long time to "grok" that on one level using interfaces was a contract, a compile-time enforced promise that any object that inherited from the interface implemented every specification in the interface ... and, that interfaces also functioned as a way to establish a kind of "semantic viewport" on objects, so you could expose an object instance "filtered" in a carefully controlled way by passing it cast to the interface.
... never thought about the "semantic viewport" offered by interfaces; more appreciated food for thought you have provided me here...
BillWoodruff wrote: I'm still looking (eagerly) for wisdom in terms of best practices in OO design; and I doubt I'll ever quit looking.
Neat quote and well said, Bill - an encouraging thought that promises to inspire me today in my grok quest (hmm "Grok Quest" - that almost sounds like a good name for a bad video game, yes?)
Thanks Man, Cheers!
"... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute
"Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon
"I'm still looking (eagerly) for wisdom in terms of best practices in OO design; and I doubt I'll ever quit looking." - BillWoodruff
"Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning." - gavindon
modified 30-Aug-15 17:59pm.
|
|
|
|
|
hi
if speech a word in recognition and the word not found in grammar , how to access to the word ?
thank you
please help me
|
|
|
|
|
Member 11785200 wrote: the word not found in grammar , how to access to the word Think about that question. That is like saying, if there are no apples on the apple tree, how do I find the apple?
|
|
|
|
|
By looking in the hands of the staff. At least one will have an Apple.
|
|
|
|
|
|
I want to recognize speech when user speaks. In Microsoft.Speech Append.Dictation method doesn't invoke SpeechRecognized event.. Not recognizing the speech. Kindly help me in resolving the issue.
Code--
static void Main(string[] args)
{
using (
SpeechRecognitionEngine recognizer =
new SpeechRecognitionEngine(
new System.Globalization.CultureInfo("en-US")))
{
GrammarBuilder builder = new GrammarBuilder();
builder.AppendDictation("Start");
Grammar grammarWithDictation = new Grammar(builder);
grammarWithDictation.Name = "Grammar with Dictation";
recognizer.LoadGrammarAsync(grammarWithDictation);
recognizer.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(recognizer_SpeechRecognized);
recognizer.SetInputToDefaultAudioDevice();
recognizer.RecognizeAsync(RecognizeMode.Multiple);
while (true)
{
Console.ReadLine();
}
}
}
static void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
Console.WriteLine("Recognized text: " + e.Result.Text);
}
|
|
|
|
|
I want to create a service that will run every so often and that will call my Report Server to create a report given some parameter. I am stuck in the beginning, since I have not much experience in report servers!!! how to call the report server. Any ideas?
Stefanos
|
|
|
|
|
What have you tried?
We are you struck exactly?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hello,
I want to create a table, grant previlegs, create a stored procedure and finally use this stored procedure.
And I want to use all of them with 'exec'.
A good explication to use exec within an sqlstament ist here,
https://stackoverflow.com/questions/3523989/how-to-use-sqlcommand-to-create-database-with-parameterized-db-name
But no matter what I'm doing I cant run finally the stored-procedure.
It says allways, it couldnt find the store procedure.
Or, if I try it without exec, than it says it has to much arguments.
It works only if I use all the other staments without exec.
This is how it looks, for grant and create stp as well
public void CreateTable(string strtblName)
{
strSQL = "EXEC ('CREATE TABLE ' + @tblName + ([EmployeeID] [int] NOT NULL PRIMARY KEY CLUSTERED," +
"[VorName] [nvarchar](50) NULL, [NachName] [nvarchar](50) NULL," +
" [Titel] [nvarchar](30) NULL," + " [City] [nvarchar](50) NULL," +
" [BirthDate] [date] NULL) ON [PRIMARY]')";
try
{
myCnn.Open();
myCmd.Connection = myCnn;
myCmd.CommandType = CommandType.Text;
myCmd.CommandText = strSQL;
myCmd.Parameters.Clear();
myCmd.Parameters.Add("@tblName", SqlDbType.Text);
myCmd.Parameters["@tblName"].Value = strtblName;
myCmd.ExecuteNonQuery();
myCnn.Close();
}
catch (Exception ex)
{
myCnn.Close();
throw new Exception(ex.Message);
}
}
|
|
|
|
|
pschulz wrote:
strSQL = EXEC ('CREATE TABLE ' + @tblName ([EmployeeID] [int] NOT NULL PRIMARY KEY CLUSTERED," +
"[VorName] [nvarchar](50) NULL, [NachName] [nvarchar](50) NULL," +
" [Titel] [nvarchar](30) NULL, [City] [nvarchar](50) NULL," +
" [BirthDate] [date] NULL) ON [PRIMARY]')"; The problem with the table creation is that you try to use parameters, don't use them.
Instead try the following:
strSQL = @"CREATE TABLE " + strtblName + @" (
[EmployeeID] [int] NOT NULL PRIMARY KEY CLUSTERED,
[VorName] [nvarchar](50) NULL,
[NachName] [nvarchar](50) NULL,
[Titel] [nvarchar](30) NULL,
[City] [nvarchar](50) NULL,
[BirthDate] [date] NULL) ON [PRIMARY])";
pschulz wrote: This is how it looks, for grant and create stp as well
You need to post relevant code parts. If the problem is with the stored procedure, edit the post and paste the code for creating and using the procedure.
Also if you get any error messages, please include those in original format.
modified 26-Aug-15 0:46am.
|
|
|
|
|
Mika Wendelius wrote: The problem with the table creation is that you try to use parameters, don't use them.
You might want to clarify that your advice only applies to this specific situation. 99.999% of SQL code should use parameters.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Good point 
|
|
|
|
|
pschulz wrote:
strSQL = "EXEC ('CREATE TABLE ' + @tblName + ([EmployeeID] [int] NOT NULL PRIMARY KEY CLUSTERED," +
"[VorName] [nvarchar](50) NULL, [NachName] [nvarchar](50) NULL," +
" [Titel] [nvarchar](30) NULL," + " [City] [nvarchar](50) NULL," +
" [BirthDate] [date] NULL) ON [PRIMARY]')";
You're missing a single quote after the table name:
strSQL = "EXEC ('CREATE TABLE ' + @tblName + '([EmployeeID] [int] NOT NULL PRIMARY KEY CLUSTERED," +
"[VorName] [nvarchar](50) NULL, [NachName] [nvarchar](50) NULL," +
" [Titel] [nvarchar](30) NULL," + " [City] [nvarchar](50) NULL," +
" [BirthDate] [date] NULL) ON [PRIMARY]')";
I'd also suggest using the QUOTENAME function[^] around the @tblName parameter, if you haven't already done so:
strSQL = "EXEC ('CREATE TABLE ' + QUOTENAME(@tblName) + '...
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I have something like a solution, but ist not the answer.
take this two ado objects
SqlConnection
SqlCommand
make them ready
create the database (exec within the statement)
create the table (exec within the statement)
grant previligs for the table (exec within the statement)
create a stp (exec within the statement)
Now, to fill the table with datas, using the stp,but keep exec out of the statment
|
|
|
|
|
It seems to me pretty simple.
The MsSQlserver is made to reject a call like that, with intention.
There is no reason to call a existing stp with a constructet name, from a application(maybe just about the risc to cause errors.)
And finally, there is no way to call a stp with the keyword ‘EXEC’, with or without paramters within the stp name.
That’s probably the answer. I write here probably cause, people who with deeper knowledge of the sever construction, may have a better or finally other explication.
|
|
|
|
|
Similar sharpdevelop or Visual Studio effects, the use of certain namespace A Window designer in his own program, how to do, or hope to provide demo source code, or design ideas, relevant examples, especially thank you ~!
|
|
|
|
|
Download the SharpDevelop source and study it.
|
|
|
|
|
Questions
1> when use ApiController Then not use TempData,Session,ViewBag,ViewData.
2> when Use ApiController Then How To Strongly Connected To the view.
3> Is Possible To ApiController ActionMethod Return Json,Xml And View Per Request
4> I have Already Connection To DataBase then Why Use Get/Set Method And convert Data
From json and Display It in our view using client side language like Jquery,Angular JS
5> ApiController ActionMethods Not Return View Then How To Routing Our View in View Folder beacuse First Action Get Controller And Controller Return Vew But Api Controller Not Return View.
|
|
|
|
|