Daily Archives

Articles indexed Sunday January 2 2011

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

  • How can I merge a Gmail account and OpenID account with Superuser?

    - by user61116
    I have recently created an account with Super User with a Gmail account Now that I'm trying to login in only find the OpenID login and when i login with my OpenID it seems Super User doesn't recognize it with my Gmail account The result is I have 2 accounts now an old one(Gmail) with reputation and a new one without (OpenID) When I First Signup I did it with Windows 7 now I'm working with Ubuntu 10.10 So my question is: How can i merge my previously superuser Gmail account and my OpenID account with Super User?

    Read the article

  • sizes of RAM, of virtual memory and of swap for 32-bit OS

    - by Tim
    If I understand correctly, a 32-bit OS (Ubuntu) can only address 4GiB memory, so RAM with size larger than 4Gib will only be used 4Gib of itself and the rest is a waste. I am now confused about this situation for RAM with similar one for virtual memory and for swap. with virtual memory being swap + RAM, if the size of the virtual memory exceeds 4Gib, will the exceeding part be a waste for the 32-bit OS? if I now have to choose the size for my swap partition, is it a factor to consider that the 32-bit OS can only address 4GiB memory? Does the size of swap have to be chosen with respect to the 4Gib addressible limitation? Will the swap exceeding 4GiB always be a waste? is virtual memory equal to RAM and swap? or can virtual memory use space on the hard drive outside the swap partition? Thanks and regards!

    Read the article

  • Command line audio library manager for Linux

    - by Ketil
    Hi all Hear is my set-up, I have a Linux server that is running Music Player Demon, all the audio files are under a dir (/muzik) which is exported by NFS. So to add files to the MPD database, I just drop the files into the /muzik NFS share and up date the MPD db, so far so good, but I would like to keep the dir strucher belowe /muzik in sum sort of order. To achieve this I am using Amarok, wich a start on my laptop and then use the organise files command to sort the files in into a sensible dir strucher based on the tags in the files. Do you know of any command line utility that can do the same thing that I am using Amarok for so I can run it from cron on the server and automate the process? I hope that this make sense.

    Read the article

  • How do you determine how long it is taking Apache to forward a request to Phusion Passenger?

    - by dan
    I have a Ruby on Rails website that is serving requests relatively fast within Rails. The completion time for a Rails request is about 130ms. But the request still takes a long time because of the time it takes the Apache server in front of the Phusion Passenger instances to hand off the request to Rails. How can I measure how long it takes Apache to hand off the request to Rails via Passenger? And how can I speed this up if it's slow. Yes, I plan on switching to nginx, but I need a temporary fix.

    Read the article

  • Which topics should be covered in a basic undergraduate C++ course?

    - by Gulshan
    I have a young lecturer friend who is going to teach the undergraduate C++ course in CS. He asked me for some suggestions regarding how the course should be organized. Now I am asking you. I have seen many trends in universities which leads to a nasty experience of C++. So, please suggest from a professional programmer's point of view. For your information, the students going to take the course, have taken course like "Introduction to programming with C" in previous semester.

    Read the article

  • Enabling multitouch on an acer 5742?

    - by Ben
    I am trying to get multitouch to work on my touchpad. I am currently trying to run a script to get it to work. It is set to start on boot, saved as .run and has been made executable. here is the code: #!/bin/bash #enable multitouch sleep 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 8 0 0 0 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 110 synclient TapButton2=2 exit the commands make multi touch work if I enter them in the terminal, but the script itself does not work. any suggestions?

    Read the article

  • Are there any guidelines for laying out screen "real estate?"

    - by Corey
    I'm wondering if there is any information about creating a decent page layout so that your website will appeal to users of all resolutions. For example, the optimal width for pages. It seems like on my resolution, most websites have their content centered and covers about 80% of the page, which is easy on the eyes. Or maybe the height of the website's logo/header -- some sites I stumble upon have a huge logo with links or navigation under it, making it so that I need to scroll down to see the actual content, like articles or images (these sites don't keep me for very long). I understand that every user is different and may have browser extensions, page zoom or may be running some ancient system that displays in 640x480. I'm not looking for a "best" solution, but rather, some guidelines about designing to accommodate different resolutions. Basically, how can I make sure that I don't design a page where a paragraph might display in several easy-to-read lines on my resolution, but it turns into a single line on a 1920x1080 resolution and makes it hard for the user to follow?

    Read the article

  • Strategies on synching data and caching data between iphone and server

    - by Blankman
    Say I have a TODO list iphone app, that can be edited/viewed from both a web application and the iphone application. When on the iphone, when a user views all his todo lists, or sub-items, I would think that each time the user views a particular list it shouldn't be hitting the web applications API every-time, but rather cache locally the values and only hit the web when things change. What strategies are there for this type of scenerio?

    Read the article

  • Passing Services to MainViewModel - SHOULD I use a dependency injection container ?

    - by msfanboy
    Hello, I have this code: public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var mainVM = new MainViewModel ( new Service1(), ... new Service10(), ); var window = new MainWindow(); window.DataContext = mainVM; window.Show(); } } I pass all my Services instances to the MainViewModel. Within the MainViewModel I spread those services to other ViewModels via constructor parameter passing. Should I use any DI framework for the services in the App class? If yes whats the benefit of resolving the services instead of just creating the instance manually... ?

    Read the article

  • Trouble adding video controls to video selected by XML comboBox

    - by user560128
    Hello, it's been a few years since I've touched flash, so perhaps I'm just overlooking something. If anyone could look at the code and offer any suggestions that would be awesome. What's working, I select a video from a combobox that is populated from an XML file, pick the video and it plays. I've been trying to add pause/play, stop, forward and reverse functionality, once I get that to work I also want to add a video scrubber(slider), and previous/next buttons to go to the previous/next video as listed in the xml file. At the moment I have a component button on the stage called playButton, which I'm trying to use for pause/play functionality. Below is my code, the player control is at the very bottom. Thanks. import fl.data.DataProvider; var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); var videosXML:XML = new XML(); var loader:URLLoader = new URLLoader(); var request:URLRequest= new URLRequest("xml/videos.xml"); var videos:Array = new Array({label:"Select a Video",data:""}); var client:Object = new Object(); theVideo.attachNetStream(ns); ns.client = client; loader.addEventListener(Event.COMPLETE,loaderOnComplete); loader.load (request); function loaderOnComplete(event:Event):void{ videosXML = new XML(event.target.data); for each (var video:XML in videosXML.video){ videos.push({label:video.name.toString(),data:video.url.toString()}); } moviesCB.dataProvider = new DataProvider(videos); } moviesCB.addEventListener(Event.CHANGE, changeHandler); function changeHandler(event:Event):void { if(ComboBox(event.target).selectedItem.data != ""){ ns.play(ComboBox(event.target).selectedItem.data); } }; client.onMetaData = metadataHandler; function metadataHandler(md:Object):void{ } //player controls playButton.onRelease = function() { ns.pause(); }

    Read the article

  • Converting a stopwatch time to milliseconds (regex)

    - by Nick
    I'm trying to figure out the best way to convert a string containing a time to an integer number of milliseconds. I'm using a suboptimal way using a bunch of preg_match()'s and some array handling, but I was wondering if there was an elegant way. Here are some example stopwatch times (some wouldn't actually be seen on a stopwatch but need to be converted anyway): 3:34:05.81 34:05 5 (just 5 seconds) 89 (89 seconds) 76:05 (76 minutes, 5 seconds) Millseconds will not extend past 2 decimal places. You can give me an example using either PHP or Javascript regex functions. Thanks!

    Read the article

  • Core Data object into an NSDictionary with possible nil objects

    - by Chuck
    I have a core data object that has a bunch of optional values. I'm pushing a table view controller and passing it a reference to the object so I can display its contents in a table view. Because I want the table view displayed a specific way, I am storing the values from the core data object into an array of dictionaries then using the array to populate the table view. This works great, and I got editing and saving working properly. (i'm not using a fetched results controller because I don't have anything to sort on) The issue with my current code is that if one of the items in the object is missing, then I end up trying to put nil into the dictionary, which won't work. I'm looking for a clean way to handle this, I could do the following, but I can't help but feeling like there's a better way. *passedEntry is the core data object handed to the view controller when it is pushed, lets say it contains firstName, lastName, and age, all optional. if ([passedEntry firstName] != nil) { [dictionary setObject:[passedEntry firstName] forKey:@"firstName"] } else { [dictionary setObject:@"" forKey:@"firstName"] } And so on. This works, but it feels kludgy, especially if I end up adding more items to the core data object down the road.

    Read the article

  • iPhone Gestures Adding 2 at once

    - by BahaiResearch.com
    Objective C answers are fine too. Currently I am using this code to add 2 gestures (left / right) to my WebView. Works fine. Can I combine this into less code though to indicate that both gestures go to the same action? //LEFT UISwipeGestureRecognizer sgr = new UISwipeGestureRecognizer (); sgr.AddTarget (this, MainViewController.MySelector); sgr.Direction = UISwipeGestureRecognizerDirection.Left; sgr.Delegate = new SwipeRecognizerDelegate (); this.View.AddGestureRecognizer (sgr); //RIGHT UISwipeGestureRecognizer sgrRight = new UISwipeGestureRecognizer (); sgrRight.AddTarget (this, MainViewController.MySelector); sgrRight.Direction = UISwipeGestureRecognizerDirection.Right; sgrRight.Delegate = new SwipeRecognizerDelegate (); this.View.AddGestureRecognizer (sgrRight);

    Read the article

  • jQuery/Tablesorter: maintain secondary alphabetical sort

    - by user460847
    I have a table of names and ages that I want the user to be able to sort. When the page initally loads, sortList lists the rows in order from oldest to youngest, and then secondarily from A to Z. I want the same thing (a SECONDARY alphabetical sort) when the user actually clicks on the age <th>, but sortForce is making the alphabetical sort primary. Is there an alternative? $('#super_results table').tablesorter({ sortForce: [[0,0]], sortList: [[1,1],[0,0]] }); Or am I misunderstanding sortForce? Documentation here.

    Read the article

  • Rails: Obfuscating Image URLs on Amazon S3? (security concern)

    - by neezer
    To make a long explanation short, suffice it to say that my Rails app allows users to upload images to the app that they will want to keep in the app (meaning, no hotlinking). So I'm trying to come up with a way to obfuscate the image URLs so that the address of the image depends on whether or not that user is logged in to the site, so if anyone tried hotlinking to the image, they would get a 401 access denied error. I was thinking that if I could route the request through a controller, I could re-use a lot of the authorization I've already built into my app, but I'm stuck there. What I'd like is for my images to be accessible through a URL to one of my controllers, like: http://railsapp.com/images/obfuscated?member_id=1234&pic_id=7890 If the user where to right-click on the image displayed on the website and select "Copy Address", then past it in, it would be the SAME url (as in, wouldn't betray where the image is actually hosted). The actual image would be living on a URL like this: http://s3.amazonaws.com/s3username/assets/member_id/pic_id.extension Is this possible to accomplish? Perhaps using Rails' render method? Or something else? I know it's possible for PHP to return the correct headers to make the browser think it's an image, but I don't know how to do this in Rails... UPDATE: I want all users of the app to be able to view the images if and ONLY if they are currently logged on to the site. If the user does not have a currently active session on the site, accessing the images directly should yield a generic image, or an error message.

    Read the article

  • Ruby on Rails: how to render a string as HTML?

    - by Tim
    I have @str = "<b>Hi</b>" and in my erb view: <%= @str > What will display on the page is: <b>Hi</b> when what I really want is Hi. What's the ruby way to "interpret" a string as HTML markup? Edit: the case where @str = "<span class=\"classname\">hello</span>" If in my view I do <%raw @str %> The HTML source code is <span class=\"classname\">hello</span where what I really want is <span class="classname">hello</span> (without the backslashes that were escaping the double quotes). What's the best way to "unescape" those double quotes?

    Read the article

  • Why call conversation does not recording without speakerphone?

    - by Pruthveshkumar Gajera
    Hi, I whould like to ask that why call conversation deos not recorindg without speakrphone? is this isuue will solve in feature because of the reason to change phone. Why there is no any option for changeing the font Sizw in Android OS...In the contact list only first name can disply due to big size font. After the disconnet of any call Android device take so much time to next call...Why? Plese with the answer of the questions it shoul be solve also in ANdroid.

    Read the article

  • Can I create object names from a text file in Python 2.7?

    - by user560100
    I'm working on a game project. I've created an object, Star(Object). I want to assign the name of the variables, dynamically, from a text file. If I have a text file with: Sol Centauri Vega I want the program to create the Star(Object) with variable names from the text file. I want the process automated, because I'm looking to create hundreds of stars. I could write the code out by hand: Sol = Star(Sol) Centauri = Star(Centauri) Vega = Star(Vega) But isn't there a way to automate this? Essentially, what I eventually want is a tuple with the list of stars, as their own objects. Then, when I am doing game maintenance, I can just iterate over all the objects in the tuple.

    Read the article

  • Algorithm(s) for rearranging simple symbolic algebraic expressions

    - by Gabe Johnson
    Hi, I would like to know if there is a straightforward algorithm for rearranging simple symbolic algebraic expressions. Ideally I would like to be able to rewrite any such expression with one variable alone on the left hand side. For example, given the input: m = (x + y) / 2 ... I would like to be able to ask about x in terms of m and y, or y in terms of x and m, and get these: x = 2*m - y y = 2*m - x Of course we've all done this algorithm on paper for years. But I was wondering if there was a name for it. It seems simple enough but if somebody has already cataloged the various "gotchas" it would make life easier. For my purposes I won't need it to handle quadratics. (And yes, CAS systems do this, and yes I know I could just use them as a library. I would like to avoid such a dependency in my application. I really would just like to know if there are named algorithms for approaching this problem.)

    Read the article

  • How do I relocate assemblies from a deployment project without breaking application references?

    - by James
    Hi, I have recently refactored a lot of my applications existing code and I am now looking at tidying up the deployment side of things. The existing installer application installs everything in the application folder (with the exclusion of a couple of config files which are located in a sub folder). However, I have multiple applications which all use some common assemblies and my goal is to relocate a these particular assemblies to the "Common Files" folder in the program files directory. NB: I have read a lot about the GAC but I have no experience with it and also read a few horror stories, so trying to get a simple solution for the time being. I managed to get the assemblies installed into the Common Files folder, however, as a result (typical I.T.) I have broken my app! If I copy the assemblies back into the application folder it works fine so the problem is obviously to do with how my app is referencing the assemblies. To get the installer to install the assemblies into the Common Files folder I just updated the Folder property of each assembly in the Detected Dependencies list. My thoughts were when I did that the installer would somehow update my application to tell it to look in that folder for them but that doens't appear to be the case. What exactly am I doing wrong here?

    Read the article

  • before_filter not inheriting from parent controller correctly?

    - by Scott
    Sorry if this may be a stupid question but I'm unable get my filters to inherit the way the Rails 3 documentation is saying it should. Specifically I have an Admin controller that was generated via: rails generate controller admin I added only a single action to the admin controller, the before filter & the private filter method class AdminController < ApplicationController before_filter require_admin_creds def index end private def require_admin_creds unless current_user && current_user.admin? flash[:error] = ... redirect_to .... end end end I next then created my nested resources under the admin section with: rails generate scaffold admin/model While my admin index is indeed getting the filter, the admin/model index (or any other actions) are not. What is happening under the hood here that I must have excluded? Thanks in advance.

    Read the article

  • Komodo IDE 6's slow autocomplete problems with Javascript

    - by skerit
    I've been trying out Komodo IDE 6 for the last few days. I've always liked Komodo but I'm starting to get annoyed by something: The autocomplete is way too slow/buggy. Certain variables just won't give any autocomplete tips. Sometimes you have to backspace the dot and try over and over again. It also has a hard time giving autocomplete info for an object that has been created using a class in a namespace. Has anyone else had any problems with these things? Are there any better alternatives?

    Read the article

  • how do i install a game patch on an external hard drive

    - by shadow
    I have a 2tb external hard drive and I want to install battlefield 1942 on it. i can get the game on the hard drive without problems, and it runs great. the problem is that i have an outdated version, and i need to install a patch. thats when it gets iffy. i get the patch and start the install, and it finishes, but it doesnt install to the game itself. it goes to its own seperate folder, and that does nothing to the game. the patch installer doesnt ask me where the game is, and so im thinking that it cant find the game itself, and then screws up. any help would be great!

    Read the article

  • WP7 - listbox Binding

    - by Jeff V
    I have an ObservableCollection that I want to bind to my listbox... lbRosterList.ItemsSource = App.ViewModel.rosterItemsCollection; However, in that collection I have another collection within it: [DataMember] public ObservableCollection<PersonDetail> ContactInfo { get { return _ContactInfo; } set { if (value != _ContactInfo) { _ContactInfo = value; NotifyPropertyChanged("ContactInfo"); } } } PersonDetail contains 2 properties: name and e-mail I would like the listbox to have those values for each item in rosterItemsCollection RosterId = 0; RosterName = "test"; ContactInfo.name = "Art"; ContactInfo.email = "[email protected]"; RosterId = 0; RosterName = "test" ContactInfo.name = "bob"; ContactInfo.email = "[email protected]"; RosterId = 1; RosterName = "test1" ContactInfo.name = "chris"; ContactInfo.email = "[email protected]"; RosterId = 1; RosterName = "test1" ContactInfo.name = "Sam"; ContactInfo.email = "[email protected]"; I would like that listboxes to display the ContactInfo information. I hope this makes sense... My XAML that I've tried with little success: <listbox x:Name="lbRosterList" ItemsSource="rosterItemCollection"> <textblock x:name="itemText" text="{Binding Path=name}"/> What am I doing incorrectly?

    Read the article

  • Using a redirect of any form to remove a query string with Apache

    - by Bart B
    Because of the silly way iTunes works the only way to update the URL for a feed is by setting up a permanent redirect from the old feed to the new. This seems easy, but I've hit a snag. The old URL ended in /?feed=rss2, the new URL is just a file, so it ends in podcast.xml. When I redirected from the old URL to the new, iTunes picked up the new URL BUT, WITH the query string, so now the URL ends in podcast.xml?feed=rss2. This is allowing listers to download the show - which is good, but causing some other problems. Is there any possible way to set up a permanent redirect that will redired podcast.xml?feed=rss2 to just podcast.xml? Mod_Rewrite seems to just pass through query strings, so I'm at a loss! Bart.

    Read the article

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