Search Results

Search found 3362 results on 135 pages for 'guy ben moshe'.

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

  • 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

  • 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

  • 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

  • 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

  • Some Networking questions with Airport...

    - by Moshe
    Is it possible to to connect to multiple networks at the same time using the AirPort wireless card on my iMac 21.5"? Can I connect to an ethernet-based network at the same time as I'm connected to one (or more) wireless networks? Can I share files directly between a PC and Mac via ethernet? How so? Thanks.

    Read the article

  • Magic Mouse and Alum keyboard autosleep?

    - by Moshe
    How does the power management of the wireless keyboard and magic mouse work with iMac? (late 2009) Do I need to manually power off the keyboard and mouse when I shut off my Mac or do they power off/sleep automatically? ( BONUS: How often should the batteries be replaced? )

    Read the article

  • Force Capistrano to ask for password

    - by Moshe Katz
    I am deploying using Capistrano to a new server and having the following issue. Currently, I cannot add an SSH key to the server to log in with so I must use password authentication. However, I do have a key for another server saved in my local user account's .ssh directory. Here is the error I get when I try to log in: C:\Web\CampMaRabu>cap deploy:setup * executing `deploy:setup' * executing "mkdir -p /home2/webapp1 /home2/webapp1/releases /home2/webapp1/shared /home2/webapp1/shared/system /home2/webapp1/shared/log /home2/webapp1/shared/pids" servers: ["myserver.example.com"] connection failed for: myserver.example.com (OpenSSL::PKey::PKeyError: not a public key "C:/Users/MyAccount/.ssh/id_rsa.pub") How can I get Capistrano to ignore the existence of the key I have and let me log in with a password instead? I tried adding set :password, "myp@ssw0rd" to deploy.rb and it didn't help.

    Read the article

  • I'm looking for a hebrew font

    - by Moshe
    I'm looking for a (preferably free) hebrew font that the letter ? ("Chet"/"Ches") is shaped like the upper half of the letter "s" and is not a script font. The letter ? (lamed) should be shaped like a printed one, not have a loop on the bottom. Thanks.

    Read the article

  • Lenovo Windows XP Reinstall Driver help

    - by Moshe
    I'm reinstalling Windows on an IBM Thinkpad T43. (Not T43p) I reinstalled the OS and now there a number of drivers that I need to reinstall. Any help would be appreciated. I've been to Lenovo's website. This would be a breeze but the Device Manager lists 2 Unknown devices. How do I figure out what those are?

    Read the article

  • Help with router and spotty wireless...

    - by Moshe
    Time Warner Cable/ Road Runner router shows up some times on the network list on Mac OS X 10.6.3 Snow Leopard. It makes a spotty appearence on the list. The router is a SMC Networks Model # SMC8014WG-SI. The default gateway numbers all do not work. 192.168.0.1 192.168.1.1 192.168.2.1 10.10.10.1 What IP adress am I looking for here to log in to the router to fix the issue?

    Read the article

  • Networking OSX 10.6 and Vista via ethernet?

    - by Moshe
    How can I make Vista home premium access OS X hard drive? and the other way around? I'd like to transfer files via direct ethernet. Plugging in an ethernet cable makes both computers recognize a network, but not the other device. Each firewall is turned off, but no luck. Edit: I don't see Windows Sharing in the Service Column.

    Read the article

  • File association and msconfig broken. Malware?

    - by Moshe
    A friend of mine had an Acer laptop. It has Vista Home Basic. I can't get system properties open. Msconfig does not run. Also, exe filetype is asking me what program to run it with. How can I fix that? I'm running AVG now. Assuming nothing shows up, what are fixes to the above mentioned issues?

    Read the article

  • Getting started with a new iMac...

    - by Moshe
    I'm on my first Apple computer, a shiny new 21.5" iMac. I am not unfamiliar with OS X as I have been using a borrowed MacBook for a few months. Considering that this is my machine, I am more comfortable "settling in". I would like to get recommendations for software to install on it, other possible uses and whatnot. I bought it primarily for iPhone development, but I make videos on my beast of a PC using Adobe Premiere CS3. What software is recommended for me to download for the aforementioned as well as photo editing, graphic design and web design? Bear in mind that this machine will NOT have steady internet access and that I'm looking for freeware only. THANKS!

    Read the article

  • Install OS X 10.5 on Intel 1GB Macbook

    - by Moshe
    I'm trying to install Mac OS X 10.5 on a MacBook that previously had 10.4 on it. i am getting an error after selecting the language. What could be causing a box on the screen that says: Mac OS X cannot be installed on this computer. It's an Intel MacBook with 1GB of DDR2 memory. 80GB hard drive. It has been formatted now, so there's no going back. According to the System Profiler on the 10.5 boot CD, the MacBook is version MacBook2,1. Thanks!

    Read the article

  • Bad ways to secure wireless network c

    - by Moshe
    I was wondering if anybody had any thoughts on this, as I recently saw a Verizon DSL network set up where the WEP key was the last 8 characters of the router's MAC address. (It's bad enough that hey were using WEP in the first place...)

    Read the article

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