Search Results

Search found 5749 results on 230 pages for 'miles away'.

Page 134/230 | < Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >

  • change the default window font in a win32 windows project

    - by Vineel Kumar Reddy
    I am creating a GUI application using C and Win32 api. I would like to know how we can change the default font of the Main window to thaoma. I am comming from .NET background. In .NET if we change the font of parent control then automatically the child controls inherits that font.... Is there away similar to it or do we need to manually set the font of each control..... Please help me here.......and let me know the general process followed while coding in win32 api.... THanks in advance..

    Read the article

  • Using a backwards relation (i.e FOO_set) for ModelChoiceField in Django

    - by Bwmat
    I have a model called Movie, which has a ManyToManyField called director to a model called Person, and I'm trying to create a form with ModelChoiceField like so: class MovieSearchForm(forms.Form): producer = forms.ModelChoiceField(label='Produced by', queryset=movies.models.Person.producer_set, required=False) but this seems to be failing to compile (I'm getting a ViewDoesNotExist exception for the view that uses the form, but it goes away if I just replace the queryset with all the person objects), I'm guessing because '.producer_set' is being evaluated too 'early'. How can I get this work? here are the relevant parts of the movie/person classes: class Person(models.Model): name = models.CharField(max_length=100) class Movie(models.Model): ... producer = models.ForeignKey(Person, related_name="producers") director = models.ForeignKey(Person, related_name="directors") What I'm trying to do is get ever Person who is used in the producer field of some Movie.

    Read the article

  • How have your coding values changed since graduating?

    - by Matt
    We all walked out of school with the stars in our eyes and little experience in "real-world" programming. How have your opinions on programming as a craft changed since you've gained more experience away from academia? I've become more and more about design a la McConnell : wide use of encapsulation, quality code that gives you warm fuzzy feelings when you read it, maintainability over execution performance, etc..., whereas many of my co-workers have followed a different path of fewer middlemen layers getting in the way, code that is right out in the open and easier to locate, even if harder to read, and performance-centric designs. What have you learned about the craft of software design which has changed the way you approach coding since leaving the academic world?

    Read the article

  • Package names - impl v internal

    - by Ben J
    In my time of digging around Java APIs I have come across both impl and internal packages. Up until now I never really thought about the difference - as with all enterprisey Java apps, I figured they just meant that "actual implementation in here; you (API user) should be really using the interface. Go away." A little bit of digging around Stack Overflow seems to suggest that the internal package at least can have some security placed around it. So, what is the difference? I don't think it is a matter of taste because I have seen APIs with both.

    Read the article

  • Why do date manipulation in Java with milliseconds?

    - by staticsan
    I was recently faced with the problem of calculating the number of days from two dates in Java (without using joda, I'm afraid). Searching on the 'net shows most answers to this question say to get the milliseconds of the two days and convert that to days, which I found appalling. However, a scant few show a different approach: use a temporary variable to count how many times it takes adding 1 day to the first date to get to the second. This leaves the conversions to the code that does it best: the library. Why do so many people advocate the first? In another project, I had previously encountered numerous subtle date calculation problems involving time-zones, daylight-saving and once even leap years using seconds to do date comparisions and calculations. All these went away when all the comparison and calculation code was rewitten to use the language libraries. (This was in PHP, though, where the libraries are structured quite differently to Java.) So I'm understandably reluctant to use this "common wisdom" in the world of Java about comparing dates.

    Read the article

  • Creating a Skill Calculator for Runescape

    - by USDblades
    I am beginning C++. I have a long way to go and I am one to never stop learning. I want to create a project for myself that will allow me to learn as I go. It will also give me the motivation and possibly add to my portfolio when I graduate. The runescape skill calculator will ask for your current experience in the current skill of your choosing and your desired level. For Example: my woodcutting experience is 60 and I want to get to lvl 5 which is 120 exp. That means im 60 experience away. by cutting oak logs I get 5 experience per log. The calculator would tell me I need to cut 12 Oak logs. All these numbers are made up. So to my question. Where would I even begin? Hoping it would have buttons to press.

    Read the article

  • Black flicker while resizing translucent Qt widget (only when Aero is enabled)?

    - by D.
    I have a top-level Qt widget with the FramelessWindowHint flag and the WA_TranslucentBackground attribute set. It has several children, each of which draws an image on it. They are not in a layout. Instead, I simply move them around when something changes (it is not user-resizable). There are two states to the window - a big state and a small state. When I switch between them, I resize the window and reposition the children. The problem is that as the window resizes, a black box is briefly flashed on the top-level window before the images are painted over it. The problem goes away if I disable Aero. I found brief mention of this problem being fixed in an article describing a new release of Qt (this release is long past), but it still doesn't work. Any ideas why? Thanks!

    Read the article

  • Custom add_action('save_post') causes html markup to disappear!

    - by Scott B
    I've added a custom "save_post" action to my theme (code is below). However, when I place images or video code in the post, its stripped away. The only way I can get it to stay is to comment out the add_action line. What do I need to do in order to keep all the post info intact? add_action('save_post', 'custom_add_save'); function custom_add_save($postID){ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $postID; } else { // called after a post or page is saved if($parent_id = wp_is_post_revision($postID)) { $postID = $parent_id; } if ($_POST['my_customHeader']) { update_custom_meta($postID, $_POST['my_customHeader'], 'my_customHeader'); } else { update_custom_meta($postID, '', 'my_customHeader'); } if ($_POST['my_customTitle']) { update_custom_meta($postID, $_POST['my_customTitle'], 'my_customTitle'); } else { update_custom_meta($postID, '', 'my_customTitle'); } } } function update_custom_meta($postID, $newvalue, $field_name) { // To create new meta if(!get_post_meta($postID, $field_name)){ add_post_meta($postID, $field_name, $newvalue); }else{ // or to update existing meta update_post_meta($postID, $field_name, $newvalue); } }

    Read the article

  • Entity Framework 4.1 auto generate with DbContext when creating ADO.NET Entity Data Model

    - by smudgedlens
    I would like to work with DbContext instead of ObjectContext. I updated EF so now I have the DbContext, but I want to generate my strongly-typed context based on the DbContext and not the ObjectContext. When I add new ADO.NET Entity Data Model, it is still based on the ObjectContext. Is it not possible to have it base off of DbContext in Visual Studio 2010 with EF 4.1? UPDATE: Okay, I followed the directions in this link and was able to generate the DbContext template objects. However, now it is saying there is ambiguity between the template entities and the entities in my .edmx file. How do I resovle this? Do I blow away the ones in the .edmx file?

    Read the article

  • Advice for building a browser-based audio mixer up to 32 tracks

    - by Jonathan P.
    As a personal hobby I am looking to build an online audio mixer where I can upload individual instrument tracks, control individual volumes of each track, and export the mixed down version. I've been trying (and have come pretty close) with javascript. I really would like to stay away from flash if possible, but I'm really looking for suggestions for technologies to try. If anyone has any suggestions on languages that are good at stuff like this or libraries that I am missing, please let me know! I have a test environment that I have been using: http://driverstestpractice.com/sandbox Currently all tracks on the site are set to the click track in order to test the track sync (which as you can tell is a little off)! Thanks!

    Read the article

  • WPF layout calls MeasureOverride repeatedly in increments of 2?

    - by Scott Whitlock
    I've run into a case where I have a custom Panel (inherits from Panel) and I'm using it as an ItemsPanel in a ListView. When I resize the container that it's in, if I resize it smaller, my panel's MeasureOverride function gets called once, but if I resize it larger (let's say from 100 to 300), it calls MeasureOverride and ArrangeOverride for every value between 100 and 300, in increments of 2 (so 102, 104, etc.). The weird thing is that the container resizes right away (its size gets to 300 immediately). It doesn't seem to matter what I return from MeasureOverride - it just does this. I wish I could make it happen in a really small application and post it here, but I haven't been able to reproduce it like that yet. I can reproduce it all day in my app though. Does anyone know what could cause this?

    Read the article

  • Hot to log in to a website using installed twill?

    - by brilliant
    Hello, everybody!!!! I have just successfully installed TWILL on my computer with the help of one very supportive member of "StackOverflow" (you can check it out HERE) and have tried to run one of the simple examples on the twill documentation page (you can see that page HERE). Here is that example: Let's say my username on www.slash.org is lynxye and my password is mammal. When I try to enter that exanple code into my Python prompt, I can only enter the first line of the code bexcause when I click on "Enter" to start a new line, I get some error messages right away: The same happens when I try to enter this code into my terminal: I think I miss out on some basics here. Perhaps, I need to create a file that would contain that code and then run that file somehow, but I really don't know where I need to create that file and with what extensdion. Can anyone, please, help me with this?

    Read the article

  • Response.Redirect causes System.Threading.ThreadAbortException

    - by RandomBen
    When I use Response.Redirect(...) to redirect my form to a new page I get the error: A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code My understanding of this is that the error is being caused by the webserver aborting the remainder of the page the response.redirect was called on. I know I can add a second parameter to Response.Redirect that is called endResponse. If I set endResponse to True I still get the error but if I set it to False then I do not. I am pretty sure though that that means the webserver is running the rest of the page I redirected away from. Which would seem to be inefficient to say the least. Is there a better way to do this? Something other than Response.Redirect or is there a way to force the old page to stop loading where I will not get a ThreadAbortException?

    Read the article

  • how can i substitute a NULL value for a 0 in an SQL Query result

    - by Name.IsNullOrEmpty
    SELECT EmployeeMaster.EmpNo, Sum(LeaveApplications.LeaveDaysTaken) AS LeaveDays FROM EmployeeMaster FULL OUTER JOIN LeaveApplications ON EmployeeMaster.id = LeaveApplications.EmployeeRecordID INNER JOIN LeaveMaster ON EmployeeMaster.id = LeaveMaster.EmpRecordID GRoup BY EmployeeMaster.EmpNo order by LeaveDays Desc with the above query, if an employee has no leave application record in table LeaveApplications, then their Sum(LeaveApplications.LeaveDaysTaken) AS LeaveDays column returns NULL. What i would like to do is place a value of 0 (Zero) instead of NULL. I want to do this because i have a calculated column in the same query whose formular depends on the LeaveDays returned and when LeaveDays is NULL, the formular some how fails. Is there away i can put 0 for NULL such that that i can get my desired result.

    Read the article

  • How easy would it be to refactor a small JSP/Servlet/JDBC project to SpringMVC/Hibernate

    - by John
    With reference to this post, I am considering starting a new web-based Java project. Since I don't know Spring/Hibernate I was concerned if it's a bad plan to start learning them while creating a new project, especially since it will slow down the early development. One idea I had was to write a prototype using tech I do know, namely JSP/Servlets/JDBC, since I can get this running much quicker with my current knowledge. I could then throw the whole thing away and start over with Spring, etc, but I'd like to consider how easy it would be to refactor a smallish project from JSP/Servlets/JDB to SpringMVC/Hibernate? My DB could of course be re-used but what about other code... would I expect to save most of it plugged into an MVC framework, or is the paradigm shift big enough this would cause more trouble than it avoids? Please use the other question for more general advice on choosing technologies

    Read the article

  • Having a fork match the original repo when the original master branch can't be merged in?

    - by a2h
    The related questions that SO offer me only answer simple cases that can be solved with a pull - however, that won't work for my case. There's a repository I've forked, with just a master branch, and I've forked it, and I've worked in both my master, and a new branch of my own, rw-style. The owner of the forked repository's committed some of my changes but not others; the black dots on the top right below represent commits from both my master and rw-style branches. I'm aware using the fork queue is not a good idea, so I'm staying away from it. Using git pull does work, but it creates a conflict that I would then need to resolve, and it also results in duplicate history for my master branch, and that doesn't look particularly pretty. I don't know any other solutions right now, so I'm currently considering just creating a patch from two commits that I haven't yet pushed, deleting my fork, creating it again from the original, and then applying my patches on top of it. Is that the only solution?

    Read the article

  • How to implement copy protection of content in an open source application?

    - by Lococo
    I have an idea for an open source app -- the app would be free, but I would charge a small fee for data that a customer would order. For instance, let's say I'm writing a map application. I'd give the app away, make it open-source, but I would like to sell various maps to individual users. Is there a way to protect the data in such a way that makes it very difficult for someone to simply take the map they bought and distribute it to others? Is this feasible for an open source app?

    Read the article

  • Are global comment systems a privacy concern?

    - by Stefano Borini
    I more and more see these global login-once comment-everywhere systems on every page. I didn't do my homework of tinkering debugging and search before asking, so my question is as follows: You login on site A and leave a comment. Now you go on site B, which uses the same global comment system. At the bottom of the page a request form with your name and data appears for you to add a comment on B page. You don't leave any comment and browse away. Does the global-comment provider get information about the fact that you visited page B, even if you don't leave any comment ? I will dig into the code as soon as I have time, but in the meanwhile I would like to ask your insights on this regard.

    Read the article

  • Which "platform" should we use for a notifier-component?

    - by cwap
    Hi all We need to develop a notifier component. What it will do, is to scan a database at given intervals (say, every 15th minute), to see if any notifications needs to be sent out. We're running on Windows, and so we've been looking into either a Windows Service or the Windows Task Scheduler. Our biggest concern is the robustness of our implementation. If it, for some reason, crashes, can it be auto-restarted the next interval? Can we use custom logging logic, to take care of crashes? I'd like an educated guess on what to use here :) Feel free to say if you need additional info, to make such a guess.. Props will be given if someone could make a short listing of the pros n cons of a windows service vs. the windows task scheduler. Also, it should be noted, that we aren't set on either of these, so if you have any alternatives, please, do post away. Thanks in advance :)

    Read the article

  • Circular Reference for Parent Link on Work Item cannot be resolved by Retry

    - by Atters
    I receive the following error; OH-TFS-Connector-0051: Operation failed getCollectionMetaData. Server Error : TF201063: Adding a Parent link to work item 1737 would result in a circular relationship. To create this link, evaluate the existing links, and remove one of the other links in the cycle. I have completely flattened out the Work Items in the source project. When retrying the migration the timestamp is modified on the pending errors however the issues are not resolved. These Work Items now have no parents or children in the source project. So I'm wondering if the retry list is no longer valid but there doesn't appear to be a away to have it update? I can run the whole migration again, however it takes 5-7 hours to just do the work items so it would be great if there is a quick fix.

    Read the article

  • Get Data from Windows Form into C# program

    - by Jimmy
    I want my C# program to collect data. Then, when the OK button is clicked, I want this data to be loaded into my program -- such as into variables in Main(), or into data members of a class I have constructed, and I want the form to then go away -- not be hidden, but actually closed. Alas, read as I might in the book I have, the data collected by the form stays in the form, execution proceeds within the form, and the same form is used to display the result of the program's computations. Sheesh. All I want is to capture the form's information, close the form and proceed with my program. I would appreciate some tips on geting data from a form into Main() or into a class's data members. Thanks, Lucky

    Read the article

  • load balancer question c# asp.net

    - by Migs
    The place where I work has 2 servers and a load balancer. The setup is horrible since I have to manually make sure both servers have the same files. I know there are ways to automate this but it has not been implemented, hopefully soon (I have no control over this). I wrote an application that collects a bunch of information from a user, then creates a folder named after the email of the user in one of the servers. The problem is that I can't control in which server the folder gets created in, so let say a user goes in.. fills his stuff and his folder gets created in server 1, user goes away for a while and goes back to the site but this time the load balancer throws the user into server 2, now the user does something that needs to be saved into his folder but since it didn't created in this server an error occurs. What can I do about this? any suggestions? Thanks

    Read the article

  • Even lighter than SQLite

    - by Richard Fabian
    I've been looking for a C++ SQL library implementation that is simple to hook in like SQLite, but faster and smaller. My projects are in games development and there's definitely a cutoff point between needing to pass the ACID test and wanting some extreme performance. I'm willing to move away from SQL string style queries, allowing it to be code driven, but I haven't found anything out there that provides SQL like flexibility while also preferring performance over the ACID test. I don't want to go reinventing the wheel, and the idea of implementing an SQL library on my own is quite daunting, even if it's only going to be simple subset of all the calls you could make. I need the basic commands (SELECT, MODIFY, DELETE, INSERT, with JOIN, and WHERE), not data operations (like sorting, min, max, count) and don't need the database to be atomic, or even enforce consistency (I can use a real SQL service while I'm testing and debugging).

    Read the article

  • Database normalization and duplicate values

    - by bretddog
    Consider a Parent / Child / GrandChild structure in a database table schema, or even a deeper hierarchy. These being in the same aggregate. One table DAYS keeps a single row per day, and has a "Date" field. This is the root table, or maybe a child of the root. No row can ever be deleted in this table. In this case, however complex my table schema looks like, however far away in the hierarchy any other table is, is there any reason why any other table would hold a Date value? Can't it instead just have a FK to the DAYS table. I obviously assume that the creation of these date fields happen not before such datefield exist in the DAYS table. I'm now thinking just about the date part to be relevant, not the time part. Not sure if all databases can store these individually. That's maybe relevant, but not really the focus of the question.

    Read the article

  • basename() returning int?

    - by EB
    Probably something stupid I'm missing but, why am I getting this warning? static void foo(char *path) { char *bname; char *path2 = strdup(path); bname = basename(path2); (line with basename() call): warning: assignment makes pointer from integer without a cast Indeed, if I change to this, the warning goes away: bname = (char *)basename(path2); man 3 basename tells me: char *basename(char *path); Both dirname() and basename() return pointers to null-terminated strings. What gives?

    Read the article

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