Daily Archives

Articles indexed Monday May 10 2010

Page 1/113 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • The best way to package iPhone/iPad static libraries?

    - by Derek Clarkson
    Hi everyone, I have a couple of static Phone/iPad libraries I an working on. The problem I am looking for advise on is the best way to package the libraries. My objective is to make it easy to use the libraries in other projects and include the correct one in a build with minimal problems. To make it more interesting I currently build 4 versions of each library as follows armv6/armv7 release (devices) i386 release (simulator) armv6/armv7 debug (devices) i386 debug (simulator) The difference between the release and debug versions is that the debug versions contain a lot of NSLog(...) code which enables people to see whats going on internally as an aid to debugging. Currently when I build the whole projects I arrange the libraries into two directories like this: release lib-device.a lib-simulator.a debug lib-device.a lib-simulator.a This works ok except that when include in projects, both paths are added to the library search path and switching a target from one to the other is a pain. Or alternatively I end up with two targets. The alternative I am thinking of is to change the directories like this: release device lib.a simulator lib.a debug device lib.a simulator lib.a In playing with XCode is appears that all xcode uses the lbrary references of a project for is to get the name of the library file, which it then looks up in the library paths. Thus by parameterising the library path with the current built type and target device, I can effectively auto switch. What do you guys think? Is there a better way to do this? ciao Derek

    Read the article

  • C++ includes with and without .h

    - by wyatt
    I've never noticed it making any difference whether or not I include the .h at the end of an include, so I've always ignored the meaning, but I've just noticed in a particular program of mine, I get the error "memcpy was not declared in this scope" if I include "string", but not if I include "string.h". First of all, I was wondering the specific cause of this, but also generally the difference between the two. At the same time, if someone could explain the difference between includes in angular brackets and those in quotation marks, It'd be much appreciated.

    Read the article

  • Using fink to install PyODE

    - by None
    I installed fink and ran this command from terminal: sudo apt-get install python-pyode. I found this command on the internet and expected it to work, as I just installed fink. Am I using the wrong name? Is there a different command to use for Mac OS X (10.5)?

    Read the article

  • iphone global variables accessed from different views

    - by Rob
    Okay, so ultimately I want a program where the user can input simple data such as their name, date of birth, address, etc. and then have that information stay through multiple views. I am having the user input their information as UITextFields but their are multiple views that they are using to input the data. Is there a way that when the user inputs data in a UITextField - then moves to another view - then returns to the original view - that the data will still be in that UITextField? I figure since there are placeholders that there must be a command to show previously written text in that field when the viewController is called. Also, for the life of me, I can't figure out how to keep these variables global. I have read in multiple areas that I should define them in the AppDelegate as a simple: NSString *userName; NSString *userDOB; But how do I assign the strings from the UITextFields in a different view to these variables and then re-assign them to the UITextFields when the user returns to the place where they originally input them? (I apologize if I am not explaining this coherently - I am a bit of a newb)

    Read the article

  • Change Default Scrolling Behavior of UITableView Section Header

    - by davidjhinson
    I have a UITableView with two sections. It is a simple table view. I am using viewForHeaderInSection to create custom views for these headers. So far, so good. The default scrolling behavior is that when a section is encountered, the section header stays anchored below the Nav bar, until the next section scrolls into view. My question is this: can I change the default behavior so that the section headers do NOT stay anchored at the top, but rather, scroll under the nav bar with the rest of the section rows? Am I missing something obvious? Thanks.

    Read the article

  • Redirect help fixing broken backslash link

    - by zac
    I just accidentally launched a campaign that is driving traffic to index.html/ (backslash is breaking it)... I am not sure I can access the .htaccess and was wondering if I were to create a page so that people directed to this path would see soemthing what would the name of that page be? Since there is no name just an extra slash I am not sure how to handle this.

    Read the article

  • How does a web server/the http protocol handle version control and compression?

    - by Sune Rasmussen
    When a client browser requests a file from the web server, I know that some kind of check is performed, because the files needed to serve the web page may already be cached by the web browser. So, if a file exists in the cache, no files are sent. But if the file on the server has changed since the file was cached in the browser, the file is sent and updated anyhow. Then, if you have compression like gzipping enabled on the server, the files that are to be provided to the client must be gzipped on the way, requiring some amount of server side processing. But how is this managed? The logical approach seems to me, that the web server should have a cache as well, containing the newest version of all files that have been requested within a certain time span, thus a compressed version of these files, so that compression would not have to be done each time a files is requested. And also, how are files eventually requested? Does the browser ask for files, each time it encounters one in the HTML code and the specific file is not stored in the local cache, or does it sum all the files that are needed up and ask for the whole bunch at the same time? But that's only guessing from a programming point of view, and I don't really know. If the answers are very different among web server systems, I'm primarily interested in Apache, but other answers are appreciated, too.

    Read the article

  • Hard drive device names are different from one reboot to another in Ubuntu.

    - by Mike
    I have an Ubuntu machine (10.04 but had the same problem in 8.04) with a bunch of drives that I use as a file server. 1 SATA that I boot off of. 2 IDE that in RAID1 and 2 SATA in RAID1. The problem is the drives that I have in RAID1 change device names on reboot. This is a problem because the in my mdadm.conf a reference to /dev/sda1, for example, might not work the next time I reboot because /dev/sda1 could be a disk from another array. Any help getting around this would be appreciated. -Mike

    Read the article

  • Ubuntu: Failure to login with multiple video adapters

    - by tsilb
    Forgive my ignorance, for I am a complete linux noob. I have a computer with three video cards and six monitors. Works great on Windows. Trying to get it to run Ubuntu as well. It loads fine when I have it configured to run on one adapter; detects both screens, runs ok. But I want to turn the other 4 monitors on and run the whole thing as one extended desktop (one session, etc). So I downloaded and installed the newest ATI driver for Linux, which seems to work, kinda. I ran this to set up the screens: aticonfig --adapter=all --initial -f Now when I boot, Ubuntu seems to turn on all the screens (3 viewports, each with two cloned displays from what I can tell). When I enter my login info OR move the mouse off the main screen, the screens freeze and the kbd/ms become unresponsive. aticonfig generated xorg.conf included below. Have tried the following: aticonfig -initial -f - works, but only detects the primary adapter and 2 screens aticccle - Tells me I have to reboot after enabling the other cards. Then goes into above described freezing state. aticonfig --adapter=all --initial -f - see above Manually editing xorg.conf file with my limited knowledge - Was able to get two adapters running, but only the second adapter initialized while the primary stopped at the Ubuntu boot screen. Was unable to see the login prompt. Froze after I logged in blindly (was able to hear the login sound). Using generic "radeon" driver instead of ATI Proprietary driver with the above init attempts Toggling xinerama Various combinations of the above Hardware: Intel Core 2 Quad q6600 8GB DDR2 (3x) ATI Radeon HD 4680 5 monitors (21W, 21W, 22W Portrait, 22W Portrait, 19")and an HDTV (26"W, HDMI) in a horizontal arrangement I know next to nothing about Linux/Ubuntu aside from basic filesystem navigation, editing text files, and accessing my local and networked Windows stores and shares. Basically this is the most advanced thing I've had to do. I installed today. Please advise how to make this configuration work. my xorg.conf: Section "ServerLayout" Identifier "Layout0" Screen 0 "aticonfig-Screen[0]-0" 0 0 Screen "aticonfig-Screen[1]-0" RightOf "aticonfig-Screen[0]-0" Screen "aticonfig-Screen[2]-0" RightOf "aticonfig-Screen[1]-0" Option "RenderAccel" "true" Option "AllowGLXWithComposite" "true" EndSection Section "Files" EndSection Section "Module" EndSection Section "ServerFlags" Option "Xinerama" "0" EndSection Section "Monitor" Identifier "aticonfig-Monitor[0]-0" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" EndSection Section "Monitor" Identifier "aticonfig-Monitor[1]-0" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" EndSection Section "Monitor" Identifier "aticonfig-Monitor[2]-0" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" EndSection Section "Device" Identifier "aticonfig-Device[0]-0" Driver "fglrx" BusID "PCI:1:0:0" EndSection Section "Device" Identifier "aticonfig-Device[1]-0" Driver "fglrx" BusID "PCI:3:0:0" EndSection Section "Device" Identifier "aticonfig-Device[2]-0" Driver "fglrx" BusID "PCI:4:0:0" EndSection Section "Screen" Identifier "aticonfig-Screen[0]-0" Device "aticonfig-Device[0]-0" Monitor "aticonfig-Monitor[0]-0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection Section "Screen" Identifier "aticonfig-Screen[1]-0" Device "aticonfig-Device[1]-0" Monitor "aticonfig-Monitor[1]-0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection Section "Screen" Identifier "aticonfig-Screen[2]-0" Device "aticonfig-Device[2]-0" Monitor "aticonfig-Monitor[2]-0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection

    Read the article

  • Login From Multiple Services, Keeping Profiles in Sync

    - by viatropos
    Given the following: I have an application that allows people to login through twitter, myspace, yahoo, and google User creates initial account by logging in through Google User logs out User logs back in using Yahoo. ...is there a recommended way for the application to associate those two accounts together? Stack Overflow has this functionality but it seems like they need the user to manually say "this account google account is associated with that yahoo one". Is there no way to do this automatically?

    Read the article

  • Sending emails to site subscribers

    - by Art
    I have a site where people enter their email address to be reminded of a weekly posting. I only send them the weekly email that they double-opt-in for. I do not sell, trade, expose, or do anything else with their address. Right now I have a bit of a hack, connecting to a large email providers SMTP server to send the emails. As the site grows I fear that my emails will be marked as spam and that I will be violating the TOS of the provider. I'm considering two options, building an in-house SMTP server or using a mailing list service. Is there a best-known-method for this? I'd really prefer to simply build my email and use a script to send them through the SMTP server rather then use some GUI to build the email and import a list of addresses. But previous experience tells me that running a mail server and not being marked as spam can be difficult. Help!?

    Read the article

  • Determing software estimates and tracking past estimates

    - by Casey
    I know that this probably has as many answers as users here on SO, but software estimation always seemed like an esoteric science. Software developers don't have a magic book to refer to as exist in many other industries. I've been spending the last couple of days working on putting together some estimates for a bit of work that I am proposing for a freelance project that I am working on and am having trouble getting it down. I'm not experienced with any real software estimation practices and am trying to go from the gut based on my experience but also trying to be a little loose (not too loose though) on the estimates to leave me a bit of room to work. I read this blog entry http://blogs.popart.com/2007/07/what-scotty-from-star-trek-can-teach-us-about-managing-expectations/ that was linked to from SO and would like to start tracking my estimates at work as well even though I'm not really required to create estimates there. What tools or techniques would you recommend? Also, how much padding do you usually add in to a time estimate?

    Read the article

  • One row is skipped each time the program scans a matrix from file !

    - by ZaZu
    Hello there, I had this code working yesterday, but it seems like I edited it a bit and lost the working version. I cant get this to work anymore. I basically want to scan a matrix from a .txt file. But each time it scans the first row, the second one is skipped, and it reads the third instead :( Here is my code : for(i=0;i<=test->rowmat1;i++){ for(j=0;j<=test->colmat1;j++){ fscanf(fin,"%f\t",&test->mat[i][j]); } fscanf(fin,"%*[^\n]",&test->mat[i][j]); } For example, for a matrix of : 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 If I extract 3 rows and 3 cols, I get : 1.00 2.00 3.00 7.00 8.00 9.00 Then fails, it wants to skip over the second line but there is nothing after 10 11 12 Why did it stop working ? What do I have wrong ? Please help, Thanks in advance.

    Read the article

  • Powershell: Get-Process Returns "Invalid" VM Size

    - by dewald
    I'm running PowerShell 2.0 on Windows XP SP3 and I execute: PS> ps firefox And it returns: Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- 859 44 340972 351580 684 9,088.22 7744 firefox However, Windows Task Manager shows the following stats for firefox.exe: Mem Usage: 354,720 K VM Size: 347,322 K Why is the VM output from PowerShell 300 MB more than that output from Windows Task Manager?

    Read the article

  • Wait for a single RabbitMQ message with a timeout

    - by Evgeny
    I'd like to send a message to a RabbitMQ server and then wait for a reply message (on a "reply-to" queue). Of course, I don't want to wait forever in case the application processing these messages is down - there needs to be a timeout. It sounds like a very basic task, yet I can't find a way to do this. I've now run into this problem with both py-amqplib and the RabbitMQ .NET client. The best solution I've got so far is to poll using basic_get with sleep in-between, but this is pretty ugly: def _wait_for_message_with_timeout(channel, queue_name, timeout): slept = 0 sleep_interval = 0.1 while slept < timeout: reply = channel.basic_get(queue_name) if reply is not None: return reply time.sleep(sleep_interval) slept += sleep_interval raise Exception('Timeout (%g seconds) expired while waiting for an MQ response.' % timeout) Surely there is some better way?

    Read the article

  • ruby script/server not reading RAILS_ENV option

    - by iwan
    Hello, I tried to run ruby script/server RAILS_ENV=production but somehow it always try to read "development" config.. nothings wrong with RAKE XXX RAILS_ENV=production (trying to read production config). Any idea how to troubleshoot? I have my other rails app in the same machine and it works fine. The problem above only happen for redmine rails. Thanks in advance. -iwan

    Read the article

  • Add a Contextual Menu to WebView

    - by Woodster
    An easy one, I think: I want to add a contextual menu to a WebView. In IB, I added a NSMenu to the NIB, connected it to the WebView's menu outlet, launched and expected to be able to control-click in the WebView and see the pop-up menu. The only item I saw on the contextual menu is "reload". I can do the same steps but connect the Menu to some other view and it works as expected. Why doesn't the menu work the same when connect to the webview's menu outlet? Thanks

    Read the article

  • User/browser fingerprinting without cookies

    - by Art
    I'm sure that many of you have heard about this: http://panopticlick.eff.org/ It's a way to form a somewhat unique fingerprint of a web site visitor based on information about their browser, fonts, plugins, etc... Does anyone know of a library (python!?) to do this? I'd like to allow for visitors to vote on a poll without having to have an account...

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >