|
Can someone provide me the step by step implementation of how to use pocketsphinx in a C# application(Console or Windows form).
|
|
|
|
|
|
YES i did but it has explanation about C++ not C#, And Sorry i am not an expert in programming.
|
|
|
|
|
I told you yesterday that it is unlikely anyone here would have the free time to provide you with this. If you want to implement some software then you need to go and learn it for yourself.
|
|
|
|
|
Google gave me this as the first link[^]
There are many links that google show for c# pocketsphinx[^]
I hope that this can get you started on your project.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
You're basically asking for someone to teach you how to write interop code, or to write the interop for you. Why don't you look at the C# port of this here[^]? See if that's any more help for you.
|
|
|
|
|
Hi, everyone i am beginner in asp.net(c#) and want to know what thing we should know for getting job in this field now day, please help me we want job.
|
|
|
|
|
|
As Richard has said, we can't really help you that much.
And a lot of it will depend on local conditions.
It might be worth asking othesr in the same country - at least they know what is "hot" locally and what helped them to get a job.
We do have a General Indian Topics[^] forum, which would at least address other Indian nationals directly?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
The first record is displaying, I only wanted to show rows with more 1.25 and less .075.
Doe John 176.0000 1.0000 165.0000 0.9400 04/01/2015
This first row is the culprit.
What is wrong with my code?
protected void gvCATW_RowDataBound(object sender, GridViewRowEventArgs e)
{
for (int i = 0; i <= gvCATW.Rows.Count - 1; i++)
{
Label last = (Label)gvCATW.Rows[i].FindControl("lblActualFTE");
if (Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualFTE")) > 1.25M)
{
e.Row.ForeColor = System.Drawing.Color.Red;
}
else if (Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualFTE")) < .75M)
{
e.Row.ForeColor = System.Drawing.Color.Orange;
}
else
{
e.Row.Visible = false;
}
|
|
|
|
|
If you are using a DataTable, you might want to try setting the RowFilter property of the DefaultView.
|
|
|
|
|
Can you Please explain what that means? I'm now getting all of the rows I want but the very first record is not Yellow which is less than .075. All o the remaining rows are correct.
|
|
|
|
|
If that row is not required, then filter it while getting the data from your data source. So you can avoid all these at code level in C#.
|
|
|
|
|
I changed my sql but it now showing the first row which is < .075 as black not yellow. The rest of the rows are correct.
Bair James S 176.0000 1.0000 128.0000 0.7300 04/01/2015
|
|
|
|
|
Norris Chappell wrote: Doe John 176.0000 1.0000 165.0000 0.9400 04/01/2015 Which one's ActualFTE among these, and what's with the Label lst ?
You have just been Sharapova'd.
|
|
|
|
|
Sorry for the delayed reply, I don't check the inbox linked with this account too often. I think you might have resolved this issue already, but -
If the ActualFTE is 0.7300, as you have mentioned in the email, the row should have been highlighted in Orange color? If that's "not" the case, are you sure you still have the else if condition < .75M in place and it's really not < .075 by any chance (from what you have mentioned in your original post)?
Also, can you check what you are getting from Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualFTE")) using immediate window/quick watch and a debug point?
You have just been Sharapova'd.
|
|
|
|
|
protected void gvCATW_RowDataBound(object sender, GridViewRowEventArgs e)
{
for (int i = 0; i <= gvCATW.Rows.Count - 1; i++)
{
if (Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualFTE")) < .75M)
{
e.Row.ForeColor = System.Drawing.Color.Orange;
}
else if (Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualFTE")) > 1.25M)
{
e.Row.ForeColor = System.Drawing.Color.Red;
}
The conditions are working properly. It is the fact that the very first record is not changing to Orange even though it is < .075
|
|
|
|
|
There's no need to loop over all the rows - the RowDataBound event will fire for each row.
Try changing your code to:
protected void gvCATW_RowDataBound(object sender, GridViewRowEventArgs e)
{
decimal actualFTE = Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualFTE"));
if (actualFTE < .75M)
{
e.Row.ForeColor = System.Drawing.Color.Orange;
}
else if (actualFTE > 1.25M)
{
e.Row.ForeColor = System.Drawing.Color.Red;
}
}
If it still doesn't work, check the HTML source to see what's rendered for the first row. You might want to add the ActualFTE to the row as a data- attribute, to make sure the value is what you're expecting:
decimal actualFTE = Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualFTE"));
e.Row.Attributes.Add("data-actual-fte", actualFTE.ToString());
...
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks. That worked. Is now doing what they want.
|
|
|
|
|
I'm working on a WPF/C# app.
Background
First, all my user controls in WPF inherit from a base control:
public interface IControl
{
void Load();
void Cleanup();
}
and
public abstract class _UserControlBase : UserControl, INotifyPropertyChanged, IControl
{
public new abstract bool IsEnabled { get; set; }
public abstract void Load();
public abstract void Cleanup();
public event PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Next, I created a control called ConnectionView which inherits from both _UserControlBase and its own interface:
public interface IConnectionView
{
event EventHandler<ConnectedToDeviceEventArgs> ConnectedToDevice;
}
and
public partial class ConnectionView : _UserControlBase, IConnectionView
{
#region Event Declations
public event EventHandler<ConnectedToDeviceEventArgs> ConnectedToDevice;
#endregion
.
.
.
}
Finally, in my MainWindowView I have a content presenter bound to the property CurrentView and it's loaded like this:
public class MainWindowViewModel : _ViewModelBase
{
private IControl _CurrentView;
public IControl CurrentView
{
get { return _CurrentView; }
set
{
if (_CurrentView != value)
{
_CurrentView = value;
RaisePropertyChanged("CurrentView");
}
}
}
public MainWindowViewModel()
{
loadView(AppMode.Discover);
}
private void loadView(AppMode mode)
{
if (CurrentView != null)
{
CurrentView.Cleanup();
}
switch (mode)
{
case AppMode.Connected:
break;
case AppMode.Discover:
CurrentView = new ConnectionView();
CurrentView.Load();
break;
}
}
}
The Problem
Since the CurrentView is based off _UserControlBase, the ConnectedToDevice event isn't available.
How do I subscribe to the ConnectionView's ConnectedToDevice event in the main window?
If it's not broken, fix it until it is
|
|
|
|
|
If you're subscribing to the event when you create the control, you just need a local variable of the correct type:
case AppMode.Discover:
var view = new ConnectionView();
view.ConnectedToDevice += YourEventHandler;
CurrentView = view;
CurrentView.Load();
break;
If you want to subscribe at some other point, the as operator would work:
var connectionView = CurrentView as IConnectionView;
if (connectionView != null)
{
connectionView.ConnectedToDevice += YourEventHandler;
}
NB: There's a subtle race-condition in your RaisePropertyChanged method. It's possible that the last subscriber could be removed between the not-null check and the invocation. The simplest fix is to copy the delegate to a local variable at the start:
protected void RaisePropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: If you're subscribing to the event when you create the control, you just need a local variable of the correct type:
case AppMode.Discover:
var view = new ConnectionView();
view.ConnectedToDevice += YourEventHandler;
CurrentView = view;
CurrentView.Load();
break;
That did it!
Thanks!
If it's not broken, fix it until it is
|
|
|
|
|
I have a C# ASP Web project where I’m required to produce a 200+ page PDF to eventually download and open on the browser. I have no experience in building a PDF file, and I was wondering if someone could point me in the right direction. I need a component / product / method that would be able to handle such a large report.
Thanks in advance
|
|
|
|
|
I've had fair success with this[^] option.
|
|
|
|
|
Thanks for your response, but can it handle a 200 page report.
|
|
|
|