Daily Archives

Articles indexed Saturday January 1 2011

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

  • How can i fetch the large image from url

    - by Kutbi
    i used below code to fetch the image from url.but its not working for large image.. i missing something to add for that type of image to fetch. imgView = (ImageView)findViewById(R.id.ImageView01); imgView.setImageBitmap(loadBitmap("http://www.360technosoft.com/mx4.jpg")); //imgView.setImageBitmap(loadBitmap("http://sugardaddydiaries.com/wp-content/uploads/2010/12/how_do_i_get_sugar_daddy.jpg")); //setImageDrawable("http://sugardaddydiaries.com/wp-content/uploads/2010/12/holding-money-copy.jpg"); //Drawable drawable = LoadImageFromWebOperations("http://www.androidpeople.com/wp-content/uploads/2010/03/android.png"); //imgView.setImageDrawable(drawable); /* try { ImageView i = (ImageView)findViewById(R.id.ImageView01); Bitmap bitmap = BitmapFactory.decodeStream((InputStream)new URL("http://sugardaddydiaries.com/wp-content/uploads/2010/12/holding-money-copy.jpg").getContent()); i.setImageBitmap(bitmap); } catch (MalformedURLException e) { System.out.println("hello"); } catch (IOException e) { System.out.println("hello"); }*/ } protected Drawable ImageOperations(Context context, String string, String string2) { // TODO Auto-generated method stub try { InputStream is = (InputStream) this.fetch(string); Drawable d = Drawable.createFromStream(is, "src"); return d; } catch (MalformedURLException e) { e.printStackTrace(); return null; } catch (IOException e) { e.printStackTrace(); return null; } }

    Read the article

  • Remote XML retrieval

    - by rrrfusco
    I'm retrieving a remote XML file with wget -O remotefile localfile with a cron tab. Every so often the local file becomes malformed probably because of double whitespace (according to firefox) between the CDATA tags. Sometimes the parser gives an error for ' > ' missing, but upon checking the xml file the ' > ' exists... The remote xml file never gives malformed errors when called in the url. EDIT It seems CDATA is not parsed by the xml parser. (w3schools) Is there a way to set wget to retain wellformed XML? If not wget, What is a good way to continously retrieve a remote XML file and keep it well formed?

    Read the article

  • EHsc vc EHa (synchronous vs asynchronous exception handling)

    - by watson1180
    Could you give a bullet list of practical differences/implication? I read relevant MSDN article, but my understanding asynchronous exceptions is still a bit hazy. I am writing a test suite using Boost.Test and my compiler emits a warning that EHa should be enabled: warning C4535: calling _set_se_translator() requires /EHa The project itself uses only plain exceptions (from STL) and doesn't need /EHa switch. Do I have to recompile it with /EHa switch to make the test suite work properly? My feeling is that I need /EHa for the test suit only. Thank you and happy new year.

    Read the article

  • Dealing with Time Zones

    - by RavIncredible
    Hi All, I need some guidance with one of my project requirements, I am developing an application which has to deal with various time zones. Scenario: User 1 is from India, so his time zone would be GMT+05:30 User 2 is from UK, so his time zone would be GMT+01:00 If the User 1 sends a message to User 2, I want to show the Message Sent/Received Time as per the user’s time zone. For example User 1 sends a message at 6:30 Indian time, when User 2 would view the message it would show as 2:00 UK time. Here goes my question, whenever I save the message should I convert it to GMT+00, so all my base times stamps are the same and then later when I display the message, I convert it back to User specific time zone. Would this be complex? Is this the best way of doing this? I like to get views for both saving and displaying, also when I should do the time conversion from optimization point of view. I would need do deal with any/all timezones. I am developing this application with PHP and MySQL and I am aware of timezone conversion method come with both PHP and MySQL. I am just trying to figure out the best way of doing this. Look forward to have all valuable suggestions. Note : As of now I am not much worried with day/light savings. Thanks Ravi

    Read the article

  • HttpModule.Init - safely add HttpApplication.BeginRequest handler in IIS7 integrated mode

    - by Paul Smith
    My question is similar but not identical to: http://stackoverflow.com/questions/1123741/why-cant-my-host-softsyshosting-com-support-beginrequest-and-endrequest-event (I've also read the mvolo blog referenced therein) The goal is to successfully hook HttpApplication.BeginRequest in the IHttpModule.Init event (or anywhere internal to the module), using a normal HttpModule integrated via the system.webServer config, i.e. one that doesn't: invade Global.asax or override the HttpApplication (the module is intended to be self-contained & reusable, so e.g. I have a config like this): <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <remove name="TheHttpModule" /> <add name="TheHttpModule" type="Company.HttpModules.TheHttpModule" preCondition="managedHandler" /> So far, any strategy I've tried to attach a listener to HttpApplication.BeginRequest results in one of two things, symptom 1 is that BeginRequest never fires, or symptom 2 is that the following exception gets thrown on all managed requests, and I cannot catch & handle it from user code: Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] System.Web.PipelineModuleStepContainer.GetEventCount(RequestNotification notification, Boolean isPostEvent) +30 System.Web.PipelineStepManager.ResumeSteps(Exception error) +1112 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +113 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +616 Commenting out app.BeginRequest += new EventHandler(this.OnBeginRequest) in Init stops the exception of course. Init does not reference the Context or Request objects at all. I have tried: Removed all references to HttpContext.Current anywhere in the project (still symptom 1) Tested removing all code from the body of my OnBeginRequest method, to ensure the problem wasn't internal to the method (= exception) Sniffing the stack trace and only calling app.BeginRequest+=... when if the stack isn't started by InitializeApplication (= BeginRequest not firing) Only calling app.BeginRequest+= on the second pass through Init (= BeginRequest not firing) Anyone know of a good approach? Is there some indirect strategy for hooking Application_Start within the module (seems unlikely)? Another event which a) one can hook from a module's constructor or Init method, and b) which is subsequently a safe place to attach BeginRequest event handlers? Thanks much

    Read the article

  • Please Find the error :

    - by jagdeep
    using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class Expt : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Bttnadd_Click(object sender, EventArgs e) { FileUpload1.SaveAs(MapPath("~/img//"+DateTime.Now.ToString()+FileUpload1.FileName)); } } Exception Details: System.Web.HttpException: ~/img//1/1/2011 1:47:52 PMWinter.jpg is not a valid virtual path.

    Read the article

  • Retriving requried data form Content Providers using single cursor.

    - by HellBoy
    I want to retrieve Name,Number,Company,and Designation so I am retrieving it using 2 cursor as follow Cursor cursor1 = getContentResolver().query(Data.CONTENT_URI, new String[]{Organization.COMPANY, Organization.TITLE}, Data.MIMETYPE + "='" + Organization.CONTENT_ITEM_TYPE + "'", null, null); Cursor cursor2 = getContentResolver().query(Phone.CONTENT_URI, new String[]{Phone.NUMBER, Phone.DISPLAY_NAME}, null, null, null); but How retrieve using one cursor or passing query one time only.

    Read the article

  • I have the CSS & JS, how do I convert that to erb for my Rails app?

    - by marcamillion
    So I have the foundation of my Rails app, then I went ahead and did the JS and CSS. How do I then take the CSS and JS that I have, and apply it to the app in a 'Rails Way'. i.e. a dynamic way that works nicely. Can you give me some tutorials/articles/resources that I can read up to guide me, please? I have tried the Rails guides, but I find them a bit lacking. Any other good suggestions or tips that might help get me on the right track? Thanks.

    Read the article

  • What could be causing a "Cannot access a disposed object" error in WCF?

    - by Nima
    I am using the following code: private WSHttpBinding ws; private EndpointAddress Srv_Login_EndPoint; private ChannelFactory<Srv_Login.Srv_ILogin> Srv_LoginChannelFactory; private Srv_Login.Srv_ILogin LoginService; The Login is my constructor: public Login() { InitializeComponent(); ws = new WSHttpBinding(); Srv_Login_EndPoint = new EndpointAddress("http://localhost:2687/Srv_Login.svc"); Srv_LoginChannelFactory = new ChannelFactory<Srv_Login.Srv_ILogin>(ws, Srv_Login_EndPoint); } And I'm using service this way: private void btnEnter_Click(object sender, EventArgs e) { try { LoginService = Srv_LoginChannelFactory.CreateChannel(); Srv_Login.LoginResult res = new Srv_Login.LoginResult(); res = LoginService.IsAuthenticated(txtUserName.Text.Trim(), txtPassword.Text.Trim()); if (res.Status == true) { int Id = int.Parse(res.Result.ToString()); } else { lblMessage.Text = "Not Enter"; } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { Srv_LoginChannelFactory.Close(); } } When the user enters a valid username and password, everything is fine. When the user enters a wrong username and password, the first try correctly displays a "Not Enter" message, but on the second try, the user sees this message: {System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.ServiceModel.ChannelFactory`1[Test_Poosesh.Srv_Login.Srv_ILogin]'. at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposed() at System.ServiceModel.ChannelFactory.EnsureOpened() at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) at System.ServiceModel.ChannelFactory`1.CreateChannel() How can I fix my code to prevent this error from occurring?

    Read the article

  • Installing maven on Ubuntu by manual download

    - by WebDevHobo
    To install Maven, I downloaded the latest version from the website and then followed these steps: http://maven.apache.org/download.html#Installation The last step, the version control, does not work. It says that 'mvn' is currently not installed and that I should type sudo apt-get install maven2 If I go directly to the mvn file itself, it does work: root@ubuntu:~# /usr/local/apache-maven/apache-maven-2.2.1/bin/mvn --version Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700) Java version: 1.6.0_21 Java home: /usr/java/jdk1.6.0_21/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.32-25-generic" arch: "i386" Family: "unix" So, what am I doing wrong here? Or what would and apt-get install do extra that I might have forgotten?

    Read the article

  • howto configure proxy.conf for mod_proxy, apache2, jetty

    - by Kaustubh P
    Hello, This is how I have setup my environment, atm. An apache2 instance on port 80. Jetty instance on the same server, on port 8090. Use-Case: When I visit foo.com, I should see the webapp, which is hosted on jetty, port 8090. If I put foo.com/blog, I should see the wordpress blog, which is hosted on apache. (I read howtos on the web, and installed it using AMP.) Below are my various configuration files: /etc/apache2/mods-enabled/proxy.conf: ProxyPass / http://foo.com:8090/ << this is the jetty server ProxyPass /blog http://foo.com/blog ProxyRequests On ProxyVia On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPreserveHost On ProxyStatus On /etc/apache2/httpd.conf: LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so LoadModule proxy_balancer_module /usr/lib/apache2/modules/mod_proxy_balancer.so LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so I have not created any other files, in sites-available or sites-enabled. Current situation: If I goto foo.com, I see the webapp. If I goto foo.com/blog, I see a HTTP ERROR 404 Problem accessing /errors/404.html. Reason: NOT_FOUND powered by jetty:// If I comment out the first ProxyPass line, then on foo.com, I only see the homepage, without CSS applied, ie, only text.. .. and going to foo.com/blog gives me a this error: The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /blog. Reason: Error reading from remote server I also cannot access /phpmyadmin, giving the same 404 NOT_FOUND error as above. I am running Debian squeeze on an Amazon EC2 Instance. Question: Where am I going wrong? What changes should I make in the proxy.conf (or another conf files) to be able to visit the blog?

    Read the article

  • Best way to convert episodic DVDs for Windows Media Center?

    - by Roger Lipscombe
    I'm archiving my DVD collection. My goal is to be able to play them back in Windows Media Center. For feature-length DVDs, I'm using AnyDVD and CloneDVD, which is working well. For playing back TV shows (and other episodic content), I'm using Media Browser, which doesn't support a VIDEO_TS folder per episode. It expects the shows to be broken up into one file per episode (e.g. "Willo the Wisp - S01E12.avi"). For this, I'm attempting to use Handbrake, which, for extracting the episodes from DVD (or already-ripped VIDEO_TS folder), is working pretty well. The problem that I have is that the default x264 encoder over-compresses the resulting video stream, which results in hideous artifacts in animated shows. The aforementioned Willo the Wisp is a particularly bad example, because the original DVD is particularly "noisy". If I switch to using the ffmpeg encoder, the artifacts are gone in Windows Media Player, but I can't get the resulting files to play back in Windows Media Center. I see the first frame, and then there's an error message. I've installed the CCCP codec collection, but it doesn't seem to have made any difference. So: what's the best way to convert VIDEO_TS to individual episode files for playback in Windows Media Center?

    Read the article

  • Using iptables to selectively route outgoing requests?

    - by Olivier
    Hello, I'd like to set up my Dd-WRT firewall so that it uses the VPN service from a VPN provider to access a bunch of destinations and normal route foe all other requests. In detail: giganews.com would be accessed thru VPN VyprVPN normal web sites such as amazon, ebay, et al thru transparent firewall. I've run nito reading SOOOO many tutorials but I can't get to understand what the different entities are. Any help? Thxs

    Read the article

  • Issues in getting Synergy setup

    - by chris
    For some reason I cannot get things working when the Linux box is the server and the macbook pro is the client. However I can get things working just fine in the inverse, unfortunately since the macbook is not the primary machine, and not powered on all the time, the later setup won't work. Here is the error that I am getting: started client connecting to '10.0.1.4': 10.0.1.4:24800 The only firewall that I have is the one on the router, so since things work with the macbook as the server I am pretty sure that is not where the problem is. Here is the .synergy.conf file section: screens Chris-MacBook-Pro: # I have tried this with the .local as well chris-archlinux.local: end section: links Chris-MacBook-Pro: right = chris-archlinux.local chris-archlinux.local: left = Chris-MacBook-Pro.local end ** Update: I should also add that I can ping the linux machine from the mac. To try get things working, I have also prevented the hosts.deny/.allow files from blocking anything. An ideas to where the problem could be?

    Read the article

  • Where do I publish a program?

    - by Sean
    I have finished designing a little application for Pandora and I am not sure how I can get it out and share it with everyone. What should I do to help advertise it to the public and let other people use it? As of right now it is free, and I hope to keep it that way, so I don't want to spend any money to give it out. I had actually designed this application just for personal use, but hey, why should I be the only one to use it?

    Read the article

  • how to enable opengl 2.0 and webgl on gma 3150 ?

    - by mahmoudelbadry
    hi, i have a dell mini 1012 which has an intel n450 processor and gma 3150 integrated graphics card running ubuntu 10.10 according to the intel website the graphics card support opengl 2.0 http://software.intel.com/en-us/articles/quick-reference-guide-to-intel-integrated-graphics/#9 but when i type glxinfo in terminal the opengl version string gives me the following OpenGL version string: 1.4 Mesa 7.9-devel i installed the latest drivers but it didn't work. so, how can i enable opengl 2.0 on this card?? thanks

    Read the article

  • How to enable dual monitors with two ATI Radeon 4350 HD graphics cards?

    - by Christophski
    I have bought two ATI Radeon 4350 HD graphics cards and they both work well seperately. But only the first one will output most of the time. If I go to System - Appearance - Monitors it will only detect the monitor on the first graphics card. I have check using hardinfo and the system has definitely detecting both of the graphics cards so I don't know why it isn't detecting the monitor. I am running Maverick 64 bit

    Read the article

  • How can I assign actions to all my mouse buttons?

    - by torbengb
    I have a mouse with lots of buttons, but it's not a mainstream make like Logitech. For Windows, I have a driver that lets me assign actions like close-window (Ctrl+W) or next-tab (Ctrl+Tab), but I don't have a Linux driver. Since Linux is so flexible, I thought perhaps there is a general way to do this, regardless of brand? Update: Based on input from Cyrex, I installed and ran sudo apt-get install btnx which found several but not all mouse buttons. Found: left, right, wheel, wheelclick, thumb fwd, thumb back. Not found: wheel left, wheel right, thumb middle button. Vendor ID is 0x04d9, Model ID is 0xa015.

    Read the article

  • m2eclipse: How to set Eclipse project settings when importing a maven project?

    - by Marius Andreiana
    Using m2eclipse Eclipse plugin, everybody on the dev team should be able to checkout source code, import Maven project in Eclipse and be good to go. I saw m2eclipse is being merged into Eclipse 3.7, and maven-eclipse-plugin won't be maintained any longer, so I'm looking for a m2eclipse-based solution (without running "mvn eclipse:clean eclipse:eclipse" before project import, which is what maven-eclipse-plugin does). maven-eclipse-plugin allows this in pom.xml <additionalConfig> <file> <name>.settings/com.google.gdt.eclipse.core.prefs</name> <content><![CDATA[ eclipse.preferences.version=2 jarsExcludedFromWebInfLib= warSrcDir=${project.build.directory}/${project.build.finalName} warSrcDirIsOutput=true ]]> </content> </file> The more general question is How would m2eclipse do something similar? For some cases, just saving the eclipse .settings/prefs file works (e.g. org.eclipse.jdt.ui.prefs), but in this case, com.google.gdt.eclipse.core.prefs is always overwritten on m2eclipse project import. A specific question is asked here, with no reply. Thanks! UPDATE: Not possible now, see request

    Read the article

  • UIEvent timestamp

    - by skajam66
    When handling a UIButton touch, you are given a UIEvent object. The UIEvent object has a timestamp which the Apple documentation states as being "the time that the event was created" (UIEvent Class Reference). In the documentation on the Main Event Loop, it states that: "The application object obtains the topmost object in the event queue, converts it to an event object (UIEvent) ..." Does [UIEvent timestamp] refer to the time at which the UIEvent object is created (i.e. after processing the touch event off of the main run loop and hance not remotely real-time) or does it refer to the time that the underlying touch object was created (and hence as close as possible to representing the actual time of the user touch9?

    Read the article

  • Why is my quick sort so slow?

    - by user513075
    Hello, I am practicing writing sorting algorithms as part of some interview preparation, and I am wondering if anybody can help me spot why this quick sort is not very fast? It appears to have the correct runtime complexity, but it is slower than my merge sort by a constant factor of about 2. I would also appreciate any comments that would improve my code that don't necessarily answer the question. Thanks a lot for your help! Please don't hesitate to let me know if I have made any etiquette mistakes. This is my first question here. private class QuickSort implements Sort { @Override public int[] sortItems(int[] ts) { List<Integer> toSort = new ArrayList<Integer>(); for (int i : ts) { toSort.add(i); } toSort = partition(toSort); int[] ret = new int[ts.length]; for (int i = 0; i < toSort.size(); i++) { ret[i] = toSort.get(i); } return ret; } private List<Integer> partition(List<Integer> toSort) { if (toSort.size() <= 1) return toSort; int pivotIndex = myRandom.nextInt(toSort.size()); Integer pivot = toSort.get(pivotIndex); toSort.remove(pivotIndex); List<Integer> left = new ArrayList<Integer>(); List<Integer> right = new ArrayList<Integer>(); for (int i : toSort) { if (i > pivot) right.add(i); else left.add(i); } left = partition(left); right = partition(right); left.add(pivot); left.addAll(right); return left; } }

    Read the article

  • Adobe Flex + Air or Java + JavaFX 2.0?

    - by kuyapangu
    Hey guys! I'm looking into a cloud-computing related career. I've recently graduated from school and have been meaning to study a new programming language. From what I understand, I need to get into RIA development for this. Flex and Java have certainly caught my attention, but I am torn as to whether focus on Flex then continue with Air, or study Java first and see how JavaFX 2.0 pans out, and then continue with Flex thereafter. I've no previous experience with either, and I'm sort of giving myself something like two years or so to learn. What do guys think? Thanks for the feedback! :)

    Read the article

  • There is no Key attribute in EF CTP 5

    - by Spence
    According to the blog post here Data Annotations in the Entity Framework there should be an attribute for a column called "Key" which allows you to mark the primary key of an entity. However I cannot locate this in .Net 3.5 or .Net 4.0. What have I missed? I've included the reference to EntityFramework.dll and I've checked all the attributes under System.ComponentModel.DataAnnotations but I cannot locate it. I have set my project to .Net 4.0 full (not client profile). Any ideas?

    Read the article

  • CeleryCAM not working... - Django/Celery

    - by RadiantHex
    Hi folks, celery works wonderfully! :) e.g. results are returned with no problems! Unfortunately celerycam does not: This is what my panel looks like, celeryev looks the same. NB: all those tasks have been completed succesfully, they are just not showing as completed, and the names are not showing either. I'm usingthe following commands: python manage.py celeryd -l info -E python manage.py celerycam My BROKER is RabbitMQ My DATABASE is MongoDB Django, Celery and RabbitMQ are running on a clean Ubuntu 10 install. Any ideas folks? Would be amazing if someone could help me on this one :|

    Read the article

  • Haskell lists difference

    - by user559354
    I'm trying make a lists difference. Found directly prelude operator \\\\ that makes lists difference. But errors Not in scope: '\\\\' occurs. Here is my simple from command line interpreter: Prelude> ([1,2,3] ++ [5,6]) -- works like expected [1,2,3,4,5,6] prelude> ([1,2,3] \\\\ [1,2]) -- erros occurs <interactive>:1:11: Not in scope: "\\\\" Thanks for explanation where I make a mistake.

    Read the article

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