Daily Archives

Articles indexed Friday March 12 2010

Page 21/130 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Android - Nesting ViewFlippers

    - by user286285
    Hi, I want to nest several viewflippers. is this possible? I have not been successful thus far. My first tier flips as required but when I flip to the first nested viewflipper its contents appear blank and I can't "flip" it my views are V1 V2 V3 - H1 , H2, H3 One I flip to V3 vertically ... H1 does not appear. where as H is my Horizontal flipper group. Neil

    Read the article

  • Why are virtual methods considered early bound?

    - by AspOnMyNet
    One definition of binding is that it is the act of replacing function names with memory addresses. a) Thus I assume early binding means function calls are replaced with memory addresses during compilation process, while with late binding this replacement happens during runtime? b) Why are virtual methods also considered early bound (thus the target method is found at compile time, and code is created that will call this method)? As far as I know, with virtual methods the call to actual method is resolved only during runtime and not compile time?! thanx EDIT: 1) A a=new A(); a.M(); As far as I know, it is not known at compile time where on the heap (thus at which memory address ) will instance a be created during runtime. Now, with early binding the function calls are replaced with memory addresses during compilation process. But how can compiler replace function call with memory address, if it doesn’t know where on the heap will object a be created during runtime ( here I’m assuming the address of method a.M will also be at same memory location as a )? 2) v-table calls are neither early nor late bound. Instead there's an offset into a table of function pointers. The offset is fixed at compile time, but which table the function pointer is chosen from depends on the runtime type of the object (the object contains a hidden pointer to its v-table), so the final function address is found at runtime. But assuming the object of type T is created via reflection ( thus app doesn’t even know of existence of type T ), then how can at compile time exist an entry point for that type of object?

    Read the article

  • problem with adding url variable with javascript

    - by Richard
    Hello, Can someone help me with this I am trying to set and catch the url variable It begins with a form wich has the standard action set to "/autorisation/logout" Then a button with an inline javascript function function tbPayout() { parent.location = "/autorisation/logout?rcgo=payout"; return true; } <input src="/images/go02.gif" type=image border=0 name="go1" onClick="return tbPayout();"> In the autorisation controller I try to catch it if ( isset($_GET['rcgo']) ) { but it doesn't work and I can't see the variable in the url and therefore the default forms action is performed? I also have another redirect page with content="3; url=http://www.domain.nl/index/index?rcgo=logout" /> and that works fine How can I get the javascript to work because I have three submit buttons that need to be set to different get variables. Thanks, Richard

    Read the article

  • How to access constant defined in child class?

    - by kavoir.com
    I saw this example from php.net: <?php class MyClass { const MY_CONST = "yonder"; public function __construct() { $c = get_class( $this ); echo $c::MY_CONST; } } class ChildClass extends MyClass { const MY_CONST = "bar"; } $x = new ChildClass(); // prints 'bar' $y = new MyClass(); // prints 'yonder' ?> But $c::MY_CONST is only recognized in version 5.3.0 or later. The class I'm writing may be distributed a lot. Basically, I have defined a constant in ChildClass and one of the functions in MyClass (father class) needs to use the constant. Any idea?

    Read the article

  • How do i import AWT?

    - by David
    Im teaching myself java and the book i'm looking at just got around to explaining AWT. here is my source code: java.awt.* class obj { public static void main (String[]arg) { Point blank; blank = new Point (3,4) ; int x = blank.x ; System.out.prinln (x) ; } } here is the error i get while trying to compile it: obj.java:1: 'class' or 'interface' expected java.awt.* ^ 1 error What did i do wrong? / whats going wrong here?

    Read the article

  • Can't change data type on MS Access 2007

    - by khalidfazeli
    Hi All, I have a huge database (800MB) which consists of a field called 'Date Last Modified' at the moment this field is entered as a text data type but need to change it to a Date/Time field to carry out some queries. I have another exact same database but with only 35MB of data inside it and when I change the data type it works fine, but when I try to change data type on big database it gives me an error: Micorosoft Office Access can't change the data type. There isn't enough disk space or memory After doing some research some sites mentioned of changing the registry file (MaxLocksPerFile) tried that as well, but no luck :-( Can anyone help please?

    Read the article

  • Why enabling transparency can lead to cliping problems ?

    - by Amokrane
    Hi, I'm working on a 3D graphical application in Java using the Java 3D API. I noticed that every time I was dealing with transparency, all I got in return were some clipping problems. Some parts of the scene weren't displayed properly. It might seem obvious that this would happen in a certain way but I'm looking for a logical explanation, why is this happening? Thank you

    Read the article

  • How does Zend_Db_Table_Select work?

    - by jwhat
    I'm trying to figure out how to use Zend_Db_Table_Abstract correctly. I want to return just the name column from my query. Can you please explain what's wrong with the following code? class Model_DbTable_Foo extends Zend_Db_Table_Abstract { protected $_name = 'foo'; public function getFooById($id) { $select = $this->select(true)->columns('name')->where('id=' . $id); $row = $this->fetchRow($select); print_r($row->toArray()); } }

    Read the article

  • Problem running RoR app in production environment

    - by normalocity
    Have an app that has "listings" - think classified ads - and each listing has a list of tags. The following code fails when I run the app in production mode, but works fine under development mode uninitialized constant ActiveRecord::Acts::Taggable::InstanceMethods::TagList Extracted source (around line #45): 42: 43: <span class="listingIndexTags"> 44: Location: [location] | Tags: 45: <% tag_list = listing.tag_list %> 46: <% if tag_list != nil %> 47: <% for tag in tag_list %> 48: <%= link_to tag.to_s, { :action => "filter_on", The command line I'm using to start my mongrel instance in this test case: ruby script/server mongrel -e development Defaults to port 3000. I can access other views in the app that DON'T call "listing.tag_list". ".tag_list" is provided by "acts_as_taggable_on_steroids", which I'm using in this app. It is installed as a gem. Maybe my environment files are wonky? Here's my development.rb file config.cache_classes = false config.whiny_nils = true config.action_controller.consider_all_requests_local = true config.action_view.debug_rjs = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { ...took these settings out for this post... } And my production.rb file... config.cache_classes = true config.threadsafe! config.action_controller.consider_all_requests_local = false config.action_controller.perform_caching = true config.cache_store = :mem_cache_store config.action_mailer.raise_delivery_errors = false config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { ...took these settings out for this post... }

    Read the article

  • after return PartialView() Url.Actionlink("Action", "Controller"), the Controller is lost

    - by Johannes
    Well the Question is related to a problem I posted before (http://stackoverflow.com/questions/2403899/asp-net-mvc-partial-view-does-not-call-my-action). In practice I've a partial view which contains a Form, after submitting the Form the Controller returns the Partial View. Well the Problem is if I reload the page which contains the partial view the function <%= Url.Action("ChangePassword", "Account") %> returns "Account/ChangePassword", if I submit the form and the partial is returned by the controller. Using return PartialView() the function <%= Url.Action("ChangePassword", "Account") %> returns only "ChangePassword". Any Idea because? The View looks like: <form action="<%= Url.Action("ChangePassword", "Account") %>" method="post" id="jform"> <div> <fieldset> <legend>Account Information</legend> <p> <label for="currentPassword">Current password:</label> <%= Html.Password("currentPassword") %> <%= Html.ValidationMessage("currentPassword") %> </p> <p> <label for="newPassword">New password:</label> <%= Html.Password("newPassword") %> <%= Html.ValidationMessage("newPassword") %> </p> <p> <label for="confirmPassword">Confirm new password:</label> <%= Html.Password("confirmPassword") %> <%= Html.ValidationMessage("confirmPassword") %> </p> <p> <input type="submit" value="Change Password" /> </p> </fieldset> </div> </form> </div> <script> $(function() { $('#jform').submit(function() { $('#jform').ajaxSubmit({ target: '#FmChangePassword' }); return false; }); }); </script> Part of the Controller: if (!ValidateChangePassword(currentPassword, newPassword, confirmPassword)) { return PartialView(ViewData); }

    Read the article

  • Why isn't jQuery automatically appending the JSONP callback?

    - by Aseem Kishore
    The $.getJSON() documentation states: If the specified URL is on a remote server, the request is treated as JSONP instead. See the discussion of the jsonp data type in $.ajax() for more details. The $.ajax() documentation for the jsonp data type states (emphasis mine): Loads in a JSON block using JSONP. Will add an extra "?callback=?" to the end of your URL to specify the callback. So it seems that if I call $.getJSON() with a cross-domain URL, the extra "callback=?" parameter should automatically get added. (Other parts of the documentation support this interpretation.) However, I'm not seeing that behavior. If I don't add the "callback=?" explicitly, jQuery incorrectly makes an XMLHttpRequest (which returns null data since I can't read the response cross-domain). If I do add it explicitly, jQuery correctly makes a <script> request. Here's an example: var URL = "http://www.geonames.org/postalCodeLookupJSON" + "?postalcode=10504&country=US"; function alertResponse(data, status) { alert("data: " + data + ", status: " + status); } $.getJSON(URL, alertResponse); // alerts "data: null, status: success" $.getJSON(URL + "&callback=?", alertResponse); // alerts "data: [object Object], status: undefined" So what's going on? Am I misunderstanding the documentation or forgetting something? It goes without saying that this isn't a huge deal, but I'm creating a web API and I purposely set the callback parameter to "callback" in the hopes of tailoring it nicely to jQuery usage. Thanks!

    Read the article

  • Bibtex with no references title

    - by Bryan Ward
    I am working on writing a scientific poster in LaTeX, and I want to include a few references for my work. Because this is a poster, I have my own customized headers for different sections, and don't want my related works to have a separate title. Essentially I have something like this: \begin{textblock}{5.5}(19.5,11) \CHead{Related Work} %a newcommand header I wrote \bibliographystyle{acm} \bibliography{mybib} \end{textblock} And it comes out with a header called "Related Work" like I want, but it also under that says "References", which I don't want. I found a few websites that said that I could override this with something like \renewcommand\refname{} But all this does is take the word "References" out, but the space allotted for the title is still there. Is there a way to completely eliminate the title and any space it may take up?

    Read the article

  • How much slower is a try/catch block? [closed]

    - by Euclid
    Possible Duplicate: What is the real overhead of try/catch in C#? how much slower is a try catch block than a conditional? eg try { v = someArray[10]; } catch { v = defaultValue; } or if (null != someArray) { v = someArray[10]; } else { v = defaultValue; } is there much in it or isn't there a definative performance differance?

    Read the article

  • Design Help! How can design Extended properties for Entity with simple and complex data in extended

    - by mmtemporary
    I have design question. I have entity such as "Person". Person has properties such as: FirstName, LastName, Gender, BirthDate, .... End user when create a person in application may be need to define another property that is not defined in database table schema (or class person). for example: end user nead to define "property1" that its a string property. or nead define "proerty2" that its a image, or need define "property3" that its complex type. please separate your design solution in tow level: 1-database table design 2-class design thank u.

    Read the article

  • How to use V8's built in functions

    - by Victor jiang
    I'm new in both javascript and V8. According to Google's Embedder's Guide, I saw something in the context section talking about built-in utility javascript functions. And I also found some .js files(e.g. math.js) in the downloaded source code, so I tried to write a simple program to call functions in these files, but I failed. Does a context created by Persistent<Context> context = Context::New() have any built-in js functions? How can I access them? Is there a way to first import existing js files as a library(something like src="xxx" type="text/javascript" in HTML page) and then run my own execute script? Can I call google maps api through the embedded V8 library in app? How?

    Read the article

  • cURL or SSL problems, how to solve?

    - by deadman
    I keep getting this error: No cURL data returned for https://XXX.XXXX.XXX:XXXX [0] SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed I am not sure, or I could say, I dont know what is this problem. And how to solve this? Please help!

    Read the article

  • Copy SQL 2005 view result column headers?

    - by DonnMt
    Is there a way to copy View output column headers along with the data? There is a setting in Options to include column headers with query results, but that only works with "New Query" and Stored Procedure output. Looks like SSMS 2008 has this functionality built in to the contextual menu when you right click on results, but I only have 2005. Am I out of luck? Thanks for any help.

    Read the article

  • Query on MVVM pattern in WPF?

    - by Ashish Ashu
    I am implementing a MVVM pattern in my WPF application. My application main window is divided into four parts: Main Menu On the Top Outlook Navigation Control on the Left. A List View on the Middle. Another List view on the bottom. The Navigation control shows different setting (configuration) controls in the Tab items. All the four above are user controls which are placed in the main window. And corresponding to each user control there is separate view model which is bounded with a view model in the XAML of each control, however the model class remain the same between all the view model. And a MainWindow has a seperate View Model which is also bounded with a view model in the XAML of each control. Please help me out in framing a design in which each view models of all the controls above will interact with each other. Please let me know if my question is not clear to you!!

    Read the article

  • pthread_exit and/or pthread_join causing Abort and SegFaults.

    - by MJewkes
    The following code is a simple thread game, that switches between threads causing the timer to decrease. It works fine for 3 threads, causes and Abort(core dumped) for 4 threads, and causes a seg fault for 5 or more threads. Anyone have any idea why this might be happening? #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <errno.h> #include <assert.h> int volatile num_of_threads; int volatile time_per_round; int volatile time_left; int volatile turn_id; int volatile thread_running; int volatile can_check; void * player (void * id_in){ int id= (int)id_in; while(1){ if(can_check){ if (time_left<=0){ break; } can_check=0; if(thread_running){ if(turn_id==id-1){ turn_id=random()%num_of_threads; time_left--; } } can_check=1; } } pthread_exit(NULL); } int main(int argc, char *args[]){ int i; int buffer; pthread_t * threads =(pthread_t *)malloc(num_of_threads*sizeof(pthread_t)); thread_running=0; num_of_threads=atoi(args[1]); can_check=0; time_per_round = atoi(args[2]); time_left=time_per_round; srandom(time(NULL)); //Create Threads for (i=0;i<num_of_threads;i++){ do{ buffer=pthread_create(&threads[i],NULL,player,(void *)(i+1)); }while(buffer == EAGAIN); } can_check=1; time_left=time_per_round; turn_id=random()%num_of_threads; thread_running=1; for (i=0;i<num_of_threads;i++){ assert(!pthread_join(threads[i], NULL)); } return 0; }

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >