Search Results

Search found 27766 results on 1111 pages for 'bad idea jeans'.

Page 132/1111 | < Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >

  • How would I write a virtual CD/DVD burner that would allow programs that burn to write to ISO?

    - by Ryan
    I want to write an app that will allow a program like iTunes which normally will recognize a DVD/CD burner to recognize a virtual one and then write to it creating an ISO. I would guess to use C/C++... can someone point me in the right direction as to how this can be done? Basically it would be a virtual CD/DVD burner that would output an ISO file to the hard drive. I want to do this for both the usefulness of it as well as the challenge, just need an idea of how to approach it, have no idea how to write virtual hardware.

    Read the article

  • What are the differences between MVP, Presentation Model, MVVM and MVC?

    - by Nicholas
    I have a pretty good idea how each of these patterns work some of the minor differences between them, but are they really all that different from each other? It seems to me that the Presenter, Presentation Model, ViewModel and Controller are essentially the same concept. Why couldn't I classify all of these concepts as controllers? I feel like it might simplify the entire idea a great deal. Can anyone give a clear description of their differences? I want to clarify that I do understand how the patterns work, and have implemented most of them in one technology or another. What I am really looking for is someone's experience with one of these patterns, and why they would not consider their ViewModel a controller for instance.

    Read the article

  • Set The Progress Bar Over 100% C#

    - by PhaDaPhunk
    its my first time using a ProgressBar in c#. The idea is to use the ProgressBar as an health bar in a simple game. The thing is I think the bar's maximum value is 100% but i would like to give it a higher value like let's say 1000% or, not sure if it's possible, give the bar an integer value instead of a percentage. progressBar1.Increment(100); This is where I initialize the health to 100points. Even if I use this syntax: progressBar1.Increment(1000); And I subtract : progressBar1.Increment(-25); The player is loosing 1/4 of is life as if he only had 100 Health Points. Any idea how I could change the maximum Bar value? Thanks in advance.

    Read the article

  • How can I allow only privledged users to download a pdf with php?

    - by ThinkingInBits
    Lets say I have some pdf files stored on my server and I only want to allow a person who's paid have access to download a particular pdf. So for an example, let's say I have a bunch of e-books. The only way a user would be able to download e-book A is if his account contains the right credentials for that particular book. What's the best way to accomplish this? Any ideas/advice on how to improve my idea are greatly appreciated! My current idea: A user places an order Upon success, a new folder would be created by their /account_num/order_id/ A copy of the particular file would be stored in this directory Have php generate an .htaccess that would only allow access from a url that contains a random hash embedded into it. The only way a user would be able to access this random hashed page is if they are signed in as the right user, and the hash matches up with the hash stored in the database, otherwise they are redirected to home page.

    Read the article

  • starting a service based on someone's GPL/MIT licensed code

    - by fooyee
    someone wrote a nice framework for developing html5 3d engine. It's GPL/MIT licensed. Do you think it's a good idea to build upon it, and then repackage it and sell it as a service? For eg the framework lets you build 3d environments. so I build on it, maybe add a few features like characters and music in the environment, and turn it into an online game. Is it a feasible idea? Of course, part of the GPL license says that all source code has to be visible to end users. Assuming the web is a winner take all market based on first mover advantage, why care about hiding the source code? It's the product that's being sold that counts.

    Read the article

  • How to get a 3D picture in an iphone app?

    - by wolverine
    In an application, i saw that they used to display pictures of vehicles. But what was amazing was when we touch and swipe in that picture, it rotates in 3d way left and right. And from the front view we can rotate and get to see its back view also. It is a very good feature and i was trying to replicate it. But couldnt get an idea of how and where to start. My doubts are Whats the actual format of the thing, it surely isn't a picture. How do they get to rotate it? Could someone give me an idea where i should start or where I should look upon?

    Read the article

  • Enumerable.Range in and Expression and Entity Framework

    - by eka808
    I'm currently developping an expression method (used in linq to entity queries) who has to give me a daycount for a given period (start date and end date) decrementing this daycount if specials days are in the period. My idea was the following : Generate an enumerable with all the dates (and with Enumerable.Range) Make a .Where on this enumerable to remove the specials dates Like a MyEnumerable.Where(a = a != "20120101") After that, return a MyEnumerable.Count() I come with this code : return (p) => Enumerable .Range(1, 4) .Where(a => a != 20120101) .AsQueryable() .Count() I tried to cast as a list, as a queryable, both (like the example) and no way ! it doesn't work ! I always get this error : LINQ to Entities does not recognize the method 'System.Collections.Generic.IEnumerable`1[System.Int32] Range(Int32, Int32)' method, and this method cannot be translated into a store expression. Have you got an idea about that ? Using an enumerable is of course not mandatory, any working solutions is good ^^ Thank's by advance !

    Read the article

  • Using custom HTML attributes for JavaScript purposes?

    - by user1103990
    One of my colleagues doesn't like to use HTML classes and ids for javascript/jQuery purpose. Therefore I've seen that he had created custom html attribute such as <div id="myid" class="cssClasses ..." [some-purpose-id]="mycustomId">...</div> I asked him if it was really a good idea and he replied that he considers that classes and Ids should be reserved for styling. Personally, I would have used classes. Some classes would have been used for styling, and some other classes would have been used for programming (jQuery selectors). The idea is to keep things appart also. And of course jQuery could set styling classes but if possible not use them for selection. Of course I also use id when appropriate but since an id is unique on a page, I like to do generic stuff using classes. I would like to know you opinions on the better approach (if there is one). Thank you.

    Read the article

  • conditional while loop in php?

    - by julio
    I'm pretty sure there's an obvious answer for this-- hoping someone can help me-- I need to do a PHP while loop, but only if a variable is true. And I can't really put the while loop in an "if" statement, which seems like the obvious thing to do, since the code block is huge and it would be ugly and confusing. Do I need to break out the code in the loop into a function, or is there an easier way to deal with this? Here's the basic idea: if(condition){ while(another_condition){ //huge block of code loops many times } } else { // huge block of code runs once } I want the huge block of code to execute regardless of the state of the condition variable-- but only to execute once if condition is false, and execute for as long as another_condition is true if condition is true. Hope that's clear! The following code doesn't work, but gives an idea of what I want to accomplish: if(condition){ while(another_condition){ } // huge block of code if (condition){ } } // closes the while loop-- obviously throws an error though! thanks in advance.

    Read the article

  • Saving data in a inherited django model

    - by aldeano
    I'm building an app to save data and some calculations made with those datas, the idea is keep the data in one model and the calculations in other. So, the models are like this: class FreshData(models.Model): name = models.CharField(max_length=20) one = models.IntegerField() two = models.IntegerField() def save(self, *args, **kwargs): Calculations() Calculations.three = self.one + self.two super(FreshData, self).save(*args, **kwargs) Calculations.save() class Calculations(FreshData): three = models.IntegerField() I've got a valueerror pointing out "self.one" and "self.two" as without value. I keep the idea in witch my design is wrong and django has a simpler way to store related data.

    Read the article

  • Checking exception before using GETITEMBYID()

    - by ps123
    Hello, I am getting item by getiembyid...but I want to check before using it that whether item exist or not...I don't want to use query as main purpose of using Getitembyid is performance.....any idea how to achieve this... itemid = Response.QueryString["loc"]; SPList mylist = myweb.GetList(SPUrlUtility.CombineUrl(myweb.ServerRelativeUrl, "/Lists/Location")); //now id itemid does not exist it throws exception...so i want to check before using following statement that itemid exist...I know i can check throw SPQuery but as i said above because of performance issue only i m using itemid.... SPListItem myitem = mylist.GetItemById(Convert.ToInt32(itemid)); Any idea how to achieve this?

    Read the article

  • matrix = *((fxMatrix*)&d3dMatrix); //Evil?

    - by Xilliah
    I've been using matrix = *((fxMatrix*)&d3dMatrix); for quite a while. It worked fine until my screen turned black and received a bucket of frustration on my desk. fxMatrix contains 4 fxVectors. fxVector used to be 16 bytes, but now it was suddenly 20. This was because it inherited fxStreamable, which added the vTable. So one solution is of course just to not inherit fxStreamable, and leave a comment saying that it must always be 16 bytes and never more. Another solution would be to make conversion functions, and copy the matrix completely. This makes it more secure, but has an impact on the performance. I suppose this is the best idea. Another solution is to not convert at all, and stick to D3DXMATRIX, but this makes the engine inconsistent and I personally really dislike this idea. What is your opinion?

    Read the article

  • Design guide-lines for writing a Typed SQL Statement API ?

    - by this. __curious_geek
    Last night I came up to sometihng intersting while designing my new project that brought me to ask this qustion here. My project is supposed to follow Table Gateway pattern using tradional ADO.Net datasets for data access. I don't want to write plain queries in my data-access classes. So I came up with an idea of writing a parser kindaa api that exposes objects and methods to generate queries on the move based on my domain objects. Later I want this api to hook up to my Business objects and provide Typed SQL generator api right on the business object instances. Any idea or references how can I do this ? This seems very wide to start with that I'm compelled take your opinions here. Does there anything already exists that can do this ?

    Read the article

  • RESTful API: How to handle translated textfields in representations?

    - by Jan P.
    I am designing a RESTful API for a booking application. There are accommodations that you can request a list or the details. As the application targets a multi-language audience, the descriptions are (sometimes) available in different languages. Now I'm not sure how to handle these translations in the representation of an accommodation. Without the multiple languages I would make "description" a field or the accommodation object, quite simple. Any idea how to solve this elegantly? My current idea: Add a list of descriptions with text<-culture pairs instead of the description field and an additional subressource /descriptions to the accommodation for the creating (POST), updating (PUT) and deleting (DELETE) of new translations.

    Read the article

  • How to handle huge table ?

    - by misha-moroshko
    I would like to display to user a table which contains ~500,000 rows. The table should be calculated based on a file (i.e. the table is known at the beginning, and does not change). I guess that building the HTML text of this table is not a good idea in terms of memory performance. So how can I build such table ? I would like user to be able to scroll the table using a vertical scroll bar. Is it possible to build on the fly only the visible part of the table ? I'm afraid to see delays because of this. Is it a better idea to use server side programming rather than Javascript ? Any advise would be appreciated.

    Read the article

  • Using a single PHP script for an entire site

    - by briggins5
    I had an idea today (that millions of others have probably already had) of putting all the sites script into a single file, instead of having multiple, seperate ones. When submitting a form, there would also be a hidden field called something like 'action' which would represent which function in the file would handle it. I know that things like Code Igniter and CakePHP exist which help seperate/organise the code. Is this a good or bad idea in terms of security, speed and maintenance? Do things like this already exist that i am not aware of?

    Read the article

  • How to add an item to the top of a dynamic list

    - by user181318
    Like the title states, does anyone out there have a clear way to implement this type of functionality? Example: If you go to http://weewar.com, in their front page you noticed an ajax module that updates every second. However, all of the new items are added to the top of the list. My question is around that very same functionality. Does anyone have an easy and clear idea as to how one would implement this functionality? So far I have a method that initially creates the list, then another method is called in an interval that pulls the most recent data from the server.. However, I'm stuck with, how can I add the new dynamic node to the top of the list. If you can guide me to where I can find this information or give me an idea as to how I can implement this I will be very happy and grateful :) Thanks in advanced.

    Read the article

  • Reading in data from a file into an array

    - by Sam
    If I have an options file along the lines of this: size = 4 data = 1100010100110010 And I have a 2d size * size array that I want to populate the values in data into, what's the best way of doing it? To clarify, for the example I have I'd want an array like this: int[4][4] array = {{1,1,0,0}, {0,1,0,1}, {0,0,1,1}, {0,0,1,0}}. (Not real code but you get the idea). Size can be really be any number though. I'm thinking I'd have to read in the size, maloc an array and then maybe read in a string full of data then loop through each char in the data, cast it to an int and stick it in the appropriate index? But I really have no idea how to go about it, have been searching for a while with no luck. Any help would be cool! :)

    Read the article

  • Loading XML with possible infinite tags

    - by Firstmate
    (I'm doing this in AS3, but I'm sure the answer could be given in psuedocode) Basically, I have a XML file similar to: <Main> <Event> <Name>Blah</Name> <Event> Name>Blah2</Name> <Event> <Name>Blah3</Name> ... </Event> </Event> </Event> </Main> Yeah, to some extent it's poor design. But the idea I'm going for is that any Event has the potential to compromise of other Events and this idea kinda loops. Any ideas on how to do this?

    Read the article

  • phrase split algorithm in PHP

    - by Eric Sim
    Not sure how to explain. Let's use an example. Say I want to split the sentence "Today is a great day." into today today is today is a today is a great today is a great day is is a is a great is a great day a a great a great day great great day day The idea is to get all the sequential combination in a sentence. I have been thinking what's the best way to do it in PHP. Any idea is welcome.

    Read the article

  • For external links on my webpage, should I use a redirector page or just link direct to the external

    - by AaronM
    Hello, just wondering if I should be using a 'redirector' type page or link directly to the external pages on my site http://www.onedaysalefinder.co.nz/ - currently I use a redirector page to track what links are being clicked on (which simply takes an ID, looks up the URL in the database, and then does a Response.Redirect(URL); From a SEO point of view, is this a good idea/bad idea? I understand it can add a few milliseconds extra to the external page load time whilst it looks up the actual URL, but am not too concerned about this. I also get the benefit of tracking the clicks accurately, but are the pros/cons of using a redirector vs the actual link? Am I worrying about something I don't need to? Thanks

    Read the article

< Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >