|
Pants. And I actually looked for it, which is a worry. It's been missing since day one. Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
Hi,
IMO you should turn a row of data into an instance of a user-defined class, then use a generic List of that type.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Hi all,
How can i add a TextBox on a form every time a row in a grid is added.The Gridview refreshes every two minutes for additional row and would like to have a text box next to the Row in a grid to leave a note about the data being added. So for each entry on a grid i would like to have a text box automatically created next to the new row on a gridview.So that i can leave some comments about the data being added on the grid.
Here is the Gridview :
<asp:GridView ID="gvResult" runat="server" AllowPaging="True" CellPadding="4"
Height="16px" Width="45px" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1">
<EmptyDataTemplate>
<asp:Label runat="server">
NO Message List...
</asp:Label>
</EmptyDataTemplate>
<Columns>
<asp:BoundField DataField="CR_CLI" HeaderText="CR_CLI"
SortExpression="CR_CLI" />
How Can I add a text Box that is Just Blank after each Row on a Grid
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:vp2ConnectionString %>"
SelectCommand="SELECT TOP (10) CR_CLI FROM Call WHERE (CR_CLI LIKE '7%') ORDER BY CR_CLI DESC">
</asp:SqlDataSource>
|
|
|
|
|
Post this question in the asp.net forum..45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
|
please help me with sample code for simulating keypress by SendInput. suppose i will pass key press key code like
a,c,num1,function key or key code combination when user press alt+x to another apps by socket communication. then another
apps will press those key. i came to know that sendinput should be use to simulate keypress. so please give me a easy
sample code by which i can implement my logic
thankstbhattacharjee
|
|
|
|
|
Hi,
I've implemented a very simple cache in a winforms-application using a static Colletion of objects. This collection, of course, is initialized at its first use. As the cache does not need to get updated through the whole application lifetime, that's all I need.
My question now is: How to share this static collection through multiple instances of my application? I don't need an extra cache for each instance..
Thanks in adavance.
|
|
|
|
|
Unless your cache is huge or you will be running many instances of your app, I suggest you just load the cache in each process.
If you do need to share your cache, you will have to implement some sort of inter-process communication, which will get messy.
Nick----------------------------------
Be excellent to each other
|
|
|
|
|
I don't think you can, at least not without negating the benfits of the cache. Each instance of the app has its own AppDomain, which has its own allocated memory. (You could achieve this in c++ for example). You 'd need to get a copy of the cache from one application via some sort of RPC or similar, but this would probably be slower than just getting the data again. Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
Thanks for your answers.
What about moving the static collection (cache) to a small library-dll which is referenced from my application. this way, the library-dll would get loaded only one, wouldn't?
|
|
|
|
|
No, the library would load into the AppDomain of each calling application.
This compartmentalisation is so that C# apps can't interfe whith eachother's memory spaces, producing "unexpected" results (e.g. mutex problems, datachanges etc). Objects must be marshalled across app domains, which is a heavy duty task.Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
Why do you want to share the cache between multiple instances? The reason I ask is because there may be another way to achieve the required end result (whatever that may be).
As pointed out by others, you might want to share this cache if it is very large and takes up a lot of memory, or if it takes a particularly long time to load up, or if it is changing and needs to be synchronised across all the instances using it.
Otherwise, I suspect that the pain of sharing this cache is going to outweight the benefits. If you decide really do need a shared or distributed cache, it might be worth investigating the caching support in the Enterprise Library Framework, or Spring.NET or similar, to see if they meet your needs.
|
|
|
|
|
My goal is to reduce the application's time of initialisation. Today, every instance creates its own cache, which takes about 30-60 seconds (depending on database's resources). I thought about reducing the time of initialisations to < 5s (for all except the first application's start).
|
|
|
|
|
Obvious, but worth asking:
Have you considered lazy-loading the cache? i.e. only load the info absolutely requied at start up, then loading the rest when they are is accessed for the first time?Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
Yep, lazy-loading was implemented in former version of the application but didn't satisfy the users due to slow runtime performane.
|
|
|
|
|
The hit should only be on the first call per cached element, so I'm surprised at this.
Is it possible to explicitly lazy-load elemtents in the background while the system is idle?Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
Would be possible, but the application is quite useless until the cache is ready. Nevertheless, I'll invest some more thoughts in this approach. There are 5 flat tables, which each are loaded in a collection. Maybe I should try to parallelise these 5 requests.
PS: the cache is used for filter criterions (and the application's main feature is searching/filtering data)
|
|
|
|
|
Well, one option is to use a memory mapped file to get shared access to the data. There is an article here about it:
DevGlobalCache – A way to Cache and Share data between processes[^]
That's C++ but you may be able to rework it to C# depending on how confident you feel about that sort of thing.
Alternatively, you could have one central "cache manager" that loads the cache into memory on system start-up, then the other processes link to it using named pipes or something to load the cache into their local memory when they initialise (or lazy-load the cache as they need it).
Or, you could load the cache once, then serialise it out to disk in an easy to read format that can be loaded back when needed. Depending on what is involved in loading the cache, reading a serialised stream in from local disk might be quicker than re-initialising the cache from the ground up each time.
The problem with these solutions is keeping the cache synchronised across all instances, but from what you say that doesn't sound like it's going to be a problem for you.
|
|
|
|
|
Hi, Im developing Tabcontrol in WPF with C#.In coding i entering text to Listbox(3rd tabitem),when i click any place in tabcontrol.But th text is not gwtting displayed.
But when i debug i got that,for every click in tabcontrol,the Count in listbox get increased to 1,2,...
Code:
namespace Tabcontrol
{
public partial class PresetTab : UserControl
{
public PresetTab()
{
InitializeComponent();
}
public void AddPresetmenu(string pMenu)
{
menubox.Items.Add(pMenu);
}
}
}
namespace Tabcontrol
{
public partial class ToolBar : UserControl
{
PresetTab tab = new PresetTab();
public ToolBar()
{
InitializeComponent();
}
public void Click(object sender, MouseButtonEventArgs e)
{
tab.AddPresetmenu(menu);
}
}
} Anu
|
|
|
|
|
Hi,
I am trying to develop an application in C# to build a chat client that authenticates a user with his gmail account.. As I searched online for any open source software that might help and i found this very promising :
Google Chat Desktop Application using Jabber.Net[^]
If I execute this from a stand alone computer, it works fine without any problems... However, if I execute this from a corporate environment where there are NAT and firewall being configured, i get this error :
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.155.125:5222
where 74.125.155.125 is that of google.
I am not sure what this means... It doesn't appear like a time out.. It looks like something in the corporate environment is blocking this communication... However, I am able to use Google Talk application in the same environment...
What could be the reason? And how could it be overcome? Could someone pls help?
Thanks,
Ram
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:45am.
|
|
|
|
|
Hi stancrm,
Thanks for your reply... I shall try this out and get back to you...
Thanks,
Ram
|
|
|
|
|
Hi stancrm,
Just an update on this... I tried to use wirebook to get the stats and I found this out :
The request is going out and reaching google... But the response is not coming back.. That seems to be the problem...
Any idea?
Thanks,
Ram
|
|
|
|
|
Since you said that you have a corporate firewall in the way, I would suspect that this is blocking the responses. If you have a legitimate business reason to access Google Talk, then I suggest you contact your IT department, who may allow such traffic through for you. Otherwise, you are out of luck, probably. You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
|
|
|
|
|
Hi OriginalGriff,
OriginalGriff wrote: If you have a legitimate business reason to access Google Talk, then I suggest you contact your IT department
I had mentioned in my first post that I am able to connect using Google Talk and initiate a chat... The problem is while trying to replicate that behavior in my application...
If firewall is blocking the response, I would like to have an idea on how Google Talk is able to establish a communication that my application could not...
Pls suggest...
Thanks,
Ram
|
|
|
|
|