Search Results

Search found 13011 results on 521 pages for 'catch block'.

Page 26/521 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • (Android) How to catch a "ring" event?

    - by rockit
    Hi android developers! I'm clearly a newb, and I was wondering if anyone knows how I can detect a "ring" event on my cellphone through the android sdk? Generally I want to do something with the phone when it begins ringing! Any thoughts? If you want to simply point me to a page in the api documents that would be a good answer for me, I just don't know how to start my research!

    Read the article

  • Catch a PHP Object Instantiation Error

    - by Rob Wilkerson
    It's really irking me that PHP considers the failure to instantiate an object a Fatal Error (which can't be caught) for the application as a whole. I have set of classes that aren't strictly necessary for my application to function--they're really a convenience. I have a factory object that attempts to instantiate the class variant that's indicated in a config file. This mechanism is being deployed for message storage and will support multiple store types: DatabaseMessageStore FileMessageStore MemcachedMessageStore etc. A MessageStoreFactory class will read the application's preference from a config file, instantiate and return an instance of the appropriate class. It might be easy enough to slap a conditional around the instantiation to ensure that class_exists(), but MemcachedMessageStore extends PHP's Memcached class. As a result, the class_exists() test will succeed--though instantiation will fail--if the memcached bindings for PHP aren't installed. Is there any other way to test whether a class can be instantiated properly? If it can't, all I need to do is tell the user which features won't be available to them, but let them continue one with the application. Thanks.

    Read the article

  • PHP Javascript catch link.

    - by Jordan Pagaduan
    Javascript <script type="text/javascript"> function Edit(id) { if(confirm("Are you sure to edit?")==true) { location.href='employee_set.php&edit='+id; } } </script> PHP <?php if(isset($_GET["edit"])==false){ echo "no response"; }else{ echo "link success"; } ?> My problem is the Javascript is OK. The location href example. http://localhost/employee_set.php&edit=30 ... The PHP code is not working. Error is not found.

    Read the article

  • How to catch unintentional function interpositioning with GCC?

    - by SiegeX
    Reading through my book Expert C Programming, I came across the chapter on function interpositioning and how it can lead to some serious hard to find bugs if done unintentionally. The example given in the book is the following: my_source.c mktemp() { ... } main() { mktemp(); getwd(); } libc mktemp(){ ... } getwd(){ ...; mktemp(); ... } According to the book, what happens in main() is that mktemp() (a standard C library function) is interposed by the implementation in my_source.c. Although having main() call my implementation of mktemp() is intended behavior, having getwd() (another C library function) also call my implementation of mktemp() is not. Apparently, this example was a real life bug that existed in SunOS 4.0.3's version of lpr. The book goes on to explain the fix was to add the keyword static to the definition of mktemp() in my_source.c; although changing the name altogether should have fixed this problem as well. This chapter leaves me with some unresolved questions that I hope you guys could answer: Should our software group adopt the practice of putting the keyword static in front of all functions that we don't want to be exposed? Does GCC have a way to warn about function interposition? We certainly don't ever intend on this happening and I'd like to know about it if it does. Can interposition happen with functions introduced by static libraries? Thanks for the help.

    Read the article

  • [C++] Boost test: catch user defined exceptions

    - by user231536
    If I have user defined exceptions in my code, I can't get Boost test to consider them as failures. For example, BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(MyTest,1) BOOST_AUTO_TEST_CASE(MyTest) { // code which throws user defined exception, not derived from std::exception. } I get a generic message: Caught exception: .... unknown location(0):.... It does not recognize this error as a failure since it is not a std::exception. So it does not honor the expected_failures clause. How do I enforce that the piece of code should always throw an exception? THis seems to be a useful thing to want. In case future code changes cause the code to pass and the exception is not thrown, I want to know that.

    Read the article

  • howto catch jQuery for multiple links but not all

    - by user247245
    I'm trying to dig into jQuery but would like some feedback on how to do things the best way, I have a list with items, which each contains a hidden div that should show upon click on it's parent, list div:ed item1 with link hidden div div:ed item2 with link hidden div .. My current solution is to trace the calling link by it's id and then reusing that ID for showing the correct hidden one: $(document).ready(function() { //jQ should only trigger on links with id="cmLinkINT" $("a").click(function() { //see if it's a comment request. var s = $(this).attr("id"); if (s.indexOf('cmLink') != -1) { //ok, it was a 'show'-link, get the id.. var j = s.substring(6); //ok, now I have the id i want to show (detailsINT) return false; } }); }); What's not clear to me is the best approach, Should I use id for requesting a or trace the id of the parent div. How to avoid that the code triggers on any link? Class? Thankful for any feedback, regards //t

    Read the article

  • How to catch key press on a form c# .net

    - by flavour404
    Hi, I have a parent form that contains a lot of controls. What I am trying to do is filter all of the key presses for that form. The trouble is that if the focus is on one of the controls on the form then the parent form is not getting the key press event, so how do I capture the key down event? Thanks, R.

    Read the article

  • Catch/Intercept all mouse clicks

    - by Hallik
    I have this simple script that catches all mouse clicks, unless you click on something that actually works. Links, flash videos, etc. How can I adjust this so no matter what a user clicks on, before the video loads, new page loads, etc. It sends the simple GET request I built? (function($) { $.fn.saveClicks = function() { $(this).bind('mousedown.clickmap', function(evt) { var clickDocument = (document.documentElement != undefined && document.documentElement.clientHeight != 0) ? document.documentElement : document.body; var width = clickHeatDocument.clientWidth != undefined ? clickDocument.clientWidth : window.innerWidth; var height = clickHeatDocument.clientHeight != undefined ? clickDocument.clientHeight : window.innerHeight; var scrollx = window.pageXOffset == undefined ? clickDocument.scrollLeft : window.pageXOffset; var scrolly = window.pageYOffset == undefined ? clickDocument.scrollTop : window.pageYOffset; var x = evt.clientX + scrollx; var y = evt.clientY + scrolly; $.get('/click-save.php', { "x":evt.pageX, "y":evt.pageY, "click":"true", "w":width, "h":height, "l":escape(document.location.pathname), "d":escape(document.domain) }); }); }; })(jQuery); $(function() { $(document).saveClicks(); });

    Read the article

  • catch output from linux telnet to a python script

    - by sandra
    Hello. My problem is that i want to do something like this in linux console telnet 192.168.255.28 process.py i.e i would like to do some transformation with console telnet output using python script. I'm see Popen in python for this case, but i can't understand how can i get input from telnet if it do not stop all time.. Pleas any ideas.

    Read the article

  • Dynamic Cocoon Block list

    - by Crischan
    Hi, I have a Cocoon 2.2 based application which uses blocks for different tasks and one block for shared pipeline fragments. All blocks are mounted within an Cocoon webapp. Now I would like to have an block which generates an overview of all other mounted blocks. I probably will have to use Java code - which is fine - but I am kinda lost where to start. Can anyone point me the right direction?

    Read the article

  • Catch all javascript errors and send them to server

    - by ssaboum
    Hi everyone, i wandered if anyone had experience in handling javascript errors globally and send them from the client browser to a server. I think my point is quite clear, i want to know every exceptions, errors, compilation errors, ... that happens on the client side and send them to the server to report them. I'm mainly using mootools and head.js (for the js side) and django for the server side (not that it matters...). Thank you for your help. Regards.

    Read the article

  • Changing the block size of a dfs file in Hadoop

    - by Sam
    I found that my map tasks is currently inefficient when parsing one particular set of files (total 2 TB). I'd like to change the block size of files in the Hadoop dfs (from 64MB to 128 MB). I can't find how to do it in the documentation for only one set of files and not the entire cluster, does anyone know the command that would change the block size when I upload it (ie copy from local to the dfs)? Thanks!

    Read the article

  • Autoplaynig video/image gallery - with a catch

    - by Ran
    Looking for a (jQuery) video/image gallery to implement on my website, I've found many freely available option. However, I need one that, when in "autoplay" mode and gets to a video file, automatically plays an entire file, and only then moves on to the next image/video. Similar to what Picasaweb are doing when you ask to autoplay an online gallery of your images/videos. I have found, for example, this plugin: http://www.yoxigen.com/yoxview/. Notice that images 6 & 8 are actually video feeds, but when in autoplay mode, are treated just like any other image, i.e. - displayed for a few seconds then moves on to the next file... not what I need. Thank you in advance.

    Read the article

  • Code:Block in window & compiler in linux

    - by ambika
    i have the Code:Block ide in window. my compiler is in linux machine that is GCC. can i write the code in window & compile in linux with the Code:Block ide. if i can , then how ? if not, is there any alternative to do that. thanks in advance for all suggestion.

    Read the article

  • Accessing Ember component scope from block form?

    - by user3009816
    I want to let a user pass a custom text field, App.CustomTextField, in a Ember component using block form. However, that App.CustomTextField needs access to the component to manipulate its properties. How can I pass the component to the textfield using block form? I would like to pass the component as a property to App.CustomTextField, but how do I access the component's scope? {{#blog-post}} {{view App.CustomTextField component=?}} {{/blog-post}}

    Read the article

  • Getting around url block for game

    - by Josh T
    So I play a game called Battlefield Play4Free (www.battlefield.play4free.com). Its essentially a giant browser plugin. The admin on my computer used to have the url battlefield.play4free.com/en/playnow.html blocked which only blocked the page that launches the game (i found a way to launch the game without going to that page and the game worked fine). Now it blocks battlefield.play4free.com which thus blocks all subpages. However, I have found that if I change it to an https and go to https://battlefield.play4free.com/en/login.html to login and then https://battlefield.play4free.com/en/playnow.html I can launch the game. However, when the game launches the borders and everything show but the window content is just a giant blockpage (the same one that shows up when I go to battlefield.play4free.com in the browser) and the blocked page is battlefield.play4free.com (main page). Is there any way I can get around this? I need a way to make the game access the server without going through the browser i.e. make the game use a proxy to get the data or somehow get past the besafe block. I was thinking perhaps you could get around it if you could get the game to make a direct request to the server and not through the url/browser, I know this works because I have a torrenting app that even tho torrent sites are blocked in the browser, the app makes a direct request and thus is not blocked. By the way, the program that blocks everything is besafe or besecure something like that. I do have access to an admin account (on the computer not the besafe program) as well as router access and pretty much anything else. Thanks so much!

    Read the article

  • Opening and Testing Ports on Modem > Router Connection

    - by JakeTheSnake
    Working off of my last question, I can access my server's FTP over the LAN but not over the internet. I'm using Filezilla on port 666. My router/modem configuration is as such (similar to other post): 1) Modem connects to WAN 2) WAN port on modem connects to LAN port on Router 3) Modem internal IP address is 192.168.0.254 4) Router internal IP address is 192.168.0.1 5) Modem has DHCP turned OFF 6) Router has DHCP turned ON 7) Router is running Tomato firmware and it's set as 'Router' (not 'Gateway') 8) The internet is working (just had to say that) I've set up port forwarding both on the modem and router - both route port 666 to the IP address of 192.168.0.3 (TCP); that is the IP address of the server which has FileZilla running. I don't know if that's hindering anything but I've also tried it with just the modem and just the router...same result. I've also tried setting the server to be DMZ (both on router and modem). Neither router nor modem have anything in their logs about denying inbound traffic on port 666 so my ability to troubleshoot stops there. I've tried contacting my ISP (Telus, running on mobility plan...it's a "Smart" Hub) but they weren't much help. They said they only block port 25 and 80 and maybe a few others, but not most ports. I test whether or not the port is open by going to canyouseeme.org - I don't know whether or not that would produce a 'connection refused' result just based on the fact that the FTP requires a login...I'm not well versed on this matter. FWIW, sometimes I get a 'connection refused' error on canyouseeme.org but mostly it's 'connection timed out'. I don't know what else to do at this point.

    Read the article

  • Nginx Server Block Port 8081 Path to Root Folder

    - by Pamela
    I'm trying to password protect all of port 8081 on my Nginx server. The only thing this port is used for is PhpMyAdmin. When I navigate to https://www.example.com:8081, I successfully get the default Nginx welcome page. However, when I try navigating to the PhpMyAdmin directory, https://www.example.com:8081/phpmyadmin, I get a "404 Not Found" page. Permission for my htpasswd file is set to 644. Here is the code for my server block: server { listen 8081; server_name example.com www.example.com; root /usr/share/phpmyadmin; auth_basic "Restricted Area"; auth_basic_user_file htpasswd; } I have also tried entirely commenting out #root /usr/share/phpmyadmin; However, it doesn't make any difference. Is my problem confined to using the incorrect root path? If so, how can I find the root path for PhpMyAdmin? If it makes any difference, I'm using Ubuntu 14.04.1 LTS with Nginx 1.4.6 and ISPConfig 3.0.5.4p3.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >