Search Results

Search found 2417 results on 97 pages for 'states'.

Page 63/97 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • Obtaining kerning information

    - by chadb
    How can I obtain kerning information for GDI to then use in GetKerningPairs? The documentation states that The number of pairs in the lpkrnpair array. If the font has more than nNumPairs kerning pairs, the function returns an error. However, I do not know how many pairs to pass in, and I don't see a way to query for it. EDIT I tried to do the following, however, it still gave me 0. Font* myFont = new Font(L"Times New Roman", 10); Bitmap* bitmap = new Bitmap(256, 256, PixelFormat32bppARGB); Graphics* g = new Graphics(bitmap); SelectObject(g->GetHDC(), myFont); //DWORD numberOfKerningPairs = GetKerningPairs( g->GetHDC(), -1, NULL ); DWORD numberOfKerningPairs = GetKerningPairs( g->GetHDC(), INT_MAX, NULL );

    Read the article

  • Getting facts from documents

    - by dotnetdev
    Hi, I want to be able to get all the facts from webpages. But these have to be related to coding, and not, for example, about something irrelevant. For example: The Engine renders at a decent speed. May be a fact but is not what I am interested in. If the same article states: A class is a reference type. (This is C#) Then I am interested in that as it is coding related. Has an algorithm like this ever been done? How hard would this be? I'm thinking AI would come into play here. Any advice sought. Thanks

    Read the article

  • C++: is it safe to read an integer variable that's being concurrently modified without locking?

    - by Hongli
    Suppose that I have an integer variable in a class, and this variable may be concurrently modified by other threads. Writes are protected by a mutex. Do I need to protect reads too? I've heard that there are some hardware architectures on which, if one thread modifies a variable, and another thread reads it, then the read result will be garbage; in this case I do need to protect reads. I've never seen such architectures though. This question assumes that a single transaction only consists of updating a single integer variable so I'm not worried about the states of any other variables that might also be involved in a transaction.

    Read the article

  • Rails 2.3.5: How does one access code inside of lib/directory/file.rb?

    - by randombits
    I created a file so I can share a method amongst many models in lib/foo/bar_woo.rb. Inside of bar_woo.rb I defined the following: module BarWoo def hello puts "hello" end end Then in my model I'm doing something like: def MyModel < ActiveRecord::Base include Foo::BarWoo def some_method Foo::BarWoo.hello end end The interpreter is complaining that it expected bar_woo.rb to define Foo::BarWoo. The Agile Web Development with Rails book states that if files contain classes or modules and the files are named using the lowercase form of the class or module name, then Rails will load the file automatically. I didn't require it because of this.

    Read the article

  • Writing Great Software

    - by 01010011
    Hi, I'm currently reading Head First's Object Oriented Analysis and Design. The book states that to write great software (i.e. software that is well-designed, well-coded, easy to maintain, reuse, and extend) you need to do three things: Firstly, make sure the software does everything the customer wants it to do Once step 1 is completed, apply Object Oriented principles and techniques to eliminate any duplicate code that might have slipped in Once steps 1 and 2 are complete, then apply design patterns to make sure the software is maintainable and reusable for years to come. My question is, do you follow these steps when developing great software? If not, what steps do you usually follow inorder to ensure it's well designed, well-coded, easy to maintain, reuse and extend?

    Read the article

  • Can I delete a differential backup from SQL Server 2005?

    - by BlueMonkMN
    I often like to create backups when testing the software I work on, and will sometimes create a differential backup if I want to be able to get back to multiple previous states. However, sometimes I realize that I forgot one thing I wanted to include in a differential backup, or I no longer need a previous differential backup. Sometimes I simply want to create a new scenario from the original base image and start working with a new series of differential backups. So I'd like to be able to delete some older differential backups so I don't get confused about which ones I'm using. But I can't find any way to delete just the differential backups, selectively or all at once.

    Read the article

  • ANSI C++: Diferences between delete and delete[]

    - by Sunscreen
    I was looking a snipset of code: int* ip; ip = new int[100]; delete ip; The example above states that: "This code will work with many compilers, but it should instead read:" int* ip; ip = new int[100]; delete [] ip; Is this indeed the case? I use the compiler "Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 11.00.7022 for 80x86" and does not complain (first example) while compiling. At runtime the pointer is set to NULL. Other compilers behave diferrently? Can a compiler not compain and issues can appear at runtime? Thanks, Sun

    Read the article

  • How can I measure distance with tastypie and geodjango?

    - by Twitch
    Using Tastypie and GeoDjango, I'm trying to return results of buildings located within 1 mile of a point. The TastyPie documentation states that distance lookups are not yet supported, but I am finding examples of people getting it work, such as this discussion and this discussion on StackOverflow, but no working code examples that can be applied. The idea that I am trying to work with is if I append a GET command to the end of a URL, then nearby locations are returned, for example: http://website.com/api/?format=json&building_point__distance_lte=[{"type": "Point", "coordinates": [153.09537, -27.52618]},{"type": "D", "m" : 1}] But when I try that, all I get back is: {"error": "Invalid resource lookup data provided (mismatched type)."} I've been pouring over the Tastypie document for days now and just can't figure out how to implement this. I'd provide more examples, but I know they'd be all terrible. All advice is appreciated, thank you!

    Read the article

  • Javascript / Jquery Tree Travesal question

    - by Copper
    Suppose I have the following <ul> <li>Item 1</li> <li>Item 2 <ul> <li>Sub Item</li> </ul> </li> <li>Item 3</li> </ul> This list is auto-generated by some other code (so adding exclusive id's/class' is out of the question. Suppose I have some jquery code that states that if I mouseover an li, it gets a background color. However, if I mouseover the "Sub Item" list item, "Item 2" will be highlighted as well. How can I make it so that if the user mouses over "Sub Item" it only puts a background color on that and not on "Item 2" as well?

    Read the article

  • Game network physics collision

    - by Jonas Byström
    How to simulating two client-controlled vehicles colliding (sensibly) in a typical client/server setup for a network game? I did read this eminent blog post on how to do distributed network physics in general (without traditional client prediction), but this question is specifically on how to handle collisions of owned objects. Example Say client A is 20 ms ahead of server, client B 300 ms ahead of server (counting both latency and maximum jitter). This means that when the two vehicles collide, both clients will see the other as 320 ms behind - in the opposite direction of the velocity of the other vehicle. Head-to-head on a Swedish highway means a difference of 16 meters/17.5 yards! What not to try It is virtually impossible to extrapolate the positions, since I also have very complex vehicles with joints and bodies all over, which in turn have linear and angular positions, velocities and accelerations, not to mention states from user input.

    Read the article

  • How to tell an iphone app user what will happen before opening Facebook login dialogue

    - by docno
    Apps that allow users to log in over a 3rd party authentication provider (e.g. Facebook, Google, Twoitter,...) should open a browser window to let the user authenticate against the provider. That means, at some point, an app is backgrounded and the user interacts with a browser window. Just before the browser opens, it's a recommended pratctice to inform the user about what will happen (see e.g. Getting Started with OAuth 2.0 - O'Reilly), let's say an alert window with something like "you will leave now the XYZ app and a browser window will open where you can enter your credentials safely". My question: How can that be done if I use the facebook SDK for ios? Looking at the SDK, there seem to be no notifications and no designated states that would allow me to detect that the sdk is about to background my app and about to opening either Safari or the Facebook app.

    Read the article

  • Creating a Pop up and setting its view state before it displays

    - by theringostarrs
    Hi, I am a beginner developer in Flex, and I have been using viewstates lately. I had a couple of custom popup titlewindow components that are initialized using: PopUpManager.createPopUp(this, ContentCreate, true); They both contain view states already, and are very similar so I wanted to combione them into one popup titlewindow and change view state on initialisation of the popup to either the Create version of the popup or the Update. I thought I was being smart haha, but I realized soon after refactoring my code that, I as far as I know I can't pass parameters to the popup to indicate which state I want, if it is created using the PopUpManager. Does anyone know how to pass parameters to the PopupManager, or create the ContentCreate component(TitleWindow) in mxml or code so I can specify the view state?

    Read the article

  • save UIImageView state & the save the Entire View

    - by adamprocter
    I have an iPad app where you add photos to a page. I then want to save the photos positions, then add further pages with more photo positions and eventually save all the pagesto be looked at later in a slideshow style. Can anyone advise 1. Saving UIImageView states when moving to new views (or swapping views) - I see this on using NSCoding iPhone - save UIImageView state - but am at a lose - any more examples ? 2. How to save the 'entire' set of view to look at later (like a slideshow) - no idea on where to start with this ? array ? coredata ? Thanks

    Read the article

  • MS Access Crashed an now all Form objects and code modules are missing

    - by owlie
    I was adding a form to our Access 07 db. I copied an existing form to use as a template, renamed it, and saved it. I opened a different form to check something and Access crashed. When I reopened the database it says: "Access has detected that this database is in an inconsistent state, and will attempt to recover the database." etc. When it reopened - all forms and reports were missing. Saved queries remain. The error message states that object recovery failures will be noted in a Recovery Errors table - but this table wasn't created. The links to the be database remained intact. The database is split - I was experimenting with a form on a front-end copy which might have something to do with it. Any ideas what would cause this (I can see loosing recent work - but nixing all form objects?!) And is there any chance of recovery?

    Read the article

  • looping and arrays

    - by user1838418
    Hi I'm trying to construct a loop to execute 16 states of the 8 4 2 1 code in (C++) while( condition) { double Bubble[16], Bubble1[16]; Bubble[0] = ( a-2 - (b-2) ) + ( c-2 - (d-2)); // represents 0000 Bubble[1] = ( a-2 - (b-2) ) + ( c-2 - (d+2)); // represents 0001 Bubble[2] = ( a-2 - (b-2) ) + ( c+2 - (d-2)); // represents 0010 Bubble[3] = ( a-2 - (b-2) ) + ( c+2 - (d+2)); //represents 0011 ....... Bubble[15] =(a+2 - (b+2) ) + ( c+2 - (d+2)); //represents 1111 } Is there an easy way of coding using for loops? instead of writing bubble[] every time? 0 stands for -2 and 1 stands for +2. So I have 4 variables and each one need to be incremented and/or decremented. Can this be done using for loop? Appreciate your help

    Read the article

  • How can I get Facebook Profile image from email?

    - by Forbini
    There's an outlook plugin called Xobni that has a really cool feature, if a contact has an email address, it will fetch that contact's profile picture and display it. Their FAQ states the following: Xobni sends an encrypted email address to Facebook to retrieve the Facebook profile for the person who is currently being viewed in the Xobni sidebar. Your own Facebook profile is never altered by Xobni, and all Facebook privacy settings are strictly followed when viewing other profiles. I'd like to duplicate this functionality. However, I can't figure out which API call they're using. I'm assuming when they say "encrypted email address" that's laymen's terms for the email hash. Once a username is derived, the graph api looks ideal for actually fetching the image, but I'm having trouble going from email hash to profile ID.

    Read the article

  • How do I make a TCP connection between 2 servers if both can start the connection ?

    - by DeeD
    I have a defined number of servers that can locally process data in their own way. But after some time I want to synchronize some states that are common on each server. My idea was that establish a TCP connection from each server to the other servers like a mesh network. My problem is that in what order do I make the connections since there is no "master" server here, so that each server is responsible for creating there own connections to each server. My idea was that make each server connect and if the server that is getting connected already has a connection to the connecting server, then just drop the connection. But how do I handle the fact that 2 servers is trying to connect at the same time? Because then I get 2 TCP connections instead of 1. Any ideas?

    Read the article

  • session expires to soon in php

    - by user1669425
    I want to extend a session time so that a session variable does not expire until after 12 hours. Problem is that after 24 minutes (default time for a session until it expires) of inactivity it still expires the session and hence gives me undefined indexes for those SESSION variables. What else do I need to do in the code below in order to be able to extend the sessions so that it does not expire on its own until 12 hours has passed: <?php ini_set('session.gc_maxlifetime',12*60*60); ini_set('session.cookie_lifetime',12*60*60); phpinfo(); session_start(); ....//rest of code below ?> in phpinfo() it states this below for gc_maxlifetime: Local Value Master Value session.gc_maxlifetime 43200 1440 session.cookie_lifetime 43200 0

    Read the article

  • question about Littles Law

    - by davit-datuashvili
    I know that Little's Law states (paraphrased): the average number of things in a system is the product of the average rate at which things leave the system and the average time each one spends in the system, or: n=x*(r+z); x-throughput r-response time z-think time r+z - average response time now i have question about a problem from programming pearls: Suppose that system makes 100 disk accesses to process a transaction (although some systems require fewer, some systems will require several hundred disk access per transaction). How many transactions per hour per disk can the system handle? please help

    Read the article

  • What is the best way to deal with address inputs that can be from multiple countries?

    - by Andrew.S
    Most of my websites in the past have been rather limited to the United States when it came to displaying addresses. On a project I'm working on right now, however, users can add events from all over the world. My problem is how to go about dealing with the different way in which addresses are displayed across the world. For example, City/State/Zip is just a US thing. I was figuring I would alter the inputs displayed based on the country selected but I have no idea how I'm supposed to know the way every single country does addresses. Ideas?

    Read the article

  • Are unspecified and undefined behavior required to be consistent between compiles?

    - by sharptooth
    Let's pretend my program contains a specific construct the C++ Standard states to be unspecified behavior. This basically means the implementation has to do something reasonable but is allowed not to document it. But is the implementation required to produce the same behavior every time it compiles a specific construct with unspecified behavior or is it allowed to produce different behavior in different compiles? What about undefined behavior? Let's pretend my program contains a construct that is UB according to the Standard. The implementation is allowed to exhibit any behavior. But can this behavior differ between compiles of the same program on the same compiler with same settings in the same environment? In other words, if I dereference a null pointer on line 78 in file X.cpp and the implementation formats the drive in such case does it mean that it will do the same after the program is recompiled?

    Read the article

  • Where does one get data like Country:(list) State:(list)

    - by rlb.usa
    As a programmer of data-entry forms of all kinds, I often find myself making fields for things like Country: <choose from list>, State: <choose from list>, Race/Ethnicity: <choose from list>. Consider: Perhaps a list the 50 United States names is an easy thing to find (does one include DC?) , but the countries are not. Nearly every site you find has a differing list with all of the political goings on over the years, and they become outdated quickly. What's the best/common practice regarding population of these kinds of lists? Where does this data come from if it's not given in the specs?

    Read the article

  • (database) im trying to create a form in access 2007 with 2 drop down boxes to view a report by state or name

    - by jeff orris
    im an intern at a database mngmt company and the boss is training me in access...i took the access tutorials and were definitely not enough info involved to do a what seems a simple task.my problem is this: i have a simple table with contact info with 16 colums (Local_Utility, Requested_User_Type, First_Name, Last_Name, Address 1, Address 2, Country, State, City, Zip, Phone_Number, Username\Email, Password, Confirm Password, and Parcel_Number), with 6 rows of names (keep in mind this is just a test to help me from the boss) I created a form and with 2 drop down boxes (Last Name and State) and im trying to create a view button to view an individual report for a query i made for just simple contact info with 6 colums (Last_Name, First_Name, Address1, City, State, and Phone_Number) Problem1 is that i can view the query with the view by name or state button but cant view a simple individual report from the query using the button Problem2 is that for criteria on the query i put Forms!frmMyparamForm!txtMyStateParamField for the state drop box it works, but when i use Forms!frmMyparamForm!txtMyNameParamField it doesnt and that annoying parameter box pops up Problem3 is that after i close the query, all the states and names in my dropdown box on the form disappear Im a beginner at this please help me

    Read the article

  • How to restore data on Power Failure using C++ programming on windows.

    - by Tarun
    Hi, In my program I am writing a file of my programs states. I am writing the file many times to the file during the program run, because the program changes some variables that that i need to store very frequently. Now, if , for some reasons my power fails. Then most of the time I loose data in that file. Please, tell me any mechanism which can protect data even if the power fails. (I have written C++ program on windows). Thank you

    Read the article

  • should a student be diversifying or mastering programming languages?

    - by Max Link
    As the question states, is it better if a student diversifies or explores when learning programming languages or should they focus only on 2-3 languages and really get to know them well? Example of what I mean by diversifying: Functional -> Scheme Procedural -> C Object Oriented -> Java Dynamic or scripting -> Python Other -> C++ I have a few breaks in between semesters sometimes (up to 3 months) and I'm thinking of either learning a new language or "master" those that I know right now. Which would benefit me in the future? I know some(about 3 months of self studying each) Java, C, and C++ already . If I'm not mistaken, where I live, the industry is heavy on Java, C++, and C#.

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >