Daily Archives

Articles indexed Sunday March 14 2010

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

  • Can I use my existing SSL certificates on a new server with Plesk?

    - by Wil
    We are migrating to a Virtual Private Server running on Ubuntu 8.04 LTS and with a Plesk configuration panel. We have some valid SSL certificates on the old server, which I would like to use on the new configuration. I have the CSR, private key, certificate and CA-certificate. I cannot find a way to change the CSR and private key in the Plesk configuration panel. Anyone know, if this is possible and how?

    Read the article

  • Alternative to arrow keys in Google Chrome location bar

    - by saltycrane
    I like Google Chrome because it is fast but I don't like using the arrow keys in the location bar to complete URLs. Is there any extension, or setting I'm missing, that allows me to use the Tab key (or other customizable key) for completion like in Firefox? I am an Emacs user and am aware of Conkeror. I just wanted to give Google Chrome a fair chance. Edit: I'm using version 4.0.266.0 on Linux.

    Read the article

  • Assertion failure when trying to write (INSERT, UPDATE) to sqlite database on iPhone.

    - by Mark McFarlane
    I have a really frustrating error that I've spent hours looking at and cannot fix. I can get data from my db no problem with this code, but inserting or updating gives me these errors: *** Assertion failure in +[Functions db_insert_answer:question_type:score:], /Volumes/Xcode/Kanji/Classes/Functions.m:129 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error inserting: db_insert_answer:question_type:score:' Here is the code I'm using: [Functions db_insert_answer:[[dict_question objectForKey:@"JISDec"] intValue] question_type:@"kanji_meaning" score:arc4random() % 100]; //update EF, Next_question, n here [Functions db_update_EF:[dict_question objectForKey:@"question"] EF:EF]; To call these functions: +(sqlite3_stmt *)db_query:(NSString *)queryText{ sqlite3 *database = [self get_db]; sqlite3_stmt *statement; NSLog(queryText); if (sqlite3_prepare_v2(database, [queryText UTF8String], -1, &statement, nil) == SQLITE_OK) { } else { NSLog(@"HMM, COULDNT RUN QUERY: %s\n", sqlite3_errmsg(database)); } sqlite3_close(database); return statement; } +(void)db_insert_answer:(int)obj_id question_type:(NSString *)question_type score:(int)score{ sqlite3 *database = [self get_db]; sqlite3_stmt *statement; char *errorMsg; char *update = "INSERT INTO Answers (obj_id, question_type, score, date) VALUES (?, ?, ?, DATE())"; if (sqlite3_prepare_v2(database, update, -1, &statement, nil) == SQLITE_OK) { sqlite3_bind_int(statement, 1, obj_id); sqlite3_bind_text(statement, 2, [question_type UTF8String], -1, NULL); sqlite3_bind_int(statement, 3, score); } if (sqlite3_step(statement) != SQLITE_DONE){ NSAssert1(0, @"Error inserting: %s", errorMsg); } sqlite3_finalize(statement); sqlite3_close(database); NSLog(@"Answer saved"); } +(void)db_update_EF:(NSString *)kanji EF:(int)EF{ sqlite3 *database = [self get_db]; sqlite3_stmt *statement; //NSLog(queryText); char *errorMsg; char *update = "UPDATE Kanji SET EF = ? WHERE Kanji = '?'"; if (sqlite3_prepare_v2(database, update, -1, &statement, nil) == SQLITE_OK) { sqlite3_bind_int(statement, 1, EF); sqlite3_bind_text(statement, 2, [kanji UTF8String], -1, NULL); } else { NSLog(@"HMM, COULDNT RUN QUERY: %s\n", sqlite3_errmsg(database)); } if (sqlite3_step(statement) != SQLITE_DONE){ NSAssert1(0, @"Error updating: %s", errorMsg); } sqlite3_finalize(statement); sqlite3_close(database); NSLog(@"Update saved"); } +(sqlite3 *)get_db{ sqlite3 *database; NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *copyFrom = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"/kanji_training.sqlite"]; if([fileManager fileExistsAtPath:[self dataFilePath]]) { //NSLog(@"DB FILE ALREADY EXISTS"); } else { [fileManager copyItemAtPath:copyFrom toPath:[self dataFilePath] error:nil]; NSLog(@"COPIED DB TO DOCUMENTS BECAUSE IT DIDNT EXIST: NEW INSTALL"); } if (sqlite3_open([[self dataFilePath] UTF8String], &database) != SQLITE_OK) { sqlite3_close(database); NSAssert(0, @"Failed to open database"); NSLog(@"FAILED TO OPEN DB"); } else { if([fileManager fileExistsAtPath:[self dataFilePath]]) { //NSLog(@"DB PATH:"); //NSLog([self dataFilePath]); } } return database; } + (NSString *)dataFilePath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; return [documentsDirectory stringByAppendingPathComponent:@"kanji_training.sqlite"]; } I really can't work it out! Can anyone help me? Many thanks.

    Read the article

  • How far does Dependency Injection reach?

    - by Baddie
    My web app solution consists of 3 projects: Web App (ASP.NET MVC) Business Logic Layer (Class Library) Database Layer (Entity Framework) I want to use Ninject to manage the lifetime of the DataContext generated by the Entity Framework in the Database Layer. The Business Logic layer consists of classes which reference repositories (located in the database layer) and my ASP.NET MVC app references the business logic layer's service classes to run code. Each repository creates an instance of the MyDataContext object from the Entity Framework Repository public class MyRepository { private MyDataContext db; public MyRepository { this.db = new MyDataContext(); } // methods } Business Logic Classes public class BizLogicClass { private MyRepository repos; public MyRepository { this.repos = new MyRepository(); } // do stuff with the repos } Will Ninject handle the lifetime of MyDataContext despite the lengthy dependency chain from the Web App to the Data Layer?

    Read the article

  • What are the preferred versions of Vim and Emacs on Mac OS X?

    - by Michiel de Mare
    For those of us that like to use the graphical version of Vim or Emacs, instead of the console version, which version do you recommend? For Vim, there's Mac OS X Vim, MacVim, Vim-Cocoa. For Emacs, CarbonEmacs, XEmacs, and Aquamacs. Are there more? Which of these are ready for prime-time? If it's a tough call, what are the trade-offs? Are all of these still being maintained? No discussion of Vim vs. Emacs, if you don't mind, or comparisons with other editors.

    Read the article

  • What are the Tags Around Default iPhone Address Book People Phone Number Labels?

    - by rnistuk
    My question concerns markup that surrounds some of the default phone number labels in the Person entries of the Contact list on the iPhone. I have created an iPhone contact list address book entry for a person, "John Smith" with the following phone number entries: Mobile (604) 123-4567 iPhone (778) 123-4567 Home (604) 789-4561 Work (604) 456-7891 Main (604) 789-1234 megaphone (234) 567-8990 Note that the first five labels are default labels provided by the Contacts application and the last label, "megaphone", is a custom label. I wrote the following method to retrieve and display the labels and phone numbers for each person in the address book: -(void)displayPhoneNumbersForAddressBook { ABAddressBookRef book = ABAddressBookCreate(); CFArrayRef people = ABAddressBookCopyArrayOfAllPeople(book); ABRecordRef record = CFArrayGetValueAtIndex(people, 0); ABMultiValueRef multi = ABRecordCopyValue(record, kABPersonPhoneProperty); NSLog(@"---------" ); NSLog(@"displayPhoneNumbersForAddressBook" ); CFStringRef label, phone; for (CFIndex i = 0; i < ABMultiValueGetCount(multi); ++i) { label = ABMultiValueCopyLabelAtIndex(multi, i); phone = ABMultiValueCopyValueAtIndex(multi, i); NSLog(@"label: \"%@\" number: \"%@\"", (NSString*)label, (NSString*)phone); CFRelease(label); CFRelease(phone); } NSLog(@"---------" ); CFRelease(multi); CFRelease(people); CFRelease(book); } and here is the output for the address book entry that I entered: 2010-03-08 13:24:28.789 test2m[2479:207] --------- 2010-03-08 13:24:28.789 test2m[2479:207] displayPhoneNumbersForAddressBook 2010-03-08 13:24:28.790 test2m[2479:207] label: "_$!<Mobile>!$_" number: "(604) 123-4567" 2010-03-08 13:24:28.790 test2m[2479:207] label: "iPhone" number: "(778) 123-4567" 2010-03-08 13:24:28.791 test2m[2479:207] label: "_$!<Home>!$_" number: "(604) 789-4561" 2010-03-08 13:24:28.791 test2m[2479:207] label: "_$!<Work>!$_" number: "(604) 456-7891" 2010-03-08 13:24:28.792 test2m[2479:207] label: "_$!<Main>!$_" number: "(604) 789-1234" 2010-03-08 13:24:28.792 test2m[2479:207] label: "megaphone" number: "(234) 567-8990" 2010-03-08 13:24:28.793 test2m[2479:207] --------- What are the markup characters _$!< and >!$_ surrounding most, save for iPhone, of the default labels for? Can you point me to where in the "Address Book Programming Guide for iPhone OS" I can find the information? Thank you for your help.

    Read the article

  • Maximizing the number of true concurrent / parrallel http requests in Silverlight

    - by Clems
    Hi all. I'm using SL 4 beta and my app needs to do a lot of small http requests to the server. I believe that when exceeding the number of allowed concurrent requests, the subsequent requests are put in a queue. I am also aware that SL 4 has both a http browser stack and a http client stack, with both different limit in terms of the number of concurrent requests. Let's say call those limits MAX_BROWSER and MAX_CLIENT. Also I think I read somewhere that the number of concurrent requests is limited per domain, not overall. But I'm sure if this applies to both the http client stack. That means that you CAN have MAX_BROWSER requests to domain1.com AND MAX_BROWSER requests to domain2.com at the same time. And I even believe that sub domains are considered different so you can also have MAX_BROWSER requests to domain1.com AND MAX_BROWSER requests to sub.domain1.com at the same time. I have ownership of the services and domain names so I could easily setup sub domains for my services. Given those considerations I'm trying to optimize the number of concurrent http requests to my server. Here are few questions ? Is is possible to use both stack at the same time ? Is the subdomain/domain story true for both stacks ? None ? If so that would mean that I could potentially have a number of concurrent requests equal to : (MAX_BROWSER + MAX_CLIENT) * NUMBER_OF_DOMAINS which would be fairly good. Is this correct ? I'm kind of sharing my morning thoughts here, hoping somebody has experimented with those things. Thank you.

    Read the article

  • How to bind an ip address to telnetlib in Python

    - by jack
    The code below binds an ip address to urllib, urllib2, etc. import socket true_socket = socket.socket def bound_socket(*a, **k): sock = true_socket(*a, **k) sock.bind((sourceIP, 0)) return sock socket.socket = bound_socket Is it also able to bind an ip address to telnetlib?

    Read the article

  • Prefuse: Reloading of XML files

    - by John
    Hello all, I am a new to the prefuse visualization toolkit and have a couple of general questions. For my purpose, I would like to perform an initial visualization using prefuse (graphview / graphml). Once rendered, upon a user click of a node, I would like to completely reload a new xml file for a new visualization. I want to do this in order to allow me to "pre-package" graphs for display. For example. If I search for Ted. I would like to have an xml file relating to Ted load and render a display. Now in the display I see that Ted has nodes associated called Bill and Joe. When I click Joe, I would like to clear the display and load an xml file associated with Joe. And so on. I have looked into loading one very large xml file containing all node and node relationship info and allowing prefuse to handle this using the hops from one level to another. However, eventually I am sure that system performance issues will arise due to the size of data. Thanks in advance for any help, John

    Read the article

  • How to follow user location with MapKit

    - by Bloudermilk
    I'm using MapKit to display the user's location relative to pins around them. I'd like to be able to mimic the functionality that Maps provides via the crosshair button in the lower left-hand corner of the screen. I'm already aware that MapKit provides a CLLocation object with the user's location via MKUserLocation, I just wanted to seek advice on how I should keep focus on that location. My initial inclination was to use an NSTimer to center the map on that coordinate every 500ms or so. Is there a better way to do this? Is there something built in to MapKit that I'm missing that will accomplish this? Thanks so much, Brendan

    Read the article

  • parent process, and a child process..

    - by icelated
    I am trying to write a program that The parent process will take the arguments to main() and send the characters in them one at a time to the child process through a pipe (one call to write for each character). The child process will count the characters sent to it by the parent process and print out the number of characters it received from the parent. The child process should not use the arguments to main() in any way whatsoever. The child should return normally and not have the parent kill the child. Am i counting the arguments right? am i sending the arguments in one at a time, and am i reaping the child? #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #define size = 100; int main(int argc, char *argv[]) { int i, count =0; int c; int fdest[2]; // for pipe pid_t pid; //process IDs char buffer[BUFSIZ]; if (pipe(fdest) < 0) /* attempt to create pipe */ perror( "pipe" ); if ((pid = fork()) < 0) /* attempt to create child / parent process */ { perror( "fork" ); } /* parent process */ else if (pid > 0) { close(fdest[0]); for (i=1; i < argc; ++i) { for (c=0; c < strlen(argv[i]); ++c) { write(fdest[1], &argv[i][c], 1); } } close(fdest[1]); wait(NULL); exit(0); } else { /* child Process */ close(fdest[1]); while (read(fdest[0], &buffer, 1) > 0) { count++; } printf("\nchild: counted %d characters\n", count); } wait(NULL); exit(0); }

    Read the article

  • Is there any benefit to encrypting twice using pgp?

    - by ojblass
    I am asking from a "more secure" perspective. I can imagine a scenario with two required private keys needed for decryption scenarios that may make this an attractive model. This is to settle an argument. My vote is that it is not adding any additional security other than having to compromise two different private keys. I think that if it was any more secure than encrypting it one million times would be the best way to secure informaiton and I don't buy it. So I guess my question becomes is a two locking mechanism equivalent to another one locking mechanism with a single key? Update: Forgive me if the answer is obvious but my bread goes dead as I read books on the topic.

    Read the article

  • Dell Inspiron 1520 Intermittent connection to wireless router

    - by ChuckNevol
    I have two computers in my home which are connected to a wireless router and a wireless printer. One computer is a Del XPS and the other a Dell laptop Inspiron 1520. In recent weeks we noticed the Inspiron had difficulty maintaining connection to the wireless router - web pages would suddenly have to be reloaded, or the computer rebooted while the other computer, the XPS, had no problems on the same network. So we connected a hard wire line from the Inspiron to the Verizon supplied wireless router. Problems still exist. could it be a bad driver?

    Read the article

  • Why would my 15" MacBook Pro suddenly ask me to Hard Quit while I was in a browser?

    - by flathead27ford
    I was in Firefox looking at a search I had performed in eBay and all of a sudden, the screen grayed out starting from the top down. In the middle of the screen was a box with about 5 different languages saying I had to hard quit my computer. I tried other keys on my computer and nothing was working so I hard quit and restarted. Can anyone tell me why this happened? Cheers, Kyle

    Read the article

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