|
Use Fiddler (or something likewise) to see if it makes a specific call to fetch the data. You're looking for anything that gets loaded by the page using JavaScript and that returns some XML/JSON.
If that fails, then there's always the WebBrowser control
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I am using this code in ASP.net :
<script type="text/javascript">
function getDataS() {
var dd = '{"jsonrpc":"2.0","method":"getPostList","id":1,"params":[1,[["place2",0,[1,1]]],173099135176724],"hash":"decfe7c9183f16efa1291f5131902f7d4ef4ff14"}';
$.ajax({
type: "POST",
url: "http://tehran.divar.ir/browse/json/?tm=1407824648578",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
crossDomain: true,
data: '{"jsonrpc":"2.0","method":"getPostList","id":1,"params":[1,[["place2",0,[1,1]]],173199866315710],"hash":"13210760e20de99b8218be5cc465851fcb6aa74a"}',
cache: false,
processData: false,
success: function(msg) {
if (msg.d != "")
alert('salam');
},
error: function(xhr, errorType, exception) {
var errorMessage = exception || xhr.statusText;
alert("There was an error creating your contact: " + errorMessage);
}
});
}
</script>
I get this error now :
There was an error creating your contact: NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://tehran.divar.ir/'.
|
|
|
|
|
|
Now I process the data synchronized, when recieving the data it deal data.
But I found the data is high frequently recieved, And it waste too much time to process data.
So, I hope to process data asynchronous and ensure the data sequence, not to block the trecieve thread.
I read some arcitles, I get two methods:
1) when recieving data ,right now use " task.factory.startnew..."
2) when recieving data , "enqueue" the data to ConcurrentQueue, According to different data type, i use 8 queues. And the the program is started,
starting 8 threads to dequeue data for every ConcurrentQueue and process it.
public form1(){
Task.factory.startnew(()=>processData(1));
Task.factory.startnew(()=>processData(2));
Task.factory.startnew(()=>processData(3));
Task.factory.startnew(()=>processData(4));
Task.factory.startnew(()=>processData(5));
Task.factory.startnew(()=>processData(6));
Task.factory.startnew(()=>processData(7));
Task.factory.startnew(()=>processData(8));
}
void OndataReceive( string data){
if( ..){
queue1.Enqueue(data);
}
else if(...)
{
queue2.Enqueue(data);
}
....
retutn;
}
void processData(int queueID){
while(true){
ConcurrentQueue queue = getqueue(queueID)
for(int i =0; i < queue.Count; i++){
string s;
queue.TryDequeue(out s);
.....
}
Thread.Sleep(10);
}.
}
I test the above 2). I found CPU and the memory footprint is large ....
How should I solve this problem ?
Thanks
Andrew
modified 10-Aug-14 9:36am.
|
|
|
|
|
Peng2013 wrote: I found CPU and the memory footprint is large Creating a queue and eight threads doesn't hog my machine.
What code are you executing within that thread? Does it allocate memory? How big is the queue on a typical execution?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi All,
I face a problem when run my windows application at the first time( it is take a long time to load - up to 7 seconds) after that when i close it an open again it may take 2-3 seconds, I do some search and find the ngen.exe is the best solution.
Please let me know if the Ngen.exe the best solution or not, if yes how to use it in VS2010, if no what is the best solution.
Thanks All
|
|
|
|
|
NGen is about your only solution.
Everything else comes down to evaluating how you're written your application. For example, having 500 controls on a form is a really bad idea.
|
|
|
|
|
Hi,
The main form is the login form which contains the following controls:
1. 3 text box for login info as the following:
*. User Name text-box.
*. Domain text-box. (UserName= userLogin@Domain)
*. Password text-box.
2. Login button.
3. User Name Label.
4. Password Label.
5. Version Label.
And this form is take load time when open it in the first time.
Please Let me know how to use the NGEN.exe to solve this issue.
Thank You
|
|
|
|
|
This is normally done in your application installer. After your application is installed, you run NGEN on it to get the binaries built. This is normally an automatic option in modern installation builder tools like InstallShield and InnoSetup.
You're also going to improve performance by evaluating what your application is doing on startup, not just counting controls. What is going on in your Program.cs? What is going on in your Form.Load event? How big is your resulting executable when you compile it? Are you doing any database work? Are you using Entity Framework? There is a "warm-up" time when EF first starts.
Stuff like that...
|
|
|
|
|
ngen does help, I´ve used it in the past. However, make sure that your loadup isn´t taking unnecessarely long.
NGen is not a miracle thing and probably is more a workaround than a real solution.
Not sure if it exists still, but in winforms you could have a look at SuspendLayout, ResumeLayout.
Also, in our case a while back, the slow loading was due to thousands and thousands of records that had to be loaded in linked lists. When I convinced the client to change in a small way, the way they were working we could load each list on runtime when (and indeed if) the user needed it. The startup time changed from a few seconds to instantly.
Last thing is that you have to make sure the hardware is sufficient for that version of the .Net framework (and what the application is used for)
hope this helps.
|
|
|
|
|
Hi, this is sadish6 I want the algorithm for Multi-label Classifiers based Associative Classification (MCAC) in C# or VB.NET can any one please help me by providing the code
this link can be useful (https://www.dora.dmu.ac.uk/bitstream/handle/2086/10120/Neda-Thesis-FinalVersion.pdf?sequence=1)
someone with code please help me
Regards,
Sathish.
|
|
|
|
|
Oops you did not read the guidelines for these forums did you. We are not about supplying you code but helping YOU to code or learn to code.
You might try some of the various rent a coder sites they are into supplying code, for a price!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It doesn't quite work like that.
We do not do your work for you.
If you want someone to write your code, you have to pay - I suggest you go to VWorker.com and ask there.
But be aware: you get what you pay for. Pay peanuts, get monkeys.
You looking for sympathy?
You'll find it in the dictionary, between sympathomimetic and sympatric
(Page 1788, if it helps)
|
|
|
|
|
Greetings,
I currently worke on Programm working with the DevComponents.DotNetBar.DockingContainers, those Containers have a lot of functionality. My Problem is now, since i'm working with them as dynamic objects, e.g. a new usercontrol Needs to be shown -> Check if a DockingContainer is empty -> if not create one and put the uc in the new Container, i get several issues that i'm not able to solve.
1. The DockingContainers get deleted from time to time, e.g. uc is not needed anymore -> dispose it and delete the Container.
In this case my dockSite gets shrunk by the amount the Container was.
I have a "Workaround" for that but ist not satisfying as the other Containers are flashing while i resize.
Code for delete given:
/// <summary>
/// Deletes the container.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
/// <exception cref="System.NotImplementedException">Something went terribly wrong</exception>
private void DeleteContainer(object sender, EventArgs e)
{
DockContainerItem _tmp = (DockContainerItem)_currentClickedBar.Items[0];
PanelDockContainer _tmpPanel = (PanelDockContainer)_tmp.Control;
if (_tmpPanel.Controls.Count != 0)
{
...
}
else
{
_dockingPanels.Remove(_dockingPanels.Find(dp => dp.Name == _tmpPanel.Name));
_dockingContainers.Remove(_dockingContainers.Find(dc => dc.Name == _tmp.Name));
_barContainer.Remove(_barContainer.Find(bc => bc.Name == _currentClickedBar.Name));
DockSite _ds = (DockSite)_currentClickedBar.DockedSite;
int _width = _currentClickedBar.Size.Width;
int _height = _currentClickedBar.Size.Height;
dotNetBarManager1.Bars.Remove(_currentClickedBar);
_ds.Size = new System.Drawing.Size(_ds.Size.Width + _width, _ds.Size.Height + _height);
_currentClickedBar = null;
}
}
*EDIT*
2. Another Problem i have is that if i undock a Container, dock it into another one everything gets pretty messed up as i can't undock it out of the Container again and the old one stays inoperable for some reason.
It wasn't inoperable, i just messed up the Text property of the DockingContainerItem, therefore i couldn't see it in the "Tabs"
/SOLVED/
*EDIT OFF*
Here the other code for my Containers:
Creation:
/// <summary>
/// Creates the named docking container.
/// </summary>
/// <param name="NameContainer">The name container.</param>
/// <param name="NameBar">The name bar.</param>
/// <param name="NamePanel">The name panel.</param>
public void CreateNamedDockingContainer(string NameContainer, string NameBar, string NamePanel)
{
Bar newBar = new Bar("neuer Container");
newBar.Name = NameBar;
newBar.LayoutType = eLayoutType.DockContainer;
newBar.GrabHandleStyle = eGrabHandleStyle.Caption;
newBar.Stretch = true;
newBar.CanCustomize = false;
newBar.CanAutoHide = false;
newBar.MouseClick += bar_Click;
newBar.BarUndock += barContainer_BarUndock;
_barContainer.Add(newBar);
DockContainerItem tempDock = new DockContainerItem();
tempDock.Name = NameContainer;
_dockingContainers.Add(tempDock);
PanelDockContainer tempPanel = new PanelDockContainer();
tempPanel.Name = NamePanel;
_dockingPanels.Add(tempPanel);
tempPanel.MouseClick += panelDockContainer_Click;
tempDock.Control = new Control();
tempDock.Control = tempPanel;
newBar.Items.Add(tempDock);
dotNetBarManager1.Bars.Add(newBar);
dotNetBarManager1.LeftDockSite.GetDocumentUIManager().Dock(newBar);
}
Any help or experience with those DockingContainers would be appretiated
C# / VS2013
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
There's little response here, it seems. Try the DevExpress forum. It's a paid product with support.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
After you assign the DataSource to the Report, I want to assign to the label, textbox, xrTableCell1,... Report should I do? or I want to DataBinding, currently running it does not appear at all records
XtraReport1 report = new XtraReport1(); string sql = "select * from Customers";
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(sql, cnn);
da.Fill(ds);
report.DataSource = ds;
report.DataAdapter = da;
report.DataMember = Customers;
report.ShowPreview();
|
|
|
|
|
What is Managed and Unmanaged code...???
|
|
|
|
|
|
If you Google "What is Managed and Unmanaged code" you get about half a million results - the first four look immediately helpful.
If you are having a specific problem understanding what you have found so far - can you ask about that? At the moment it looks like you want a packaged answer without having done any basic research.
Alberto Brandolini: The amount of energy necessary to refute bullshit is an order of magnitude bigger than to produce it.
|
|
|
|
|
In the one case, it is where your boss tells you what to code.
In the other, it is when you go off on your own.
|
|
|
|
|
Hi,
I am developing a C# Windows Application which will run with MySQL backend. I want to have a server application running on the server to do few server tasks. It will be great if my server application will also check the license for me which means it should be running all the time as service or actually running on system tray.
But how can I make sure the application is always running and if not then user won't be able to connect to the server? so the client will do the check for example? or any other idea!
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
Where is your problem?
The client application contacts your LicenseServer during its start. Windows Service is a good choice for that server application; there are options for re-starting a windows service if it happened to crash. If the client does not get a connection to the server, or the server does not issue a license to it, have it showing an error message and quit. You may also set a timer (on the client) to check for the license every few minutes and stop it if no license can be retrieved.
For client-server communication, there are several options like WCF or .Net Remoting.
|
|
|
|
|
I am about to do a Project in C#.
The project was already developed with Two different form in same EXE (say Verification.EXE)
I nee to split these two forms into two different EXE.
Both these forms shares a lot including References and datasets.
If I split these forms into two different EXE will there be delay in time than the previous one without splitting
KALYANA KUMAR P
|
|
|
|
|
What "time" are you talking about? Be specific.
If you are saying that time to execute the application will be longer after splitting, then when you create two exe's your application will be two, and will be launched separately ? isn't it?
And time will hardly matter in this case.
Thanks
Do not forget to comment and rate the article if it helped you by any means.
|
|
|
|
|
KUMAR619 wrote: Both these forms shares a lot including References and datasets. Put the shared code into libraries (in Visual Studio: projects) which will be shared by your two executables (in Visual Studio: solutions).
|
|
|
|