Search Results

Search found 6502 results on 261 pages for 'dont reinvent the wheel'.

Page 35/261 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • How to build SVN/Git like Diff in WebApp?

    - by 01
    I have XMLs(or Objects) that represents data at some point in a business process. I would like to be able to see what has changed between step1 and step5(two versions of the same XML or Object). Id like to implement this like diff function in version control system. how to do it in web app? P.S. I dont want to just store those files in VCS and than make it do the diff. However if I could somehow emulate VCS without having one that would be cool. P.S. I know there are some JS frameworks that offer diff functionality, but the XML could have 10MB, so I think it should be dont at server side.

    Read the article

  • crc24 from c to python

    - by biiiiiaw
    can someone please translate this code to python? i have tried and tried again, but have not managed it: #define CRC24_INIT 0xB704CEL #define CRC24_POLY 0x1864CFBL typedef long crc24; crc24 crc_octets(unsigned char *octets, size_t len) { crc24 crc = CRC24_INIT; int i; while (len--) { crc ^= (*octets++) << 16; for (i = 0; i < 8; i++) { crc <<= 1; if (crc & 0x1000000) crc ^= CRC24_POLY; } } return crc & 0xFFFFFFL; } i have the rotate left function (ROL24(value,bits_to_rotate_by)), which i know works since i got it from a source code of a reputable programmer, but i dont get the * and ++ on octet. i only sort of understand how ++ works in c++, and i dont know what * is at all

    Read the article

  • Solve code issue - string identity testing

    - by kovibb
    Please for help with shell script. I really dont understand where is problem. Where I write to the Input variable for example /home/Kovi/Deskop/netlist.exe I still get true answer but the extension "exe" is not "scs". I also try "==" but it didnt working. Please some advice. Thank you very much. echo -n "Insert Entire Path (with file name and it's extension) of Input Netlist > " read Input if [ "${Input##*.}"="scs" ]; then echo "Patch verification is succesful.; else echo "Patch verification is failed, script was aborted. File dont exist or is empty or unreadable or is not spectre netlist." error_exit; fi

    Read the article

  • how to create a progress bar using php output buffering and jquery?

    - by avien
    how to create a progress bar using php output buffering and jquery? i been searching this for weeks, i am desperate to learn this, this is a very big help for me, is someone the here share some codes? i know the this will need to script. i have tried sereval code for my client side script: var request = new XMLHttpRequest(); request.addEventListener("progress", updateProgress, false); function updateProgress(e) { var percent = (e.loaded / e.total) * 100; /** update the with of the progress bar **/ } and to my server side, i dont know how. but actually i want to use this for a mysql query so that i can see the progress of my query and another thing is i dont know how to use output buffering. somebody help me on this please.

    Read the article

  • How to remove an element from set using Iterator?

    - by ankit
    I have a scenario that I am iterating over a set using iterator. Now I want to remove 1st element while my iterator is on 2nd element. How can I do it. I dont want to convert this set to list and using listIterator. I dont want to collect all objects to be removed in other set and call remove all sample code. Set<MyObject> mySet = new HashSet<MyObject>(); mySet.add(MyObject1); mySet.add(MyObject2); ... Iterator itr = mySet.iterator(); while(itr.hasNext()) { // Now iterator is at second element and I want to remove first element }

    Read the article

  • Sharing logic across different platforms

    - by Pranz
    Hello all, We have a business logic that works with the file systems on OS that we want to implement on both Linux and Windows platforms. The language we have selected is Python for Linux and C# for Windows. GUI is not a priority for now. We were looking for ways to abstract the business logic in a way that we dont have to repeat the business logic (ofcourse I understand since it is related to file system, some code will differ from platform to platform). Any ideas on how to implement it? Is C/C++ the only option. We dont want to use Java. Thanks, Pranz

    Read the article

  • Why do we need a private constructor?

    - by isthatacode
    if a class has a private constructor then it cant be instantiated. so, if i dont want my class to be instantiated and still use it, then i can make it static. what is the use of a private constructor ? Also its used in singleton class, except that, is there any othe use ? (Note : The reason i am excuding the singleton case above is because I dont understand why do we need a singleton at all ? when there is a static class availble. You may not answer for my this confusion in the question. )

    Read the article

  • Why should i POST data rather then GET?

    - by acidzombie24
    I know you dont want to POST a form with a username and password where anyone could use the history to see or situations where repeat actions may not be desired (refreshing a page = adding an item to a cart may not be desired). So i have an understanding when i may want to use one over the other. But i could always have the server redirect the url after a get to get around the cart problem and maybe most of my forms will work perfectly fine with get. WHY should i use POST over get? I dont understand the benefits of one over the other. I do notice post doesnt add data to the history/url and will warn you about refreshing the page but those are the only two differences i know of. Why as a developer might i want to use one over the other?

    Read the article

  • C# Dispatcher {"The calling thread cannot access this object because a different thread owns it."}

    - by user359446
    Hi, first I need to say that I´m noob with WPF and C#. Application: Create Mandelbrot Image (GUI) My disptacher works perfektly this this case: private void progressBarRefresh(){ while ((con.Progress) < 99) { progressBar1.Dispatcher.Invoke(DispatcherPriority.Send, new Action(delegate { progressBar1.Value = con.Progress; } )); } } I get the Message (Title) when tring to do this with the below code: bmp = BitmapSource.Create(width, height, 96, 96, pf, null, rawImage, stride); this.Dispatcher.Invoke(DispatcherPriority.Send, new Action(delegate { img.Source = bmp; ViewBox.Child = img; //vllt am schluss } )); I will try to explain how my program works. I created a new Thread (because GUI dont response) for the calculation of the pixels and the colors. In this Thread(Mehtod) I´m using the Dispatcher to Refresh my Image in the ViewBox after the calculations are ready. When I´m dont put the calculation in a seperate Thread then I can refresh or build my Image. PS: Sry for my bad english

    Read the article

  • linq .net with dynamically generated controls

    - by Stuart
    This is a very strange problem and i really dont have a clue whats causing it. What is supposed to happen is that a call to the BLL then DAL returns some data via a linq SPROC call. The retunred IMultipleResults object is processed and all results stored in a hashtable. The hashtable is stored in session and then the UI layer uses these results to dynamically generate some gridviews. Easy you would think. But if i run the code i dont get any gridviews. If i take out the call to the BLL and DAL the gridviews appear but with nothing in them? Why is it the page renders correctly when i take out the call to get the data? Thanks.

    Read the article

  • How do i force a file to be deleted? Windows server 2008

    - by acidzombie24
    On my site a user may upload a file (pic, zip, audio, video, whatever). He then may decide to replace it with a newer revision. This user may upload a file, make a post then decide to put up a new revision replacing the old (lets say its a large zip or tar.gz file). Theres a good chance people may be downloading it if he sent out an email or even im for the home user. Problem. I need to replace the file and people may be downloading and it may be some minutes before it is deleted. I dont want my code to stall until i cant delete or check every second to see if its unused (especially bad if another user can start and he takes long creating a cycle). How do i delete the file while users are downloading the file? i dont care if they stop i just care that the file can be replaced and new downloads are the new revision.

    Read the article

  • Using App Engine to update a database in a app

    - by tyczj
    I have been reading about app engine but I still dont know what I can and cant do with it in a android application. Basically what I want to do is be able to create/manage a database in the cloud that the app can pull down and update the local database if needed. Creation and managing would be done outside of the app by me. I dont know much about all of this as I am just getting started with it but I already have an application made, I just want to add this feature to it. I have never written any sort of Web Service calls or anything either but I have used them to get data and such Can this be done? Any tutorials out there to help me out?

    Read the article

  • Robust way to display an image with one fixed dimension

    - by DomingoSL
    Lets say that we have an image uploaded by the user, the upload script limits the mb but not the image size (so could be any proportion, 600X200,200X350, and so...). Im already showing this image in one part on my site using the twitter bootstrap image handler written on css, thats good for a profile picture, the problem is that now I want that image to be a cover (like facebook/twitter cover image), my site is responsive so the width of the cover is 900px or 100% if the screen resolution is less than 900px wide. The height is always fixed to 200px. So I know there is a way to control the correct image display using CSS (maybe with jquery too) but Im not a front-end dev, Im a php dev and I dont want to use server side scripts for doing this. So im looking for suggestions or pieces of codes (css, javascript) to start with, I belive that it have to be an already made solution for this, but I dont find any on google. Thanks for any advice!

    Read the article

  • More swing design & actions

    - by takoi
    Im pretty new to gui programming so i've been reading through every post on this site about swing and design. Whats been answered over and over again is that one should have a class which handles all the action. Like this: (GUI being some JFrame) Now, this works great for one-way actions, like OpenDialog. But the actions for buttons in DialogA and B will have to have access to all the components (there will be many) in its dialog, and the controller. This is where im stuck. The only sane way i can see is to put it in DialogA/B but i would then need to pass the controller all the way down, through classes that dont even need it, and it'll get all spaghetti. Really dont want that. Someone must have encountered this problem before. So where should i put this Action? Or should i just drop the whole design?

    Read the article

  • Need help in c# code

    - by vaibhav
    I have a function protected void bindCurrencies(DropDownList drp) { drp.DataSource = dtCurrencies; drp.DataTextField = "CurrencyName"; drp.DataValueField = "CurrencyID"; drp.DataBind(); drp.Items.Insert(0, new ListItem("Please Select")); } I am binding a dropdown list using this. But sometimes I need to bind a ListBox also. I dont want to write a different function for listbox. How should I do this. I think Generics method is to be used here. But I dont have any idea about generics.

    Read the article

  • .net configurable business error messages

    - by Daniel
    Hi all, I need to implement some kind of solution such that in our business logic layer when certain conditions are met an error message is returned. That error message should be configurable either in a file or table that can be edited at run time if needed. I've seen it done before a few ways and it always ends up something like "This error message is {0}" and then when the dev goes the use the message they dont neccesarily know how many (if any) parameters the message needs. Just hoping to leverage off something that may have already been done, I dont think there is a provider or anything already in the .net framework.

    Read the article

  • Sequence Number in testing Spring application with JUnit (Hibernating, Spring MVC)

    - by MBK
    I am testing DAO in Spring Application. @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:/applicationContext.xml") @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) @Transactional public class CommentDAOImplTest { @Autowired //testing mehods here} The tests are running good. Iam able to add an comment and I also have a defaultRollback property set. So, the added comment will be deleted automatically. happy!..Now the problem is with the sequence number for mcomment. Can I, in any way rollback the seq number? any suggestins on that. I dont want to mess up the sequrnce number. Business requires comment Id to be showed. (I still dont know why). I know in memory db is an option....but I am guessing defaultRollback purpose is to eliminate in memory db testing and mocking. (Just my opinion.)

    Read the article

  • PHP: How to get the days of the week?

    - by fwaokda
    I'm wanting to store items in my database with a DATE value for a certain day. I don't know how to get the current Monday, or Tuesday, etc. from the current week. Here is my current database setup. menuentry id int(10) PK menu_item_id int(10) FK day_of_week date message varchar(255) So I have a class setup that holds all the info then I was going to do something like this... foreach ( $menuEntryArray as $item ) { if ( $item->getDate() == [DONT KNOW WHAT TO PUT HERE] ) { // code to display menu_item information } } So I'm just unsure what to put in "[DONT KNOW WHAT TO PUT HERE]" to compare to see if the date is specified for this week's Monday, or Tuesday, etc. The foreach above runs for each day of the week - so it'll look like this... Monday Item 1 Item 2 Item 3 Tuesday Item 1 Wednesday Item 1 Item 2 ... Thanks!

    Read the article

  • using drupal 6 or 7 for a new PHP web application?

    - by ajsie
    if i create a new web application tomorrow, should i use Drupal 6 or 7? i have never used drupal before so i have to start learning it first (very familiar with PHP) so i can understand the basics and how to extend it. my concerns for using 7: no modules contributed yet? so i dont have all the fancy stuff i can add like in Drupal 6? no good documentation and lack of web tutorials? how could i learn about it if there is not that much support? too early in the development process? it's not stable enough? i would like to use 7 cause i dont want to relearn everything and 7 is indeed just around the corner. but im afraid that it lacks all other stuff version 6 has. could someone guide me into right direction? thanks

    Read the article

  • I want to crop an image, draw a smaller size image without caching the images.... What is the best w

    - by rkbang
    Hello all, I am storing the images in database. I get the NSData and create an image from it. Now I want to crop or draw a smaller image of the existing image in database which I am getting from the querry. I dont want to cache the images since I am using them in bulk and want to release them as soon as the view being displayed where the images are used is popped up. Is there any efficient solution to make sure that images dont consume memory at the background once their use is over... I will appreciate the lines of code for this. Tnx in advance.

    Read the article

  • C++ Regarding cin.ignore()

    - by user1578897
    i would hope someone can modify my code as its so buggy. sometime its work, sometime it dont.. so let me explain more.. Text file data is as below Line3D, [70, -120, -3], [-29, 1, 268] Line3D, [25, -69, -33], [-2, -41, 58] To read the above line.. i use the following char buffer[30]; cout << "Please enter filename: "; cin.ignore(); getline(cin,filename); readFile.open(filename.c_str()); //if successfully open if(readFile.is_open()) { //record counter set to 0 numberOfRecords = 0; while(readFile.good()) { //input stream get line by line readFile.getline(buffer,20,','); if(strstr(buffer,"Point3D")) { Point3D point3d_tmp; readFile>>point3d_tmp; // and so on... Then i did a overload on the ifstream for Line3d ifstream& operator>>(ifstream &input,Line3D &line3d) { int x1,y1,z1,x2,y2,z2; //get x1 input.ignore(2); input>>x1; //get y1 input.ignore(); input>>y1; //get z1 input.ignore(); input>>z1; //get x2 input.ignore(4); input>>x2; //get y2 input.ignore(); input>>y2; //get z2 input.ignore(); input>>z2; input.ignore(2); Point3D pt1(x1,y1,z1); Point3D pt2(x2,y2,z2); line3d.setPt1(pt1); line3d.setPt2(pt2); line3d.setLength(); } But the issue is the record work sometime and sometime it dont.. what i mean is if at this point //i add a cout cout << x1 << y1 << z1; cout << x2 << y2 << z2; //its works! Point3D pt1(x1,y1,z1); Point3D pt2(x2,y2,z2); line3d.setPt1(pt1); line3d.setPt2(pt2); line3d.setLength(); but if i take away the cout it dont work. how do i change my cin.ignore() so the data can be handle properly , consider number range is -999 to 999

    Read the article

  • Front page 2003: how to line up forms vertically

    - by I2008
    Hi. I am trying to creating a form on Frontpage 2003 and right now all my boxes are all over the place, as shown below: Name: [----] Email: [----] I want the boxes to be like this: Name: [----] Email: [----] I have tried using table to line up the boxes but when it come to giving an ID using the 'Lable' on the 'Form' tool bar by highlighting the text box and 'Name', the table get highlighted and wont create an lable. I just want to line up vertically all the boxes and i am new to web design so i dont understand much about HTML or CSS. I dont think Frontpage 2003 has CSS. Can someone tell me how to line up all my boxes. Many thankz

    Read the article

  • Possible conflict with jquery libraries

    - by TooCooL
    http://www.pro-marketing-invest.de/golz-racing/reservierungen I made a wp plugin which makes online reservations for rent a car but I tested it locally with a different wp theme and it worked fine! but when I installed it in this web site for some reason the jquery functions dont work! when I press the fortsetzen button it wont open the other step (its a form with 4 steps). I think it is because of the other jquery functions or libraries that the theme uses, I am frustrated I dont know what is causing this! Any ideas?

    Read the article

  • How to compare 2 pdf files using command line or any tool

    - by Darzen
    I have to compare 2 pdf files and check if they are same or different. I have tried my luck with WinMerge and Beyond compare. however they dont solve my issue. The issue is that there are 2 files which are exactly same except for the time in which they were saved. I have a piece of code that embeds the time of saving into the file. but i am not supposed to do any modifications to the code I have. Hence the above mentioned tools will say that the files dont match and There is just one difference, that is timestamp. Can anyone suggest me a way to handle this. Please. Thanks

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >