Search Results

Search found 165 results on 7 pages for 'klaus fabian'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • download file exception handling

    - by klaus-vlad
    Hi, In my application I download several critical files from a server, and I want to write some code that handles the case where the a file download didn't complete for a reason or other ,to retry downloading it at next startup. The function that downloads a file at a time however throws only MalformedURLException and IOException , but if these exceptions are thrown that means that the download didn't even begin. How should I arrange things so I can treat the case where a download failed , even if it began ? download(String file) throws MalformedURLException ,IOException { }

    Read the article

  • Filter Facebook Stream by Post privacy?

    - by fabian
    Hi there, i query some wall data within my facebook tab. I was wondering how to filter the data (query) to show only post which are visible to a certain country. $query = " SELECT post_id, created_time, attachment,action_links, privacy FROM stream WHERE source_id = ".$page_id." AND viewer_id = ".$user_id." AND actor_id = ".$actor_id." LIMIT 50"; The Output already show Australia: But how to filter for Australia-Only. Array ( [posts] => Array ( [0] => Array ( [post_id] => 123 [viewer_id] => 123 [source_id] => 123 [type] => 46 [app_id] => [attribution] => [actor_id] => 123 [target_id] => [message] => Only for Austria [attachment] => Array ( [description] => ) [app_data] => [action_links] => [comments] => Array ( [can_remove] => 1 [can_post] => 1 [count] => 0 [comment_list] => ) [likes] => Array ( [href] => http://www.facebook.com/social_graph.php?node_id=118229678189906&class=LikeManager [count] => 0 [sample] => [friends] => [user_likes] => 0 [can_like] => 1 ) [privacy] => Array ( [description] => Austria [value] => CUSTOM [friends] => [networks] => [allow] => [deny] => ) [updated_time] => 1271520716 [created_time] => 1271520716 [tagged_ids] => [is_hidden] => 0 [filter_key] => [permalink] => http://www.facebook.com/pages/ )

    Read the article

  • Accessing inner value of ASP.NET Web User Control

    - by Fabian
    Surprised that i havent been able to find this myself, but anyway. Let's say i use my web user control like this: <myprefix:mytag userid="4" runat="server">Some fancy text</myprefix:mytag> How would i be able to access the text inside the tags from its codebehind? Was expecting it to be exposed through this.Text, this.Value or something similar.

    Read the article

  • Scroll to a position in a listView

    - by klaus-vlad
    Hi, I have a long listView that the user scrolls around and then returns to the previous menu . What I want is that when the user opens this list View again the list to be scrolled to where the it was previously left. Any ideas on how this can be achieved ?

    Read the article

  • IE8 problems with .animate() of opacity property - descendant remains opaque throughout

    - by Fabian
    Basically I have something like this: <ul> <li> <a> <div class="trigger-layer"></div> <div class="title-layer">Text here</div> <div class="hover-layer"></div> </a> </li> </ul> I use jQuery to animate the <ul> as follow: $ul = xxx (where I assign the selector to var $ul) $ul.animate({opacity: 0}, 1000, function() {$ul.css("display", "none")}); However in IE8, as the <ul> fades off, the <div class="title-layer">Text here</div> remains clear and opaque. Finally the animation ends, the display: none; property is applied onto the <ul> and the text disappears aburptly.

    Read the article

  • Does OOP make sense for small scripts?

    - by Fabian
    I mostly write small scripts in python, about 50 - 250 lines of code. I usually don't use any objects, just straightforward procedural programming. I know OOP basics and I have used object in other programming languages before, but for small scripts I don't see how objects would improve them. But maybe that is just my limited experience with OOP. Am I missing something by not trying harder to use objects, or does OOP just not make a lot of sense for small scripts?

    Read the article

  • How to control a webView

    - by klaus-vlad
    Hi, In one of my xml layouts I use an webview (besides other TextViews) for which I call loadUrl("myURL") to display the content from a url. The desired effect is to have displayed in a screen all the other textViews , and below them the content of web page. However when the webview loads the URL , it starts a new activity and displays the content in that activity, which is not what I need. Any ideas on how I could force the described behavior ? Later edit: I have succeed to have layout with several views mixed, one of them being the webview .Also I have succeed to obtain the described above behavior. But only after I setted a WebView client with setWebViewClient(WebViewClient); . Now I'd like to know why does it work like this only after a webViewClient is set ?

    Read the article

  • ASP.NET: Page HTML head rendering

    - by Fabian
    I've been trying to figure out the best way to custom render the <head> element of a pag to get rid of the extra line breaks which is caused by <head runat="server">, so its properly formatted. So far the only thing i've found which works is the following: protected override void Render(HtmlTextWriter writer) { StringWriter stringWriter = new StringWriter(); HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter); base.Render(htmlTextWriter); htmlTextWriter.Close(); string html = stringWriter.ToString(); string newHTML = html.Replace("\r\n\r\n<!DOCTYPE", "<!DOCTYPE") .Replace("\r\n<html", "<html") .Replace("<title>\r\n\t", "<title>") .Replace("\r\n</title>", "</title>") .Replace("</head>", "\n</head>"); writer.Write(newHTML); } I define my had tag like Now i have 2 questions: How does the above code affect the performance (so is this viable in an production environment)? Is there a better way to do this, for example a method which i can override to just custom render the <head>? Oh yeah ASP.NET MVC is not an option.

    Read the article

  • Eliminating false dependencies

    - by Klaus
    Hi all, I have a quite general question regarding false dependencies. As the name implies, those or no real dependencies and can be elimianated. I am aware of techniqes called register renaming that eliminate such dependencies at a hardware level. Of course I could eliminate those already at a "higher" level when writing assembler code that avoids false dependencies. But now I am wondering if also the compiler provides support to keep the number of false dependencies low or does it more rely on the hardware to eliminate those? Thanks

    Read the article

  • Even lighter than SQLite

    - by Richard Fabian
    I've been looking for a C++ SQL library implementation that is simple to hook in like SQLite, but faster and smaller. My projects are in games development and there's definitely a cutoff point between needing to pass the ACID test and wanting some extreme performance. I'm willing to move away from SQL string style queries, allowing it to be code driven, but I haven't found anything out there that provides SQL like flexibility while also preferring performance over the ACID test. I don't want to go reinventing the wheel, and the idea of implementing an SQL library on my own is quite daunting, even if it's only going to be simple subset of all the calls you could make. I need the basic commands (SELECT, MODIFY, DELETE, INSERT, with JOIN, and WHERE), not data operations (like sorting, min, max, count) and don't need the database to be atomic, or even enforce consistency (I can use a real SQL service while I'm testing and debugging).

    Read the article

  • C++ shared objects

    - by Klaus
    Hello, I have got four classes A, B, C and D. Class A has a member b of class B. Class B has a member c of class C. A has a member D* dpointer; This hierarchy has to be preserved (in fact this is a GUI with app, window, panel as A, B and C). Now B and C must use a method from *dpointer. Is there something more elegant than giving dpointer as a member of B and C ? Is it bad ?

    Read the article

  • Javascript global variable not working properly?

    - by Fabian
    My jQuery code: $(document).ready(function() { chrome.extension.sendRequest({get: "height"}, function(response) { height = response.value; }); $("#id").css("height", height+"px"); }); You don't have to be concerned about the chrome.extension.sendRequest(), basically it communicates with a background page to fetch the value for "height" from localStorage and stores the value in global variable height. The problem lies in $("#id") not being assigned the height value. However if I were to modify it such that it is now: $(document).click(function() { $("#id").css("height", height+"px"); }); it works. Any idea why?

    Read the article

  • Usage patterns/use cases for DI or when to start using it

    - by Fabian
    I'm not sure for which use cases one should to use DI in the application. I know that injecting services like PlaceService or CalculationService etc fits very well but should I also create my domain objects with DI like a User? What is if the User has only one constructor which requires a first and lastname. Is this solveable with DI? Should I use DI to create the instances for Set/List interfaces or is this pure overkill? I use guice primarily.

    Read the article

  • Check if NFS share is mounted in python script

    - by Fabian
    I wrote a python script that depends on a certain NFS share to be available. If the NFS share is not mounted it will happily copy the files to the local path where it should be mounted, but fail later when it tries to copy some files back that were created on the NFS server. I'd like to catch this error specifically so I can print a useful error message that will tell the users of this script what they have to do. My first idea would be to execute mount using subprocess and then check the output for this nfs share. But I'm wondering if there isn't a nicer and more robust method of doing it.

    Read the article

  • jQuery live, change in not working in IE6, IE7

    - by fabian
    The code below works as expected in FF but not in IEs... $(document).ready(function() { $('div.facet_dropdown select').live('change', function() { var changed_facet = $(this).attr('id'); var facets = $('select', $(this).closest('form')); var args = window.location.href.split('?')[0] + '?ajax=1'; var clear = false; for(var i = 0; i < facets.length; i++) { var ob = $(facets[i]); var val = ob.val(); if(clear) { val = ''; } args += '&' + ob.attr('id') + '=' + val; if(ob.attr('id') == changed_facet) { clear = true; } } $.getJSON(args, function(json) { for(widget_id in json) { var sel = '#field-' + widget_id + ' div.widget'; $(sel).html(json[widget_id]); } }); }); });

    Read the article

  • application resources after update

    - by klaus-vlad
    Hi, I have a curiosity about application updates . What happens after such a process with the resources supposing that the update needs different resources than the ones the old version used ? Are they overwritten ?( like overwrite string.xml) or the old resources are deleted and replaced with the new ones ?

    Read the article

  • UTC date and time

    - by klaus-vlad
    Hi, How can I obtain the current UTC time and date using a gps location changed lsitener ? public void onLocationChanged(Location lastLocation) { lastLocation.getTime() }

    Read the article

  • android resources in apk

    - by klaus-vlad
    HI Here's a thing I don't understand and hopefully someone will point to me. In my android development project under the folder res there are all the resources my application uses. The size is 3.11 mb and contains 1013 files . On the other hand in the apk there is the folder res with all the resources ass well , but this has a size of only 760 kb and contains only 332 files . Now does this means that not all the resources are packed ? If this is the case what happens when a needed resources is referenced ?

    Read the article

  • SQL query, select from 2 tables random

    - by klaus
    Hello all i have a problem that i just CANT get to work like i what it.. i want to show news and reviews (2 tables) and i want to have random output and not the same output here is my query i really hope some one can explain me what i do wrong SELECT anmeldelser.billed_sti , anmeldelser.overskrift , anmeldelser.indhold , anmeldelser.id , anmeldelser.godkendt FROM anmeldelser LIMIT 0,6 UNION ALL SELECT nyheder.id , nyheder.billed_sti , nyheder.overskrift , nyheder.indhold , nyheder.godkendt FROM nyheder ORDER BY rand() LIMIT 0,6

    Read the article

  • Works on emulator but not on device

    - by Klaus
    Hello Community, I have an inner handler class that calls the method sendMessage. sendMessige is outside the handler class, but inside the conatining Android java class. On the emulator (AVD 2.2) it works fine, but on my Android 2.2 device the method sendMessage is not called at all. Inner handler class: private Handler handler2 = new Handler() { public void handleMessage(Message msg) { if (GeoSetting.equals("s") && (inNumber.equals(definedNumber))) **SendService.this.sendMessage(definedNumber, DisplayLoc)**; if (GeoSetting.equals("a")) **SendService.this.sendMessage(inNumber, DisplayLoc)**; stopService(new Intent(getApplicationContext(), GeoService.class)); }; The method that should be called: private void sendMessage(String sendNumber, String sendText){ Toast.makeText(getApplicationContext(), "done!!!", Toast.LENGTH_LONG).show(); SmsManager sms = SmsManager.getDefault(); try { sms.sendTextMessage(sendNumber, null, sendText, null, null); if (Message == true) {Toast.makeText(getApplicationContext(), "Sending SMS to "+sendNumber+": "+sendText, Toast.LENGTH_LONG).show();} } catch (Exception exeption){ Toast.makeText(getApplicationContext(), "Something is wrong, could not send SMS!", Toast.LENGTH_LONG).show(); } Toast.makeText(getApplicationContext(), "method called!", Toast.LENGTH_LONG).show(); } Does anybody have an idea why sendMessage is not called on the real device? Thank you for the help!

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >