Search Results

Search found 1679 results on 68 pages for 'ben rose'.

Page 8/68 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Authenticating stackoveflow programatically - OpenID

    - by Ben Reeves
    I would like to add up and down voting to my iPhone appilcation - MyStacks, for this I need the to be able to authenticate the user with SO. I'm look at adapting the Twitter-OAuth-iPhone library. However The problem I have is obtaining the consumer and secret key. to use OAuth, do I need to obtain a different key for each provider? In order to obtain a consumer key from google the application needs to have a domain name, but this being an iPhone app of course i don't have one, does this mean that I can't use OAuth? Is there any other way to programatically authenticate SO? Thanks, Ben

    Read the article

  • IDbTransaction Rollback Timeout

    - by Ben
    I am dealing with an interesting situation where I perform many database updates in a single transaction. If these updates fail for any reason, the transaction is rolled-back. IDbTransaction transaction try { transaction = connection.BeginTransaction(); // do lots of updates (where at least one fails) transaction.Commit(); } catch { transaction.Rollback(); // results in a timeout exception } finally { connection.Dispose(); } I believe the above code is generally considered the standard template for performing database updates within a transaction. The issue I am facing is that whilst transaction.Rollback() is being issued to SQL Server, it is also timing out on the client. Is there anyway of distinguishing between a timeout to issue the rollback command and a timeout on that command executing to completion? Thanks in advance, Ben

    Read the article

  • Wrap link around links in tweets with php preg_replace

    - by Ben Paton
    Hello I'm trying to display the latest tweet using the code below. This preg_replace works great for wrapping a link round twitter @usernames but doesn't work for web addresses in tweets. How do I get this code to wrap links around urls in tweets. <?php /** Script to pull in the latest tweet */ $username='fairgroceruk'; $format = 'json'; $tweet = json_decode(file_get_contents("http://api.twitter.com/1/statuses/user_timeline/{$username}.{$format}")); $latestTweet = htmlentities($tweet[0]->text, ENT_QUOTES); $latestTweet = preg_replace('/@([a-z0-9_]+)/i', '<a href="http://twitter.com/$1" target="_blank">@$1</a>', $latestTweet); $latestTweet = preg_replace('/http://([a-z0-9_]+)/i', '<a href="http://$1" target="_blank">http://$1</a>', $latestTweet); echo $latestTweet; ?> Thanks for the help, Ben

    Read the article

  • LINQ to SQL Translation

    - by Ben
    Hi, Depending on how I map my linq queries to my domain objects, I get the following error The member 'member' has no supported translation to SQL. This code causes the error: public IQueryable<ShippingMethod> ShippingMethods { get { return from sm in _db.ShippingMethods select new ShippingMethod( sm.ShippingMethodID, sm.Carrier, sm.ServiceName, sm.RatePerUnit, sm.EstimatedDelivery, sm.DaysToDeliver, sm.BaseRate, sm.Enabled ); } } This code works fine: public IQueryable<ShippingMethod> ShippingMethods { get { return from sm in _db.ShippingMethods select new ShippingMethod { Id = sm.ShippingMethodID, Carrier = sm.Carrier, ServiceName = sm.ServiceName, EstimatedDelivery = sm.EstimatedDelivery, DaysToDeliver = sm.DaysToDeliver, RatePerUnit = sm.RatePerUnit, IsEnabled = sm.Enabled, BaseRate = sm.BaseRate }; } } This is my testmethod I am testing with: [TestMethod] public void Test_Shipping_Methods() { IOrderRepository orderRepo = new SqlOrderRepository(); var items = orderRepo.ShippingMethods.Where(x => x.IsEnabled); Assert.IsTrue(items.Count() > 0); } How does the way in which I instantiate my object affect the linq to sql translation? Thanks Ben

    Read the article

  • ASP.NET MVC Session usage

    - by Ben
    Currently I am using ViewData or TempData for object persistance in my ASP.NET MVC application. However in a few cases where I am storing objects into ViewData through my base controller class, I am hitting the database on every request (when ViewData["whatever"] == null). It would be good to persist these into something with a longer lifespan, namely session. Similarly in an order processing pipeline, I don't want things like Order to be saved to the database on creation. I would rather populate the object in memory and then when the order gets to a certain state, save it. So it would seem that session is the best place for this? Or would you recommend that in the case of order, to retrieve the order from the database on each request, rather than using session? Thoughts, suggestions appreciated. Thanks Ben

    Read the article

  • GXT/GWT html content reloads when switching tabs

    - by Ben
    I am working on a GXT/GWT project. I have two tabs in which content is set based on selections from a drop down menu. The content in one tab is an embedded video (Google Video or youtube video) The problem is that when switching tabs, the video reloads and starts from the beginning again. What I would like is to be able to switch tabs and have the video continue to play or pause when the focus switches to another tab. Any ideas, as always, are greatly appreciated. Cheers, Ben

    Read the article

  • Rails - Override primary key on has_one

    - by Ben Hall
    I have the following associations, basically I want to link via userid and not the id of the object. class Tweet < ActiveRecord::Base has_one :user_profile, :primary_key = 'userid', :foreign_key = 'twitter_userid' class UserProfile < ActiveRecord::Base belongs_to :tweet, :foreign_key = 'userid' However the following spec fails as twitter_userid is reset to the id of the object it "should have the user's twitter id set on their user profile" do t = Tweet.new(:twitter_id = 1, :status = 'Tester', :userid = 'personA', :user_profile = UserProfile.new(:twitter_userid = 'personA', :avatar = 'abc')) t.save! t.user_profile.twitter_userid.should == 'personA' end should have the user's twitter id set on their user profile expected: "personA", got: 216 (using ==) However, the following does pass: it "should return the correct avatar after being saved" do t = Tweet.new(:twitter_id = 1, :status = 'Tester', :userid = 'personA', :user_profile = UserProfile.new(:twitter_userid = 'personA', :avatar = 'abc')) t.save! t.user_profile.avatar.should == 'abc' end How can I force it to use userid and not id? Thanks Ben

    Read the article

  • How to display some data differnetly than it is stored.

    - by Ben
    Hello, I seem to have a problem that I can't find a solution for. I have a table that has this format. projectId | departmentId | plan | ETC | month | year | ID But, I need to find a way to take that data and display it like this. Since this is my first time here I can't upload an image, but you can view it here. http://img85.imageshack.us/img85/8253/image004y.png Is this something a gridview can handle, or a repeater, or something else? Thank you. Ben

    Read the article

  • CLR Function not working in restored database

    - by Ben Thul
    So I've restore a database with CLR assemblies in it from one physical server to another. One of the functions in the CLR assembly essentially does an uncompress of some compressed data. When I run this function against data in the restored database it returns the compressed data (rather than the uncompressed data). No error is thrown in SSMS or in the SQL server error logs. At the suggestion of others, I've checked differences in the database ownership (both owned by sa), trustworthiness (both set to not trustworthy). I also checked differences in the .NET framework installs on both machines but found only that the target machine had a 1.1 version installed that the source didn't. I don't know what else to try. Any suggestions would be most appreciated. Thanks in advance. Thanks in advance, Ben

    Read the article

  • real time updates for new page events

    - by Ben Ford
    I know there's a few questions knocking around on this topic but none quite the same. I'm currently searching by location for all the pages relating to a particular geographic location and caching their events in a database. The problem being I have to currently loop through all the pages i'm watching frequently to check for updates. At the moment the 10,000 Pages I'm keeping track of takes a good while to update. It would be much neater (and nicer to fb) to be notified instead of polling. Does anyone know of a more efficient to do this? Thanks Ben

    Read the article

  • Possible to distribute an MPI (C++) program accross the internet rather than within a LAN cluster?

    - by Ben
    Hi there, I've written some MPI code which works flawlessly on large clusters. Each node in the cluster has the same cpu architecture and has access to a networked (i.e. 'common') file system (so that each node can excecute the actual binary). But consider this scenario: I have a machine in my office with a dual core processor (intel). I have a machine at home with a dual core processor (amd). Both machines run linux, and both machines can successfully compile and run the MPI code locally (i.e. using 2 cores). Now, is it possible to link the two machines together via MPI, so that I can utilise all 4 cores, bearing in mind the different architectures, and bearing in mind the fact that there are no shared (networked) filesystems? If so, how? Thanks, Ben.

    Read the article

  • How can I test if a point lies within a 3d shape with its surface defined by a point cloud?

    - by Ben
    Hi I have a collection of points which describe the surface of a shape that should be roughly spherical, and I need a method with which to determine if any other given point lies within this shape. I've previously been approximating the shape as an exact sphere, but this has proven too inaccurate and I need a more accurate method. Simplicity and speed is favourable over complete accuracy, a good approximation will suffice. I've come across techniques for converting a point cloud to a 3d mesh, but most things I have found have been very complicated, and I am looking for something as simple as possible. Any ideas? Many thanks, Ben.

    Read the article

  • Best way to implement a List(Of) with a maximum number of items

    - by Ben
    I'm trying to figure out a good way of implementing a List(Of) that holds a maximum number of records. e.g. I have a List(Of Int32) - it's being populated every 2 seconds with a new Int32 item. I want to store only the most current 2000 items. How can I make the list hold a maximum of 2000 items, then when the 2001'th item is attempted to be added, the List drops the 2000'th item (resulting in the current total being 1999). Thing is, I need to make sure I'm dropping only the oldest item and adding a new item into the List. Ben

    Read the article

  • Handling bounced email when using a postfix smarthost

    - by Mark Rose
    I'm running a high availability cluster, and so far, most things work great. I have two external machines that act as outgoing mail hosts (smarthosts). The internal hosts are configured to relay all email through these two external facing hosts. My smarthosts' main.cf looks like this: myhostname = lb1.example.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = lb1.example.com, localhost relayhost = mynetworks = 127.0.0.0/8 10.1.248.0/24 My internal hosts' main.cf looks like this: mynetworks = 127.0.0.0/8 myhostname = web1.example.com mydestination = $myhostname, localhost.$mydomain, localhost relayhost = [10.1.248.3] smtp_fallback_relay = [10.1.248.2] lb1's internal IP is 10.1.248.2, and lb2's internal IP is 10.1.248.3. On the external hosts, email for root and www-data is forwarded to [email protected] with /etc/aliases. One advantage to using the smarthost setup is that spam filters and the like can connect back to the sending sending server. All email is sent fine, and headers look like this: Received: from lb2.example.com ([198.51.100.3]) by mx.google.com with ESMTP id y17si1571259icb.76.2011.01.13.18.20.32; Thu, 13 Jan 2011 18:20:32 -0800 (PST) Received-SPF: neutral (google.com: 198.51.100.3 is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=198.51.100.3; Received: from db1.example.com (unknown [10.1.248.20]) by lb2.example.com (Postfix) with ESMTP id D364823C0BE for <[email protected]>; Thu, 13 Jan 2011 21:20:31 -0500 (EST) Received: by db1.example.com (Postfix) id C9FA7760D6A; Thu, 13 Jan 2011 21:20:31 -0500 (EST) Delivered-To: www-data@localhost Received: by db1.example.com (Postfix, from userid 0) id C1632760D6C; Thu, 13 Jan 2011 21:20:31 -0500 (EST) The problem is bounced/reject email. The external machine tries to forward the email back to the internal machine, e.g. www-data on web1 sending an email that bounces (such as a user signing up with a bad email address). An additional complication is using Google mail for the main example.com domain. In lieu of specifying every internal host in the external hosts' mydestination, is there a better way of setting things up, keeping in mind I can't adjust touch the mx for example.com?

    Read the article

  • Latency between IIS and SQL on same physical, two VMs

    - by Jerad Rose
    I have a single server (2x4 core CPUs, 32GB ram), that is a Windows Server 2012 Hyper V host, and it hosts two guest VMs (also Windows Server 2012 instances). One of them is a web server, the other is a SQL server. When hitting a page that loops over 50 records, there is noticeable latency. I capture/report the timings of each iteration on the loop, and each iteration is about 20-30 milliseconds. Of course, this amounts to over a second of latency for the whole loop. I thought maybe SQL needed to be tuned, but running profiler on it, the queries are showing almost 0 duration, so it seems the bottleneck is in transit between the two VMs. I have both VMs configured to use the actual NIC (vs. using a VNIC), so maybe that's part of my problem. Also, this is a classic ASP site, so it's using the SQL OLE DB provider, and I'm wondering if that is part of the problem. This is a new server setup, from an existing Windows 2003/IIS6 server setup where both web and DB run on the same server instance (no virtualization). On that setup, there is no such latency when looping over the cursor like this. But there are so many variables, I'm not sure where to start ruling things out.

    Read the article

  • Windows-Server-2003 setup on Dell-PowerEdge R310 is hanging [closed]

    - by Robert Rose
    Possible Duplicate: Problems installing OS on Dell PowerEdge R410 I am trying to configure a Dell PowerEdge R310 server with Windows Server 2003. I've already configured the two hard drives as RAID1. The HD controller is PERC H700 Integrated and Adapter. Trying to stay with Windows Server 2003 on this fairly new server to save on cost and keep the configuration the same as my old server, which has been running like a champ for five years. Problem: During the OS installation, after everything has been copied from the installation CD, the installation hangs at a window labeled 'Windows Setup' with the message 'Setup is starting Windows' at the bottom. I'm wondering if this is a driver problem and if so, where can I get the drivers for the R310 or where can I get the media for the latest version of Windows Server 2003 which may include the necessary drivers? Will certainly appreciate some help here.

    Read the article

  • Trying to script rsync using pam_exec

    - by Ricky-Rose
    I'm trying to write a bash script that will execute rsync when called by pam_exec. I've tried a couple different ways, and I'm not sure what I'm doing wrong. When I try to run the script at login by adding session optional pam_exec.so /usr/bin/local/sync.sh to my sshd file, it gives me an exit code of 12. if I log in and then manually run my script, it allows me to connect to the remote server, and it lists my files, but it doesn't actually sync anything. I have tried the code below using buth $USER and $PAM_USER. $PAM_USER doesn't work at all. #!/bin/sh rsync -azv -e ssh $USER@remote_server:/home/html/$USER/ /home/html/$USER

    Read the article

  • Mysql connections hanging in login state

    - by Mark Rose
    Suddenly today, I had an issue with connections to mysql hanging when connecting by IP address (e.g. mysql -h 10.1.248.20), but I could still connection using localhost fine, regardless the user. mysql> show processlist; +----+----------------------+------------------+------+---------+------+-----------------------------------------------------------------------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+----------------------+------------------+------+---------+------+-----------------------------------------------------------------------+------------------+ | 1 | system user | | NULL | Connect | 10 | Connecting to master | NULL | | 2 | system user | | NULL | Connect | 10 | Has read all relay log; waiting for the slave I/O thread to update it | NULL | | 37 | unauthenticated user | 10.1.248.3:36694 | NULL | Connect | NULL | login | NULL | | 38 | unauthenticated user | 10.1.248.3:36695 | NULL | Connect | NULL | login | NULL | | 39 | unauthenticated user | 10.1.248.3:36696 | NULL | Connect | NULL | login | NULL | | 40 | root | localhost | NULL | Query | 0 | NULL | show processlist | +----+----------------------+------------------+------+---------+------+-----------------------------------------------------------------------+------------------+ 6 rows in set (0.00 sec) Yes, I realize replication was broken in that output above; that was after I tried restart MySQL (it was an emergency). And as suddenly as things stopped working, they started working again. DNS was working fine at the time. Replication was still working. MySQL was responsive. Does anyone have any idea what would cause MySQL logins from remote IPs to hang suddenly?

    Read the article

  • Soft links between samba profile and profile.V2

    - by Alex Rose
    I am currently using a samba server to host windows sessions. For the moment, every machine runs windows XP, but in an upcoming hardware upgrade, I will have new Windows 7 machines installed. The problem is that the user directory changed from XP to 7 (for instance 'My Documents' became 'Documents'). To solve that, samba created a folder called profile.V2, which contains files and folders for Windows 7. Now I would like to link the two profiles folders ('profile' from windows XP, 'profile.V2' from windows 7) so that a user can logon from a XP or 7 machine and still have access to the same files. I tried to create softlinks between folder pairs ('Documents' -­­ 'My documents') and it seems to work. My question is : is it likely to create issues in the future?

    Read the article

  • How to launch Google Chrome Application Shortcuts in Linux?

    - by Michael Rose
    I've got Chrome running on my Linux netbook, it's great and, unlike the Mac version, the 'Create Application Shortcut' option isn't greyed out. So I created one for Gmail. The 'applications' get stored at ~/.local/share/applications but I haven't managed to launch it yet. If I use Chrome in terminal $ google-chrome ~/.local/share/applications/google-application-reallylong-randomname.thing It opens the file in a new tab in Chrome and helpfully downloads it for me! Anyone got application shortcuts working in Linux?

    Read the article

  • linux: per-process monitor, every 10 minutes, with history access

    - by Inbar Rose
    I really didn't know a better way to ask my question, hence you get a horribly named question. I will explain what i want to do, maybe that will help you help me. I would like to have my linux machine continuously monitor (every 10 minutes) all the processes on my machine. The information from each process that I require is the name, CPU usage, allocated (virtual) memory, and resident (ram) memory. If these periodic reports were to be looked at, they would look something like this: PROCESS CPU RAM VIRTUAL name1 % MB MB name2 % MB MB ...etc..etc These reports should be stored in such a way that I can access them at a later date by giving a date/time scope (range). For instance, if I want to see the history of my processes from 12:00:00 1.12.12 till 12:00:00 2.12.12 I can - and it should give me the history of the processes for every 10 minutes between those date/time borders. The format of the return is not important, that will be handled by a script anyway and can be modified into anything I need. I have looked into a few things so far, but have not found something that clearly meets my needs. Among the things i searched: sar, free(1), top(1).. and a few other things. It should be a simple issue, i can already see all this information by simply looking at my htop, but i need only a tool that will gather the desired fields for me for each processes every 10 minutes, and then also let me extract slices of that data based on date/time scopes (ranges). note: I have limited experience with linux, so please give detailed information. note2: The desired output will be something like this (after receiving the desired range) CPU USAGE BY PROCESS: proc_nameA 1,2,2,2,2,2...... numbers represent % usage every 10 minutes... proc_nameB 4,3,3,6,1,2...... The same idea with the other information.

    Read the article

  • How to target specific letter/word with jquery?

    - by Gal
    As a mere example, I want to apply the class "fancy" to all occurrences of the sign "&" in the document. The CSS: .fancy { font-style: italic; } So a text that looks like this: Ben & Jerry's would be manipulated by jquery to this: Ben <span class="fancy">&</span> Jerry's Is there a function to target specific words/phrases/letters like this?

    Read the article

  • How to merge two single column csv files with linux commands

    - by user1328191
    I was wondering how to merge two single column csv files into one file where the resulting file will contain two columns. file1.csv    first_name    chris    ben    jerry file2.csv    last_name    smith    white    perry result.csv    first_name,last_name    chris,smith    ben,white    jerry,perry Thanks

    Read the article

  • Combining Searchlogic named scopes with OR

    - by jaycode
    Is something like this possible? Product.price_greater_than(10000).or_tags_name_equals('luxury') The wiki doesn't help much on this... I saw in the wiki: User.id_or_age_lt_or_username_or_first_name_begins_with(10) => "id < 10 OR age < 10 OR username LIKE 'ben%' OR first_name like'ben%'" I really don't get that, how in the world did "ben" comes up??? could anyone help please?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >