|
Karthika85 wrote: But its not working.
What isn't working? I cannot guess what the problem is.
|
|
|
|
|
Hi All
I am creating database and then get database name and properties.Like this
QueryResultsPtr Qry;
DatabasesPtr spDatabases;
_SQLServer2Ptr spSQLServer;
Qry=spSQLServer->ExecuteWithResults((_bstr_t)"Create databse Testing",(LONG)"Create databse Testing".GetLength());
spDatabases = spSQLServer->Databases;
spDatabases->Refresh();
It's working fine.
But it's take too much time when cursor goes here
spDatabases = spSQLServer->Databases;
spDatabases->Refresh();
Can i save some time?If any suggestion plz give me.
Thanks in advance
|
|
|
|
|
I'm a biochemist who needs to get some minimal bioinformatics done. I need a way to access data at a URL and do some simple manipulations. The program doesn’t need to be robust, it just needs to work. I'm looking for an easy way to access the info, copy it into a file, and move the next page.
I'm having a very hard time figuring out where to start here. I have very minimal coding experience. Any help is greatly appreciated.
|
|
|
|
|
solinb wrote: I need a way to access data at a URL and do some simple manipulations
You need to find a library that can request to a URL and return the response. POCO[^] has got a network library which can be used here.
Best wishes,
Navaneeth
|
|
|
|
|
why dont you look at 'curl' http://curl.haxx.se/[^]
- comes in a command line, windows version - you can 'get' pages/data etc, if you needed more I'm sure you could wrap scripting around it to for example dump pages/files to disk and parse them - or use the curl-library and drive it from a program
'g'
|
|
|
|
|
solinb wrote: I need a way to access data at a URL...
Can you elaborate? Are you wanting to download a file given its URL?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
The site I need to access has a table of proteins featuring links to their sequence data. I need to be able to go from protein to protein, into the pages with their sequence data, get the data, and move to the next to one. I need to save all of this in a way that keeps the two in order.
The later end of that I can handle, even with my very basic skill set, I am used to manipulating data from text files. I'm just trying to figure out how to access the data.
Thanks to every for your help above, but I really do need help getting properly oriented. Every resource I find explains how to do this in terms of other things I don't understand. I'd really like to learn, but I need to know where to start.
again, i'm not looking for anything particularly robust, it just has to work.
|
|
|
|
|
solinb wrote: The site I need to access has a table of proteins featuring links to their sequence data. I need to be able to go from protein to protein, into the pages with their sequence data, get the data, and move to the next to one.
But are you wanting to download a file given its URL?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
http://www.ncbi.nlm.nih.gov/sites/entrez?Db=genome&Cmd=Retrieve&dopt=Protein+Table&list_uids=23523
Thats the page which lists all the genes I'm interested in.
from that I need to write a program that goes from each entry linked under the 'accession' column. For instance, for this homoserine kinase:
http://www.ncbi.nlm.nih.gov/protein/218698422
from that, I need the sequence of text under 'ORIGIN'
after that, I need it to loop through and check out all the others. I haven't worked out yet if i want it to kick all sequences it picks up indexed somewhere, or just perform the analysis I need, store that, and move on to the next one. I could write either, but it's a moot point if I can't get the data initially.
It doesn't seem like it should be to hard to do, but I need a push in the right direction.
|
|
|
|
|
Do you have direct access to the genome database? If not, the only solution I can think of would be to parse the obj_table23523 table that is being returned in the HTML.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I don't know how to get said HTML returned. Which is where the hang up is.
|
|
|
|
|
for the record, i'm now going with python because i was able to write a program to get the data i needed in about 3 lines.
|
|
|
|
|
|
Hello,
I want to hide textbox/label at run time, Could you please let me know what's the 2nd parameter to pass to below WIN API function,
SendMessage(hComponentName, ?, 0, 0);
Best Regards,
Supriya
|
|
|
|
|
How about WM_SHOWWINDOW ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
WM_SHOWWINDOW[^] only notifies the given window that it is about to be hidden or shown, it doesn't actually hide or show the window.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
I realized that right after I responded but got distracted with something else before fixing it. Thanks.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I don't think you can do that with SendMessage (except for maybe doing it indirectly if you show and hide the given window in the message handler), you should use ShowWIndow[^] for this.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
modified on Tuesday, December 1, 2009 2:45 PM
|
|
|
|
|
Thank you very much for suggestion!
I tried below and it worked for me
hComponentName = GetDlgItem(hDlg,IDC_STATIC3);
SendMessage(hComponentName, SW_HIDE, 1, 0);
Thanks again.
Best Regards,
Supriya.
|
|
|
|
|
You can send SW_HIDE to a window to make it hidden? That's completely new to me, i learn something every day, thanks.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Code-o-mat wrote: You can send SW_HIDE to a window to make it hidden?
Only if that window processes the WM messages and responds accordingly. Most standard window types in a dialog will do this.
|
|
|
|
|
ok
Best Regards,
Supriya Tonape
|
|
|
|
|
I have an ancient program that creates logs named using the time when they are created.
I need to delete the oldest files in the folder, only keeping the most recent 20, during runtime.
Is there any way to do this in C?
I can use Remove(filename), but then I have to go through each filename and compare dates. Seems like a hassle. Is there any function that returns the date of a file for comparison?
Thanks.
|
|
|
|
|
ChemmieBro wrote: Is there any way to do this in C?
Yes.
ChemmieBro wrote: Is there any function that returns the date of a file for comparison?
How about GetFileTime() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Your program has to check all the log files to find which 20 files are the latest. Then the program can delete all the old ones.
The program can get file times using CFileFind::GetLastWriteTime() (if you are using MFC). You said the filenames contain the time also. In that case you can also parse the filenames to get the times.
You can load the file times (together with the pathnames) into an array and sort them to find out the files that should be deleted. Sorting can be done easily by STL utilities.
Seems to be a hassle, but it's done by your program. The only hassle to you will be to write this program, just once. By using MFC and STL to implement this, it's not a big deal at all.
Good luck!
|
|
|
|