Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Alex H 1983

@Alex H 1983
About
Posts
78
Topics
50
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Storing an array in a string or ...?
    A Alex H 1983

    I have a product table with 100000 products and also I have a user table with 5000 records. and suppose a user can give us feedback about any combination of this products. So suppose he chooses to compare products 1,3,100,200,400,500 and so on. (he can send us another feedback about some other products) So here is my question, I just want to know what an expert database designer would think about this situation where the number of products and users are big. One way to store this ratings are in a single string like: 1#5 3#4 100#5 .... x#y means that he gave y stars to product with id of x. I can load this vote_string in my php script for example and extract the details of it. So the rating table would likely have this structure: id, user_id, vote_string Another way is to store this feedback in this structure: vote Table: id, user_id, date vote_details Table: vote_id, product_id, vote ==> (vote_id,products_id) as primary key and vote_id is foreign key. (or may these 2 tables can be compressed in a single table like id,user_id,product_id,vote [id,user_id,product_id] as primary key) So i guess it's very easier to query in the second design but it consumes more space and time for each query, also in case of product deletion it's quite better to use the second design. What would you do? Any kind of idea is appreciated.

    Database database question php design data-structures

  • HttpWebRequest question
    A Alex H 1983

    Hello, I want to use HttpWebRequest to login and change some settings on a website. In order to do that i need to change the URL addresse of the currenct HttpWebRequest (Login Page) to another web page (Setting Page). I googled this matter and i found out that the RequestUri and HttpWebRequest.Headers["host"] are both readonly. So here is my question: 1. How can i change the url address of the HttpWebRequest object after creating the object. For Example:

    WebRequestObject = (HttpWebRequest)HttpWebRequest.Create("http://www.yahoo.com");
    WebRequestObject.RequestUri = "http://www.google.com";

    2. Is there an alternative class in c# for better http functionality? Any kind of help would be appreciated.

    C# question csharp com help tutorial

  • Removing duplicates from large text files (Performance needed)
    A Alex H 1983

    Thank you for your solution. I like the idea of 256 file and checksum. I will try it now.

    C# performance question database csharp mysql

  • Removing duplicates from large text files (Performance needed)
    A Alex H 1983

    1. Theres no need to preserve the order of urls, but if you want to sort the urls and then remove the adjacent identical records it's not doable here because i want to remove urls with same domain names also. here is the sample of urls list: http://iri.siam108site.com/dssff/ http://ieggfiv.300mb.info/12hf8485n/ http://forum.nto.pl/chlopcy-z-biskupic-mieli-sie-bic-tymczasem-jeden-zginal-t19232.html http://www.osiol.com.pl/uwaga-tvn-2007-2008-tvrip-t26379.html http://fdss.300mb.info/12hf8485n/ http://perpetuum-lab.com.hr/forum/showtag-physiology.html http://hrbikwi.siam108site.com/1i0gejcj9j6 So http://fdss.300mb.info/12hf8485n/ and http://hrbikwi.siam108site.com/1i0gejcj9j6 should be removed from the list. 2. A web crawler will crawl urls to grab page contents 4. I wrote a program that is grabbing these urls from search engines and then it writes the urls into at the end of a text file (Without any kind of processing and checking on data) Sorry for the late response it was 5 am when i asked the question :p

    modified on Thursday, April 30, 2009 4:34 AM

    C# performance question database csharp mysql

  • Removing duplicates from large text files (Performance needed)
    A Alex H 1983

    Dear all, I need a way to read a 500MB large TEXT file containing a url on each line and remove duplicates and then write data back on the text file. I know it sounds simple but here i need my algorithm to be as fast as possible. I don't want to design a special data structure for this purpose i just want to use C# pure language to do this. Here i have some question in mind that i never found a good answer before: 1.When you use

    string s = File.ReadAllText(filename);

    the exception 'out of memory' will thrown (Because the amount of data is too big). So we should read the file line by line. dose reading line by line affect the speed? isn't it better to read the whole file and then do the processing? 2.What is the fastest data structure in c# to access data on it. i mean between hashtable list String[] array... 3.Because it's the matter of speed, should i think of writing data back to a database after reading from file? is it faster than writing directly back to file? (like inserting data into MySQL server with an index on my url field with UNIQUE type, so by inserting the data it will take care of duplicates) I know my question is a bit big.. ;) but if you have any idea in any part i will be glad to know your precious opinions. Thank you.

    C# performance question database csharp mysql

  • Back Propagation
    A Alex H 1983

    Hello every one ! Does back propagation algorithms works with values that are not between 0 and 1, or do I have to normalize them to implement them ? Thank you.

    C / C++ / MFC question

  • Neural Network Function Estimation
    A Alex H 1983

    Hello every one, I have one question regarding neural networks and it's functionality. I'm newbie in this field. Actually i want to use a supervised neural network to estimate a function values at different locations. Suppose we want to estimate y = x^2 and we have some training data to learn the network x=1 => y=1 x=2 => y=4 x=3 => y=9 x=4 => y=16 x=5 => y=25 Now suppose we want to estimate function value at x = 10 At first it seems that Back propagation is the best network for this purpose but after i tried some source code from CodeProject i found out that Back Propagation can only estimate function values that are around the training set!(Tell me if I'm wrong!) so for example it can estimate function at x=4.5 but it cannot estimate function at x=10 (i think it will return 25) So which type of Neural Network should i use for this purpose? Any ideas?

    C / C++ / MFC question sysadmin tutorial

  • Internet Explorer Socket Programming? [modified]
    A Alex H 1983

    Hi all, I've written a c++ program that will grab images from camera and will analyze them. it's a kind of some image processing software. but here i want my network users see the result too. one solution is c++ socket programming, I mean i can write a program in c++ that will connect to my image processing server and will get images on the network. My question is, is it possible for the users to see the results on the internet explorer and not with an additional c++ software? May be a flash module or something that will read stream from server. Any suggestion?

    modified on Thursday, August 14, 2008 1:18 AM

    C / C++ / MFC sysadmin question c++ adobe

  • Access Vector Objects by ID
    A Alex H 1983

    Hi, I just want to know if it's possible to access a vector object by it's unique id. In vector objects don't have id's you can just access them by their locations! for example:

    std::vector<myobject> objs;
    objs.at(1).my_property = 'qwerty';

    here 1 is the location of the object in that vector and it's not unique.. it can change if you delete or add a object on top of this object. but i want to give them a unique id and access them by that. Any suggestions?

    C / C++ / MFC graphics tutorial question

  • Access Vector Objects by ID
    A Alex H 1983

    Hi, I just want to know if it's possible to access a vector object by it's unique id. In vector objects don't have id's you can just access them by their locations! for example:

    std::vector<myobject> objs;
    objs.at(1).my_property = 'qwerty';

    here 1 is the location of the object in that vector and it's not unique.. it can change if you delete or add a object on top of this object. but i want to give them a unique id and access them by that. Any suggestions?

    ATL / WTL / STL graphics tutorial question

  • Efficient Object Management
    A Alex H 1983

    thanks for your help :)

    C / C++ / MFC question career

  • Efficient Object Management
    A Alex H 1983

    I need an Efficient Object Management Class to add, remove, get and set (Manage Actually) objects of my own class. I read somewhere that std::list will do this job but i did not find the function for removing objects or get or set properties of existing objects. Any suggestions?

    C / C++ / MFC question career

  • Save an HtmlElement Image to a file
    A Alex H 1983

    I am searching for a way to save a HtmlElement to a file. private void webBrowser1_DocumentCompleted(Object sender, WebBrowserDocumentCompletedEventArgs e) { HtmlElement he = webBrowser1.Document.Images[0]; } Hint: the webBrowser1 itself has a function called DrawToBitmap that can be used to grab a thumbnail from a webpage. Bitmap docImage = new Bitmap(600, 800); webBrowser1.DrawToBitmap(docImage, new Rectangle(webBrowser1.Location.X, webBrowser1.Location.Y, webBrowser1.Width, webBrowser1.Height)); But i'm not sure how to do this with an image element inside my webpage.

    C# graphics algorithms tutorial

  • WINDOWS Directory
    A Alex H 1983

    wow very nice explanation thank you very helpful

    C / C++ / MFC help tutorial

  • Loading a DLL and HEAP problem
    A Alex H 1983

    Sorry there is no GetYahooString , it is GetString !

    C / C++ / MFC help tutorial question

  • Loading a DLL and HEAP problem
    A Alex H 1983

    hi iam using the code below in my project! but when i Exit the program the Debuger goes to dbgheap.h and says Access Violation error, and if i remove this line of code : GetString(username, password, string); this error will not occure and the program will exit succesfully! i have also Free the Library by calling FreeLibrary(hLib); Any Suggestion how to get rid of this ? Thanx in advance

    typedef bool (WINAPI * cfunc)(const char * username,const char * Password, char * result_6);
    
    HINSTANCE hLib=LoadLibrary("crypt_string.dll");
    
    cfunc GetString;
    GetString=(cfunc)GetProcAddress(hLib, "Get_String");
    
    CString username = "Myuser" ,  password= "Mypass" , string = "";
    GetString(username, password, string);
    
    bool lo=FreeLibrary(hLib);
    
    C / C++ / MFC help tutorial question

  • Winsock Programming problem!
    A Alex H 1983

    hi guys i am new in winsock programming, in my code iam trying to login into the MSN server! for this iam using MS Winsock ActiveX Control! but this Component is not compatible with Visual C++.net, So i am searching for an article Describing how to Use a Winsock Socket to Connect to a server! and reciveing data from server (Like DataArraival event in MSWinSock ActiveX) and Send Data to Server! Just Like winsock activex. i've found Begenning Winsock Programming - Simple TCP Client by Nishant but i dosen't help me out! thanks in Advance :)

    C / C++ / MFC c++ help csharp com sysadmin

  • NULL Char in a String ??
    A Alex H 1983

    hi i am using MSWinSock Activex in my project to Create a Simple TCP connection through a server. for this purpose i have to Send an Message to that Server. My message should Contain Some NULL char char(0) in it. for example my message should be something like this : HI***This is Ehsan******Accept my request (here * means char(0) or NULL char ) MSWinSock Uses this Syntax to send a Message : void CMSWinsockControl::SendData(const VARIANT& data) this means that i have to Save my message in a VARIANT type variable and then Send it with this function. in VARIANT i can use BSTR to store my message in VARIANT but as u know Char(0) means the end of a String So i need to Store my message in a Different way in VARIANT variable. one way is to store a Char[] (an array of char) in a Variant !! is it Possible ?? Thankx a lot

    C / C++ / MFC com sysadmin data-structures tutorial question

  • Secure Connection between Mysql Server and C++ Client
    A Alex H 1983

    hi i am trying to make a Client in VC++ for connecting to a Mysql Server the problem is the connection is not Secure, if someone analyzes the network traffic when i using the Client he can Findout for example my username and password coz they are sent to server in plain text !!! is there any way for me to make my connection Secure and Encrypted ? thanx

    C / C++ / MFC sysadmin c++ mysql help tutorial

  • programatically click a button on a HTML?
    A Alex H 1983

    no no i said in C++, the way your link expalins is in VBScript! :(

    C / C++ / MFC question c++ html architecture
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups