Daily Archives

Articles indexed Sunday June 13 2010

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

  • Network backup for Macs and PCs - formatting question

    - by neilfein
    I'm trying to use a LaCie 2TB drive as an AirPort drive, for backup on a home network. We have one mac and two PC laptops. My plan is to create a Mac partition and a Windows partition. However, Disk Utility won't let me set the windows partition to Windows format; there's no option in the menu for it in the partition tab. Am I doing something wrong? Alternatively, is there a way to partition the drive with one partition that all three machines can see? We have a Mac G5 with 10.4 and two laptops with Windows 7. Thanks!

    Read the article

  • C++ Template problem adding two data types

    - by Sara
    I have a template class with an overloaded + operator. This is working fine when I am adding two ints or two doubles. How do I get it to add and int and a double and return the double? template <class T> class TemplateTest { private: T x; public: TemplateTest<T> operator+(const TemplateTest<T>& t1)const { return TemplateTest<T>(x + t1.x); } } in my main function i have void main() { TemplateTest intTt1 = TemplateTest<int>(2); TemplateTest intTt2 = TemplateTest<int>(4); TemplateTest doubleTt1 = TemplateTest<double>(2.1d); TemplateTest doubleTt2 = TemplateTest<double>(2.5d); std::cout << intTt1 + intTt2 << /n; std::cout << doubleTt1 + doubleTt2 << /n; } I want to be able to also do this std::cout << doubleTt1 + intTt2 << /n;

    Read the article

  • How do I identify an OpenID provider as requiring Directed Identity?

    - by Skrat
    I am trying to extend the LightOpenID PHP library to "discover" that an identity provider requires Directed Identity. This should be easy as the library is beautifully well written and wonderfully clean but I don't know how to identify these types of providers. A couple things I've tried: I looked through the OpenID specs on the subject but came up empty handed. Looked through the PHP OpenID library but couldn't figure out how this info was gathered during the discovery. Dumped all the data (headers and content) that came from the servers by injecting some code in LightOpenID but didn't see anything helpful. Searched Google and Stackoverflow, naturally. How do providers identify themselves as requiring "Directed Identity" authentication? Surely there is a carefully defined specification for this... somewhere. Anyone know where I can find more on this?

    Read the article

  • jquery-sortable using behavior of a linkedlist

    - by BabaBooey
    I suspect I'm not looking at this issue in the right way so here goes. I have essentially a LinkedList of data on a web page (http://en.wikipedia.org/wiki/Linked_list) that I'd like to manipulate using traditional Linked List behavior (i.e. just updating the reference/id of the "next" object) for performance reasons. Where this gets a bit tricky is I'd ideally like to use Jquery's sortable to do this. Like the user would drag something up/down and I could just do an Ajax call to the server with the id of the object that moved and the new parent id of that object (and then behind the scenes I could figure out how to reconnect things..maybe need more data than that...). But every example I've seen where sortable is used they were sending the whole re-indexed list to the database to update which seems unnecessary to me. With a linked list to change an element's "index" I only need to make 3 updates which depending on the size of the list could be a big performance savings. Anyone have an example of what I'm trying to do...am I too far in left field?

    Read the article

  • Easy Facebook VB.NET library needed

    - by TuxMeister
    Hey guys and gals, Any one knows of an easy to use/well documented Facebook library for VB.NET? I have searched the Interwebs for it for a long time and even the official one has a very poor documentation for beginners. It looks like you have to be a Facebook developer to work with them. Any help is much appreciated. Thanks!

    Read the article

  • Scintilla custom syntax highlighting not working

    - by Nilbert
    I have a Scintilla control that I create in C#, and the syntax highlighting doesn't work. It sets the font correctly which tells me that the file is being loaded, but the syntax highlighting doesn't work at all: Scintilla r = new Scintilla(); r.Dock = DockStyle.Fill; r.ConfigurationManager.IsUserEnabled = true; r.ConfigurationManager.CustomLocation = "langs.xml"; r.ConfigurationManager.Language = "rb"; r.Margins[0].Width = 40; r.Indentation.UseTabs = true; r.Indentation.IndentWidth = 4; r.Indentation.ShowGuides = true; r.Indentation.TabIndents = true; r.Indentation.TabWidth = 4; r.Indentation.SmartIndentType = SmartIndent.Simple; and the configuration file is this: http://codepad.org/DAjCrlPT in langs.xml. (The code won't fit here.) Can someone tell me why this is not working?

    Read the article

  • Grabbing current URL and setting it to Textbox in the HTML frame using Google Chrome extension.

    - by devdreamers
    Hi all, Question says it all, dividing it into two parts: 1- Grabbing url when chrome extension is clicked, of current tab(on focus) - CHROME SPECIFIC. 2- Setting the same in a Textbox value, in one of frames of web page.Which means, the textbox resides in a.html where on webpage it's <frame src="a.html"> -CHROME/JAVASCRIPT/HTML specific. Please help, with either/both parts. Thanks so much.Appreciate it.

    Read the article

  • UNIQUE CONSTRAINT on a column from foreign table in SQL Server 2008

    - by bodziec
    I have two tables: create table [dbo].[Main] ( [ID] [int] identity(1,1) primary key not null, [Sign] [char](1) not null ) create table [dbo].[Names] ( [ID_Main][int] primary key not null, [Name][nvarchar](128) not null, constraint [FK_Main_Users] foreign key ([ID_Main]) references [dbo].[Main]([ID]), constraint [CK_Name] unique ([Name], [Sign]) ) The problem is with the second constraint CK_Name Is there a way to make a constraint target column from a foreign table?

    Read the article

  • How to change the value of a JLabel in runtime?

    - by user365465
    I want to change the image a JLabel is viewing during runtime, but I keep getting NullPointerExceptions or nothing happens when I press the magic button that's supposed to do things. Is it even possible in Java? Here is my code in its entirety: import java.text.*; import javax.swing.text.*; import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class Shell implements ActionListener, MenuKeyListener { JFrame frame; JWindow window; JButton PSubmit; JPanel pane1, pane2; JRadioButton R1, R2, R3; ButtonGroup PGroup; JTabbedPane layout; String result; String border = "Border.png"; String DF = "Frame.png"; String list []; Driver driver; public Shell() { driver = new Driver(); list = new String [6]; } public void setFrame() { frame = new JFrame("Pokemon Program 3 by Systems Ready"); frame.setSize(600, 600); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); frame.getContentPane().setLayout(new BorderLayout()); } public void frameLayout() { layout = new JTabbedPane(); JPanel pane1 = new JPanel(); JPanel pane2 = new JPanel(); JLabel label = new JLabel("Please choose the restrictions:"); JLabel imgLabel1 = new JLabel(new ImageIcon(border)); JLabel notiLabel1 = new JLabel("The Pokemon chosen with these restrictions are: "); JLabel notiLabel2 = new JLabel("'No Restrictions': No restrictions for the kind of Pokemon chosen based on species or items."); JLabel notiLabel3 = new JLabel("'Battle Revolution': All Pokemon must have unique items."); JLabel notiLabel4 = new JLabel("'Battle Tower': All Pokemon must have unique items, Uber and Event Legendaries banned."); JLabel label2 = new JLabel("Please choose possible Pokemon:"); pane1.add(label); pearlButtons(); pane1.add(R1); pane1.add(R2); pane1.add(R3); pane1.add(PSubmit); pane1.add(notiLabel2); pane1.add(notiLabel3); pane1.add(notiLabel4); pane1.add(imgLabel1); pane1.add(notiLabel1); JLabel pokeLabel1 = new JLabel(new ImageIcon(DF)); JLabel pokeLabel2 = new JLabel(new ImageIcon(DF)); JLabel pokeLabel3 = new JLabel(new ImageIcon(DF)); JLabel pokeLabel4 = new JLabel(new ImageIcon(DF)); JLabel pokeLabel5 = new JLabel(new ImageIcon(DF)); JLabel pokeLabel6 = new JLabel(new ImageIcon(DF)); pane1.add(pokeLabel1); pane1.add(pokeLabel2); pane1.add(pokeLabel3); pane1.add(pokeLabel4); pane1.add(pokeLabel5); pane1.add(pokeLabel6); pane2.add(label2); layout.add("Pearl Version", pane1); layout.add("SoulSilver Version", pane2); frame.add(layout); } public void pearlButtons() { PGroup = new ButtonGroup(); R1 = new JRadioButton("No Restrictions", true); R1.setActionCommand("N"); R1.setVisible(true); R2 = new JRadioButton("Battle Revolution"); R2.setActionCommand("BR"); R2.setVisible(true); R3 = new JRadioButton("Battle Tower"); R3.setActionCommand("B"); R3.setVisible(true); PGroup.add(R1); PGroup.add(R2); PGroup.add(R3); PSubmit = new JButton("Submit"); PSubmit.setActionCommand("pstart"); PSubmit.setVisible(true); PSubmit.addActionListener(this); } public void pearlProcessing() { //The "list" array has a bunch of string names that get .png affixed to them (and I named the image files as such when I name them) String file1 = list[0] + ".png"; String file2 = list[1] + ".png"; String file3 = list[2] + ".png"; String file4 = list[3] + ".png"; String file5 = list[4] + ".png"; String file6 = list[5] + ".png"; /*-------------------------------------------------------------------------------// This is where the method's supposed to go to change the image... I've tried pokeLabel = new JLabel(new ImageIcon(file1));, but that yields a NullPointerException. //-----------------------------------------------------------------------------------*/ } public static void main(String[] args) { Shell test = new Shell(); test.setFrame(); test.frameLayout(); test.frame.setVisible(true); } public void actionPerformed(ActionEvent e) { if ("pstart".equals(e.getActionCommand())) { result = PGroup.getSelection().getActionCommand(); if (result.equals("N")) { list = driver.Prandom(); pearlProcessing(); } else System.out.println("Not done yet! ;)"); } } public void menuKeyPressed(MenuKeyEvent e) { System.out.println("pressed"); } public void menuKeyReleased(MenuKeyEvent e) { System.out.println("menuKeyReleased"); } public void menuKeyTyped(MenuKeyEvent e) { System.out.println("menuKeyTyped"); } }

    Read the article

  • How to reference other locations in making multi-boot live cd

    - by Nrew
    There is a tool in pen drive linux that allows you to boot directly with multiple iso files. And here is a sample in the menu.lst which allows you to choose which iso file you want to boot. title Fedora 13 find --set-root /Fedora-12-i686-L.iso map /ubuntu-10.04-desktop-i386.iso (0xff) map --hook root (0xff) kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/ubuntu-10.04-desktop-i386.iso splash initrd /casper/initrd.lz I'm just using it on my 8gb flash drive and the location of the iso file is in the flash drive itself. Is it possible to reference other locations. So that I could boot from it, without limitations. because the flash drive can only contain 8gb of data. Is it possible? Anyone here tried this before?

    Read the article

  • best way to switch between secure and unsecure connection without bugging the user

    - by Brian Lang
    The problem I am trying to tackle is simple. I have two pages - the first is a registration page, I take in a few fields from the user, once they submit it takes them to another page that processes the data, stores it to a database, and if successful, gives a confirmation message. Here is my issue - the data from the user is sensitive - as in, I'm using an https connection to ensure no eavesdropping. After that is sent to the database, I'd like on the confirmation page to do some nifty things like Google Maps navigation (this is for a time reservation application). The problem is by using the Google Maps api, I'd be linking to items through a unsecure source, which in turn prompts the user with a nasty warning message. I've browsed around, Google has an alternative to enterprise clients, but it costs $10,000 a year. What I am hoping is to find a workaround - use a secure connection to take in the data, and after it is processed, bring them to a page that isn't secure and allows me to utilize the Google Maps API. If any of you have a Netflix account you can see exactly what I would like to do when you sign-in, it is a secure page, which then takes you to your account / queue, on an unsecure page. Any suggestions? Thanks!

    Read the article

  • Link to audio in XHTML/EPUB

    - by wxs
    I'm looking into synchronizing an ebook in epub format (so the content is in XHTML) to an audio file. I'm thinking of putting something along the lines of: <a class="audiolink" href="sound.ogg?t=1093"></a> into the body of the document, and then have a custom epub reader that recognizes those tags and synchronizes the audio accordingly. That does seem like a bit of a hack to me though, especially the use of a special class name. Does anyone have any pointers to how this may be done in a more standards-compliant manner (or somewhere where it has been done before)? Ebooks with audio annotation seem like an idea that may already be out there.

    Read the article

  • .NET How would I build a DAL to meet my requirments?

    - by Jonno
    Assuming that I must deploy an asp.net app over the following 3 servers: 1) DB - not public 2) 'middle' - not public 3) Web server - public I am not allowed to connect from the web server to the DB directly. I must pass through 'middle' - this is purely to slow down an attacker if they breached the web server. All db access is via stored procedures. No table access. I simply want to provide the web server with a ado dataset (I know many will dislike this, but this is the requirement). Using asmx web services - it works, but XML serialisation is slow and it's an extra set of code to maintain and deploy. Using a ssh/vpn tunnel so that the one connects to the db 'via' the middle server, seems to remove any possible benefit of maintaining 'middle'. Using WCF binary/tcp removes the XML problem, but still there is extra code. Is there an approach that provides the ease of ssh/vpn, but the potential benefit of having the dal on the middle server? Many thanks.

    Read the article

  • Port android / android tv on nokia booklet 3G

    - by Suresh
    is it possible to port android (android tv) on Nokia booklet 3G , i like the booklet hardware (built in 3g modem and hdmi port and overall build) but windows 7 is horrible. it would be great to have android with android tv port on nokia booklet 3G any idea how to do?

    Read the article

  • What's the best way to calculate similarity between rows in a table based on association?

    - by André Pena
    Suppose each Person has a collection of favorite Books. So I have a table for: Person Book The association between Person and Book (joint table for MxN) I want to fetch the Persons that are similar to a Person1 based on the favorite Books overlaping. That is: The more books they have in common, the more they are similar. I don't have to use only SQL to solve this problem. I could use programming also. I'm using SQL Server 2008 and C#. What solution would you experts use?

    Read the article

  • What does this PHP (function/construct?) do, and where can I find more documentation on it?

    - by Rob
    Simple question. Here is this code. $r = rand(0,1); $c = ($r==0)? rand(65,90) : rand(97,122); $inputpass .= chr($c); I understand what it does in the end result, but I'd like a better explanation on how it works, so I can use it myself. Sorry if this is a bad question. If you're unsure of what I'm asking about, its the (function?) used here: $c = ($r==0)? rand(65,90) : rand(97,122);

    Read the article

  • Rails named_scope across multiple tables

    - by wakiki
    I'm trying to tidy up my code by using named_scopes in Rails 2.3.x but where I'm struggling with the has_many :through associations. I'm wondering if I'm putting the scopes in the wrong place... Here's some pseudo code below. The problem is that the :accepted named scope is replicated twice... I could of course call :accepted something different but these are the statuses on the table and it seems wrong to call them something different. Can anyone shed light on whether I'm doing the following correctly or not? I know Rails 3 is out but it's still in beta and it's a big project I'm doing so I can't use it in production yet. class Person < ActiveRecord::Base has_many :connections has_many :contacts, :through => :connections named_scope :accepted, :conditions => ["connections.status = ?", Connection::ACCEPTED] # the :accepted named_scope is duplicated named_scope :accepted, :conditions => ["memberships.status = ?", Membership::ACCEPTED] end class Group < ActiveRecord::Base has_many :memberships has_many :members, :through => :memberships end class Connection < ActiveRecord::Base belongs_to :person belongs_to :contact, :class_name => "Person", :foreign_key => "contact_id" end class Membership < ActiveRecord::Base belongs_to :person belongs_to :group end I'm trying to run something like person.contacts.accepted and group.members.accepted which are two different things. Shouldn't the named_scopes be in the Membership and Connection classes? One solution is to just call the two different named scope something different in the Person class or even to create separate associations (ie. has_many :accepted_members and has_many :accepted_contacts) but it seems hackish and in reality I have many more than just accepted (ie. banned members, ignored connections, pending, requested etc etc)

    Read the article

  • Getting current window on a popup (google chrome extension)

    - by Steinn
    Hi, i'm building a google chrome extension, and i'm trying to get the selected window in a popup. (i'm talking about the popup that shows when you click in the extesion icon). I try to use the documentation, but i didn't get it well. I tryied to use: chrome.windows.getCurrent(function(w) { chrome.windows.get(w.id, function (response){ alert(response.location.href); }); }); But didn't work. Any ideas? Thanks (sorry if the english is bad).

    Read the article

  • Portion of Screen Broke

    - by Devoted
    Hi, A portion of my laptop screen broke. Is there any kind of software that will just ignore that part and resize everything accordingly? It's like 1/6 of the screen on the right that makes anything over there impossible to see. If not, what would be the best programming language to go about making my own program? It is a PC but I can also run Ubuntu if that would be easier to make a program for.

    Read the article

  • GWT HorizontalPanel setSpacing?

    - by user37870
    Is there a way to setPadding on GWT HorizontalPanel. I wanted to just have 20px left padding and then add few buttons. Currently I can only add setSpacing() and that puts padding on top,left,right,bottom. -Thanks in advance!!

    Read the article

  • Anyone have any issues with using PLINQO and ASP.NET MVC 2.0?

    - by Chad
    I'm asking because I'm working on an ASP.NET MVC 1.0 site, thinking of upgrading to ASP.NET MVC 2.0. Then I read that PLINQO 5.0 was released (I had never heard of PLINQO before) and have been impressed with what PLINQO appears to be capable of. 1) Is PLINQO capable of building out an ASP.NET MVC 2.0 UI project when it's run? 2) Have you had any bad experiences using PLINQO (particularly in an ASP.NET MVC app)? Let me make sure I have the scenario right in my mind: Using PLINQO (assuming it supports ASP.NET MVC 2.0), I should be able to point it to my DB and it will create 3 projects: data, test, and mvc 2.0 UI? The data would contain LINQ to SQL queries, with the PLINQO extensions added in and the other projects setup to use the data project by default?

    Read the article

  • POCO inherited type could not pass addObject method

    - by bryanevil
    Hi all I am using a POCO class name "Company" generate from the T4 POCO code generator to create a derived class - name "CompanyBO" by "public class CompanyBO:Company", but when i call addObject method: public void Delete(T entity) { CustomerWebPortalEntities entities = new CustomerWebPortalEntities(); entities.AddObject(entity.GetType().BaseType.Name, entity); entities.DeleteObject(entity); SaveChanges(); } it compliant this: The EntitySet name 'CustomerWebPortalEntities.Company' could not be found. System.Data.Objects.ObjectContext.GetEntitySet(String entitySetName, String entityContainerName) at System.Data.Objects.ObjectContext.GetEntitySetFromName(String entitySetName) Could you please tell me whats going wrong here? How do I resolve this problem? Best Regards Bryan

    Read the article

  • grub crc error after decompressing linux

    - by w00t
    Hi, I have a debian with a raid1 on it. Both HDDs have bootable flags and grub setup in MBR. If I only start up with sda, linux boots. If I only start up with sdb, grub shows up and says Decompressing Linux... crc error -- System halted I have reinstalled grub a few times now but still nothing. It goes like this: /dev/md0 contains /dev/sda1 /dev/sdb1 find /boot/grub/stage1 shows (hd0,1) (hd0,1) The line that boots Linux shows: root (hd0,0) kernel /vmlinuz-2.6.26-1-686 initrd /initrd.img-2.6.26-1-686 This kind of renders my "redundant" array useless. Any clues? update: just to mention, these are 2 different HDDs, sda is 320gb and sdb is 400gb. Both are WD and both have exactly the same partitions, cloned using sfdisk.

    Read the article

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