Search Results

Search found 20883 results on 836 pages for 'wont say'.

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

  • Factory Pattern - when do you say you need a specialised factory

    - by dbones
    Hi, I am having a little design crisis, I am making a Plane class, which is made of an engine 2 wings and N seats The engine takes in a engine size, and the wings have a span. would this still be feasible to have a PlaneFactory, when the factory may have to take in multiple parameters to setup the plane (wings, engine, no of seats) thanks in advance bones

    Read the article

  • Valgrind says "stack allocation," I say "heap allocation"

    - by Joel J. Adamson
    Dear Friends, I am trying to trace a segfault with valgrind. I get the following message from valgrind: ==3683== Conditional jump or move depends on uninitialised value(s) ==3683== at 0x4C277C5: sparse_mat_mat_kron (sparse.c:165) ==3683== by 0x4C2706E: rec_mating (rec.c:176) ==3683== by 0x401C1C: age_dep_iterate (age_dep.c:287) ==3683== by 0x4014CB: main (age_dep.c:92) ==3683== Uninitialised value was created by a stack allocation ==3683== at 0x401848: age_dep_init_params (age_dep.c:131) ==3683== ==3683== Conditional jump or move depends on uninitialised value(s) ==3683== at 0x4C277C7: sparse_mat_mat_kron (sparse.c:165) ==3683== by 0x4C2706E: rec_mating (rec.c:176) ==3683== by 0x401C1C: age_dep_iterate (age_dep.c:287) ==3683== by 0x4014CB: main (age_dep.c:92) ==3683== Uninitialised value was created by a stack allocation ==3683== at 0x401848: age_dep_init_params (age_dep.c:131) However, here's the offending line: /* allocate mating table */ age_dep_data->mtable = malloc (age_dep_data->geno * sizeof (double *)); if (age_dep_data->mtable == NULL) error (ENOMEM, ENOMEM, nullmsg, __LINE__); for (int j = 0; j < age_dep_data->geno; j++) { 131=> age_dep_data->mtable[j] = calloc (age_dep_data->geno, sizeof (double)); if (age_dep_data->mtable[j] == NULL) error (ENOMEM, ENOMEM, nullmsg, __LINE__); } What gives? I thought any call to malloc or calloc allocated heap space; there is no other variable allocated here, right? Is it possible there's another allocation going on (the offending stack allocation) that I'm not seeing? You asked to see the code, here goes: /* Copyright 2010 Joel J. Adamson <[email protected]> $Id: age_dep.c 1010 2010-04-21 19:19:16Z joel $ age_dep.c:main file Joel J. Adamson -- http://www.unc.edu/~adamsonj Servedio Lab University of North Carolina at Chapel Hill CB #3280, Coker Hall Chapel Hill, NC 27599-3280 This file is part of an investigation of age-dependent sexual selection. This code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with haploid. If not, see <http://www.gnu.org/licenses/>. */ #include "age_dep.h" /* global variables */ extern struct argp age_dep_argp; /* global error message variables */ char * nullmsg = "Null pointer: %i"; /* error message for conversions: */ char * errmsg = "Representation error: %s"; /* precision for formatted output: */ const char prec[] = "%-#9.8f "; const size_t age_max = AGEMAX; /* maximum age of males */ static int keep_going_p = 1; int main (int argc, char ** argv) { /* often used counters: */ int i, j; /* read the command line */ struct age_dep_args age_dep_args = { NULL, NULL, NULL }; argp_parse (&age_dep_argp, argc, argv, 0, 0, &age_dep_args); /* set the parameters here: */ /* initialize an age_dep_params structure, set the members */ age_dep_params_t * params = malloc (sizeof (age_dep_params_t)); if (params == NULL) error (ENOMEM, ENOMEM, nullmsg, __LINE__); age_dep_init_params (params, &age_dep_args); /* initialize frequencies: this initializes a list of pointers to initial frqeuencies, terminated by a NULL pointer*/ params->freqs = age_dep_init (&age_dep_args); params->by = 0.0; /* what range of parameters do we want, and with what stepsize? */ /* we should go from 0 to half-of-theta with a step size of about 0.01 */ double from = 0.0; double to = params->theta / 2.0; double stepsz = 0.01; /* did you think I would spell the whole word? */ unsigned int numparts = floor(to / stepsz); do { #pragma omp parallel for private(i) firstprivate(params) \ shared(stepsz, numparts) for (i = 0; i < numparts; i++) { params->by = i * stepsz; int tries = 0; while (keep_going_p) { /* each time through, modify mfreqs and mating table, then go again */ keep_going_p = age_dep_iterate (params, ++tries); if (keep_going_p == ERANGE) error (ERANGE, ERANGE, "Failure to converge\n"); } fprintf (stdout, "%i iterations\n", tries); } /* for i < numparts */ params->freqs = params->freqs->next; } while (params->freqs->next != NULL); return 0; } inline double age_dep_pmate (double age_dep_t, unsigned int genot, double bp, double ba) { /* the probability of mating between these phenotypes */ /* the female preference depends on whether the female has the preference allele, the strength of preference (parameter bp) and the male phenotype (age_dep_t); if the female lacks the preference allele, then this will return 0, which is not quite accurate; it should return 1 */ return bits_isset (genot, CLOCI)? 1.0 - exp (-bp * age_dep_t) + ba: 1.0; } inline double age_dep_trait (int age, unsigned int genot, double by) { /* return the male trait, a function of the trait locus, age, the age-dependent scaling parameter (bx) and the males condition genotype */ double C; double T; /* get the male's condition genotype */ C = (double) bits_popcount (bits_extract (0, CLOCI, genot)); /* get his trait genotype */ T = bits_isset (genot, CLOCI + 1)? 1.0: 0.0; /* return the trait value */ return T * by * exp (age * C); } int age_dep_iterate (age_dep_params_t * data, unsigned int tries) { /* main driver routine */ /* number of bytes for female frequencies */ size_t geno = data->age_dep_data->geno; size_t genosize = geno * sizeof (double); /* female frequencies are equal to male frequencies at birth (before selection) */ double ffreqs[geno]; if (ffreqs == NULL) error (ENOMEM, ENOMEM, nullmsg, __LINE__); /* do not set! Use memcpy (we need to alter male frequencies (selection) without altering female frequencies) */ memmove (ffreqs, data->freqs->freqs[0], genosize); /* for (int i = 0; i < geno; i++) */ /* ffreqs[i] = data->freqs->freqs[0][i]; */ #ifdef PRMTABLE age_dep_pr_mfreqs (data); #endif /* PRMTABLE */ /* natural selection: */ age_dep_ns (data); /* normalized mating table with new frequencies */ age_dep_norm_mtable (ffreqs, data); #ifdef PRMTABLE age_dep_pr_mtable (data); #endif /* PRMTABLE */ double * newfreqs; /* mutate here */ /* i.e. get the new frequency of 0-year-olds using recombination; */ newfreqs = rec_mating (data->age_dep_data); /* return block */ { if (sim_stop_ck (data->freqs->freqs[0], newfreqs, GENO, TOL) == 0) { /* if we have converged, stop the iterations and handle the data */ age_dep_sim_out (data, stdout); return 0; } else if (tries > MAXTRIES) return ERANGE; else { /* advance generations */ for (int j = age_max - 1; j < 0; j--) memmove (data->freqs->freqs[j], data->freqs->freqs[j-1], genosize); /* advance the first age-class */ memmove (data->freqs->freqs[0], newfreqs, genosize); return 1; } } } void age_dep_ns (age_dep_params_t * data) { /* calculate the new frequency of genotypes given additive fitness and selection coefficient s */ size_t geno = data->age_dep_data->geno; double w[geno]; double wbar, dtheta, ttheta, dcond, tcond; double t, cond; /* fitness parameters */ double mu, nu; mu = data->wparams[0]; nu = data->wparams[1]; /* calculate fitness */ for (int j = 0; j < age_max; j++) { int i; for (i = 0; i < geno; i++) { /* calculate male trait: */ t = age_dep_trait(j, i, data->by); /* calculate condition: */ cond = (double) bits_popcount (bits_extract(0, CLOCI, i)); /* trait-based fitness term */ dtheta = data->theta - t; ttheta = (dtheta * dtheta) / (2.0 * nu * nu); /* condition-based fitness term */ dcond = CLOCI - cond; tcond = (dcond * dcond) / (2.0 * mu * mu); /* calculate male fitness */ w[i] = 1 + exp(-tcond) - exp(-ttheta); } /* calculate mean fitness */ /* as long as we calculate wbar before altering any values of freqs[], we're safe */ wbar = gen_mean (data->freqs->freqs[j], w, geno); for (i = 0; i < geno; i++) data->freqs->freqs[j][i] = (data->freqs->freqs[j][i] * w[i]) / wbar; } } void age_dep_norm_mtable (double * ffreqs, age_dep_params_t * params) { /* this function produces a single mating table that forms the input for recombination () */ /* i is female genotype; j is male genotype; k is male age */ int i,j,k; double norm_denom; double trait; size_t geno = params->age_dep_data->geno; for (i = 0; i < geno; i++) { double norm_mtable[geno]; /* initialize the denominator: */ norm_denom = 0.0; /* find the probability of mating and add it to the denominator */ for (j = 0; j < geno; j++) { /* initialize entry: */ norm_mtable[j] = 0.0; for (k = 0; k < age_max; k++) { trait = age_dep_trait (k, j, params->by); norm_mtable[j] += age_dep_pmate (trait, i, params->bp, params->ba) * (params->freqs->freqs)[k][j]; } norm_denom += norm_mtable[j]; } /* now calculate entry (i,j) */ for (j = 0; j < geno; j++) params->age_dep_data->mtable[i][j] = (ffreqs[i] * norm_mtable[j]) / norm_denom; } } My current suspicion is the array newfreqs: I can't memmove, memcpy or assign a stack variable then hope it will persist, can I? rec_mating() returns double *.

    Read the article

  • Algorithm detect repeating/similiar strings in a corpus of data -- say email subjects, in Python

    - by RizwanK
    I'm downloading a long list of my email subject lines , with the intent of finding email lists that I was a member of years ago, and would want to purge them from my Gmail account (which is getting pretty slow.) I'm specifically thinking of newsletters that often come from the same address, and repeat the product/service/group's name in the subject. I'm aware that I could search/sort by the common occurrence of items from a particular email address (and I intend to), but I'd like to correlate that data with repeating subject lines.... Now, many subject lines would fail a string match, but "Google Friends : Our latest news" "Google Friends : What we're doing today" are more similar to each other than a random subject line, as is: "Virgin Airlines has a great sale today" "Take a flight with Virgin Airlines" So -- how can I start to automagically extract trends/examples of strings that may be more similar. Approaches I've considered and discarded ('because there must be some better way'): Extracting all the possible substrings and ordering them by how often they show up, and manually selecting relevant ones Stripping off the first word or two and then count the occurrence of each sub string Comparing Levenshtein distance between entries Some sort of string similarity index ... Most of these were rejected for massive inefficiency or likelyhood of a vast amount of manual intervention required. I guess I need some sort of fuzzy string matching..? In the end, I can think of kludgy ways of doing this, but I'm looking for something more generic so I've added to my set of tools rather than special casing for this data set. After this, I'd be matching the occurring of particular subject strings with 'From' addresses - I'm not sure if there's a good way of building a data structure that represents how likely/not two messages are part of the 'same email list' or by filtering all my email subjects/from addresses into pools of likely 'related' emails and not -- but that's a problem to solve after this one. Any guidance would be appreciated.

    Read the article

  • Tweak Data in Doctrine Migration (say, by running some arbitrary queries)

    - by timdev
    I've got a migration that creates a couple of columns that act as foreign keys. In particular, I'm adding a creator_id and owner_id column to a model. These foreign keys indicate who created, and who currently owns, a particular kind of domain object. Users are managed by sfDoctrineGuardPlugin. What I'd like to do, for the purpose of the migration, is look up the (active) user with the lowest id, and default creator_id/owner_id to that. I don't see any particularly obvious/proper way to run arbitrary operations on the database during a migration. Does anyone know how?

    Read the article

  • Scrolling a Div programatically using say Javascript

    - by SARAVAN
    Hi I have a jqgrid which is embedded in a Div. I am deleting records from the grid and reloading the grid using grid.Trigger('reload'). The width of the grid is considerably high so it has a scroll bar. Now I scrolled through the end of the grid horizontally before deleting records. Each time I delete the records and reload the grid, the column headers and their values are slightly misaligned. When I move the scroll bar back to original position or just move the scroll bar slightly they are aligned properly. So I thought its better to move the scroll bar to its inital position when the grid reloads. How can a scroll bar be programatically moved using javascript. Or is there any other way to solve my problem?

    Read the article

  • Drupal Webforms module - Form results say "Array" instead of form values

    - by Doc Falken
    I have a simple form built with the Webforms module in Drupal. The standard textfield form fields work perfectly. However if I use the preset date or time form values, they don't get emailed properly when the form is submitted. For instance, if there was a date field in my form, it would submit fine and render on the results page just fine, but if I wanted that value to be included in an email, it would show up as "Array" within the text of the email instead of showing the date. There is an open support issue within the module issues page, but I'm hoping for any additional help.

    Read the article

  • NoSuchMethodErrors say the darndest things

    - by keynan21
    So, I'm working in eclipse were everything compiles and runs correctly. However, when compiling under ant for the build server, A large number of tests fail with a NoSuchMethodError saying: class A implements B interface B extends C C requires method getSyncID() // standard getter for an int field. A.java contains getSyncID() A.class contains getSyncID() and yet the Error is still thrown. Does anyone know how the hell this could happen? how to fix it.

    Read the article

  • Per Process Memory Calculation Alogrithm in Linux (say kernel 2.6 and above)

    - by Vaibhav Singh
    How do you calculate the linux process's Acutal Memory Usage and Not Virtual Memory Usage through the information supplied by /proc//smaps or maps or status or stat. To be more precise I need the heap usage only. I need to do this on an PowerPc based embedded system and hence I do not have utilities like exmap, valgrind etc. I understand the concepts of shared/non shared memory. I have read through the other topics given in this forum about the same but they talk more using the tools mentioned. What I need is the native way of calculation done by the same tools so that I may write a shell script for the same.

    Read the article

  • DBA's say no to SQL Server DTC?

    - by NabilS
    I am trying to get our DBA's to enable DTC on a cluster of SQL Server 2005. Unfortunately they keep refusing. Their argument that they would need to set up a dedicated host for DTC (Could take months!!) as it is not a matter of ticking a few boxes. Is this true? How intrusive is DTC on a shared environment such as a SQL farm. Do I have an argument against this? Thanks

    Read the article

  • WebGL on older Mac OS X versions (say 10.4)

    - by rotoglup
    Not really a programming related question but... I'd like very much to experiment with WebGL on my spare time. My current 'spare time' machine is a MacBook running Mac OS X Tiger (10.4.xx) and I'm unable to find a new browser supporting this OS. Firefox dropped support, Chrome too, and Safari idem. I read somewhere that this is due to a Quicktime bug that Apple won't fix. Does anyone have more information on this issue ? Does anyone have a clue or track to find a running implementation of WebGL on Mac OS X 10.4 ? Cheers,

    Read the article

  • Paperclip wont save image in rails app

    - by Micke
    Hello stackoverflow. I am trying to use Paperclip with my rails app to add an avatar to a user but it wont save my image when creating the user. This is what the model looks like: class User < ActiveRecord::Base has_attached_file :avatar And the registerform in haml: - form_for :user, @user, :url => { :action => "signup" }, :html => { :multipart => true } do |f| ... ... %li %div{:class => "header"} Profilepicture %div{:class => "input"} = f.file_field :avatar And when i look in the log this is what is being passet to the "signup" action: Parameters: {"commit"=>"Save", "action"=>"signup", "controller"=>"user/register", "user"=>{"name"=>"Micke Lisinge", "birthmonth"=>"07", "password_confirmation"=>"[FILTERED]", "nickname"=>"lisinge", "avatar"=>#<File:/tmp/RackMultipart20100426-3076-1x04oxy-0>, "gen"=>"m", "birthday"=>"23", "password"=>"[FILTERED]", "birthyear"=>"1992", "email"=>"[email protected]"}} [paperclip] Saving attachments. Paperclip says it is saving the template but when i look in the public folder in my app it has created a system but the system folder is empty. So it seems like it isnt saving the picture to the folder. It gets handled by the form and saved in my /tmp folder. Maybe you guys have any tips or know what this problem might be? Thanks in advance, Micke.

    Read the article

  • Variable wont echo

    - by jonnnnnnnnnie
    I have the following code, where the var $username doesn't echo, when you type in a value. //TODO: SET AUTH TOKEN as random hash, save in session $auth_token = rand(); if (isset($_POST['action']) && $_POST['action'] == 'Login') { $errors = array(); //USED TO BUILD UP ARRAY OF ERRORS WHICH ARE THEN ECHOED $username = $_POST['username']; if ($username = '') { $errors['username'] = 'Username is required'; } echo $username; // var_dump($username) returns string 0 } require_once 'login_form.html.php'; ?> login_form is this: <form method="POST" action=""> <input type="hidden" name="auth_token" value="<?php echo $auth_token ?>"> Username: <input type="text" name="username"> Password: <input type="password" name="password1"> <input type="submit" name="action" value="Login"> </form> The auth token part isn't important, it just when I type in a value in username textbox and press the login button, the username wont echo, var_dump returns string (0) and print_r is just blank.

    Read the article

  • WPF ListView Data Binding wont synchronize

    - by Aviatrix
    my listview will display only the item that its added by the constructor and it wont add the items that i add dynamically public class PostList : ObservableCollection<PostData> { public PostList() : base() { Add(new PostData("Isak", "Dinesen")); // Add(new PostData("Victor", "Hugo")); // Add(new PostData("Jules", "Verne")); } public void AddToList (string[] data){ string username2, msg; msg = data[0]; username2 = data[1]; Add(new PostData(msg, username2)); } } public class PostData { private string Username; private string Msg; private string Avatar; private string LinkAttached; private string PicAttached; private string VideoAttached; public PostData(string msg ,string username, string avatar=null, string link=null,string pic=null ,string video=null) { this.Username = username; this.Msg = msg; this.Avatar = avatar; this.LinkAttached = link; this.PicAttached = pic; this.VideoAttached = video; } public string pMsg { get { return Msg; } set { Msg = value; } } public string pUsername { get { return Username; } set { Username = value; } } ..... ..... } Xaml <ListView x:Name="PostListView" BorderThickness="0" MinHeight="300" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" VerticalContentAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" IsSynchronizedWithCurrentItem="True" MinWidth="332" SelectedIndex="0" SelectionMode="Extended" AlternationCount="1" ItemsSource="{Binding Source={StaticResource PostListData}}"> <ListView.ItemTemplate> <DataTemplate> <DockPanel x:Name="SinglePost" VerticalAlignment="Top" ScrollViewer.CanContentScroll="True" ClipToBounds="True" Width="333" Height="70" d:LayoutOverrides="VerticalAlignment" d:IsEffectDisabled="True"> <StackPanel x:Name="AvatarNickHolder" Width="60"> <Label x:Name="Nick" HorizontalAlignment="Center" Margin="5,0" VerticalAlignment="Top" Height="15" Content="{Binding Path=pUsername}" FontFamily="Arial" FontSize="10.667" Padding="5,0"/> <Image x:Name="Avatar" HorizontalAlignment="Center" Margin="5,0,5,5" VerticalAlignment="Top" Width="50" Height="50" IsHitTestVisible="False" Source="1045443356IMG_0972.jpg" Stretch="UniformToFill"/> </StackPanel> <TextBlock x:Name="userPostText" Margin="0,0,5,0" VerticalAlignment="Center" FontSize="10.667" Text="{Binding Path=pMsg}" TextWrapping="Wrap"/> </DockPanel> </DataTemplate> </ListView.ItemTemplate> </ListView>

    Read the article

  • Modal PopUp Extender labels wont update on Asynchronous Postback

    - by newbie2k
    Hi everyone! I have a ModalPopUpExtender with an UpdatePanel on it. On the UpdatePanel,there few labels and componentart Grid which Updates from the server on every Asynchronous postback when an image button is clicked. The Problem is that the server code updates the modalpopupextender labels as the information on the grid but it wont display the Updated version of it on the modal Popup Extender. Need some Help... Heres the sample code:     Name:     Loyalty Mode:     Expire Mode:     LoadingPanelClientTemplateId="LoadingFeedbackTemplate3" LoadingPanelPosition="MiddleCenter" LoadingPanelFadeDuration="1000" LoadingPanelFadeMaximumOpacity="60" OnNeedDataSource="LItemGrid_NeedDataSource" OnNeedRebind="LItemGrid_NeedRebind" OnPageIndexChanged="LItemGrid_PageIndexChanged" OnFilterCommand="LItemGrid_FilterCommand" OnSortCommand="LItemGrid_SortCommand" ShowFooter="true" PageSize="10" PagerStyle="Numbered" </Columns> </ComponentArt:GridLevel> </Levels> <ClientTemplates><ComponentArt:ClientTemplate Id="ClientTemplate2"> <table width="200" ><tr><td valign="center" align="center"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td style="font-size:10px;font-family:Verdana;">Loading...&nbsp;</td> <td><img src="images/spinner.gif" width="16" height="16" border="0"></td> </tr> </table> </td></tr></table> </ComponentArt:ClientTemplate> </ClientTemplates> </ComponentArt:Grid></ContentTemplate> <asp:Button ID="btnClose" runat="server" Text="Close" /> </asp:Panel> <asp:ModalPopupExtender TargetControlID="SaveImageButton1" ID="pnlModal_ModalPopupExtender" runat="server" DynamicServicePath="" Enabled="True" BackgroundCssClass="modalBackground" PopupControlID="pnlModal" CancelControlID="btnClose" DropShadow="true"> </asp:ModalPopupExtender> </ContentTemplate> </asp:UpdatePanel>

    Read the article

  • War wont deploy "Unresolved <ejb-link>" Glassfish 3, Netbeans 7

    - by Ime Imee
    I have enterprise aplication with ejb and war module, and since I created local interface web module wont deploy. It builds fine. EJB project is referenced inside web project. Also when I delete <ejb-local-ref> from web.xml it deploys, but then lookup method fails. Glassfish error: SEVERE: Exception while deploying the app [Projekat-war] : Error: Unresolved <ejb-link>: Projekat-ejb.jar#ZaWebSessionBean Simple interface: @Local public interface ZaWebSessionBeanLocal { String vrati(String str); } @Stateless public class ZaWebSessionBean implements ZaWebSessionBeanLocal { @Override public String vrati(String str) { return "vrati"; } // Add business logic below. (Right-click in editor and choose // "Insert Code > Add Business Method") } And web.xml <ejb-local-ref> <ejb-ref-name>ZaWebSessionBean</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>za_web.ZaWebSessionBeanLocal</local> <ejb-link>Projekat-ejb.jar#ZaWebSessionBean</ejb-link> </ejb-local-ref> Lookup method (generated) : public class HeaderBean { ZaWebSessionBeanLocal zaWebSessionBean = lookupZaWebSessionBeanLocal(); private ZaWebSessionBeanLocal lookupZaWebSessionBeanLocal() { try { Context c = new InitialContext(); return (ZaWebSessionBeanLocal) c.lookup("java:global/Projekat/Projekat-ejb/ZaWebSessionBean!za_web.ZaWebSessionBeanLocal"); } catch (NamingException ne) { Logger.getLogger(getClass().getName()).log(Level.SEVERE, "exception caught", ne); throw new RuntimeException(ne); } } Full log: SEVERE: Exception while deploying the app [Projekat-war] : Error: Unresolved <ejb-link>: Projekat-ejb.jar#ZaWebSessionBean SEVERE: Unresolved <ejb-link>: Projekat-ejb.jar#ZaWebSessionBean SEVERE: Exception while deploying the app [Projekat-war] SEVERE: Error: Unresolved <ejb-link>: Projekat-ejb.jar#ZaWebSessionBean java.lang.RuntimeException: Error: Unresolved <ejb-link>: Projekat-ejb.jar#ZaWebSessionBean at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:724) at com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:2004) at com.sun.enterprise.deployment.Application.visit(Application.java:1777) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:195) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:185) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:827) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:769) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:619) SEVERE: Exception while deploying the app [Projekat-war] : Error: Unresolved <ejb-link>: Projekat-ejb.jar#ZaWebSessionBean

    Read the article

  • modalpopupextender.Show() wont fire

    - by Peter Lea
    I'm pretty new to developing for the web so bare with me. I have a company page with multiple locations and emails etc at each of these addresses. The idea is to have a single modalpopup to edit each type of data (one for email, one for urls, one for addresses etc). I link the modalpopupextender to a hiddenbutton and then call an edit function from various places where I can populate some hiddenfields and textboxes in the panel before showing it. The code executes but it just wont show the damn popup, I just see a flash and can't figure out if its my panel, my css or something I don't understand about ajax and postbacks etc. Things i've tried after reading various threads: Disable smart navigation in web.config Move ToolKitScriptManager up to master page and use proxy in content set hiddenbutton to use style="display:none" tried links etc instead of hidden button Heres my code CSS .modalBackground { position: absolute; z-index: 100; top: 0px; left: 0px; background-color: #000; filter: alpha(opacity=60); -moz-opacity: 0.6; opacity: 0.6; } .modalPopup { background-color: #FFD; border-width: 3px; border-style: solid; border-color: gray; padding: 3px;} Asp/html <ajaxToolkit:ModalPopupExtender runat="server" ID="mpe_email" BackgroundCssClass="modalBackground" PopupControlID="modal_email" CancelControlID="btn_cancel_email" TargetControlID="fake_btn_email" /> <asp:Button ID="fake_btn_email" runat="server" Text="email" style="display:none;" /> <asp:panel id="modal_email" runat="server" class="modalPopup" Width="500px" Height="500px"> <asp:HiddenField ID="hf_modal_email_location_id" runat="server" Value="" /> <asp:HiddenField ID="hf_modal_email_contact_id" runat="server" Value="" /> <asp:HiddenField ID="hf_modal_email_comms_id" runat="server" Value="" /> <table width="100%"> <tr> <td> <asp:Label ID="lbl_mpe_email_title" runat="server" Text="Edit Email Address" /> </td> </tr> <tr> <td> <table width="100%"> <tr> <td width="40px"><img src="../images/email.png" height="30px" width="30px"/></td> <td> <table width="100px"> <tr> <td><span>Quick Ref: <asp:TextBox ID="txb_mpe_email_qref" runat="server" Text="" /></span></td> </tr> <tr> <td><span>Email Address: <asp:TextBox ID="txb_mpe_email_address_full" runat="server" Text="" /></span></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td width="40px" align="left"><asp:Button ID="btn_cancel_email" runat="server" Text="Cancel"/></td> <td align="right"><asp:Button ID="btn_save_email" runat="server" Text="Save" OnCommand="save_modal_email" /></td> </tr> <tr> <td colspan="2" align="right"><asp:Label ID="lbl_mpe_email_err" runat="server" Text="" /></td> </tr> </table> c# public void oloc_ocon_email_edit(object sender, RepeaterCommandEventArgs e) { switch (e.CommandName) { case "edit": hf_modal_email_location_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_location_id")).Value; hf_modal_email_contact_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_contact_id")).Value; hf_modal_email_comms_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_comms_id")).Value; lbl_mpe_email_title.Text = "Edit Email Address"; txb_mpe_email_qref.Text = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_qref")).Value; txb_mpe_email_address_full.Text = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_email_full")).Value; lbl_mpe_email_err.Text = ""; mpe_email.Show(); break; case "new": hf_modal_email_location_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_location_id_p")).Value; hf_modal_email_contact_id.Value = ((HiddenField)e.Item.FindControl("hf_oloc_ocon_emails_contact_id_p")).Value; hf_modal_email_comms_id.Value = "0"; lbl_mpe_email_title.Text = "New Email Address"; txb_mpe_email_qref.Text = ""; txb_mpe_email_address_full.Text = ""; lbl_mpe_email_err.Text = ""; mpe_email.Show(); break; } } Stuff makes so much more sense in a desktop environment, I hope someone can point me in the right direction. Thanks

    Read the article

  • Picker view wont rotate- iPhone

    - by lotuseater
    hi, I am making a booking page. I have included 3 pickers in it. I have included all the delegates required for the pickers to work but it wont rotate. I have enabled user interaction and multitouch in the nib file. Here is my code. Please help me. :( @interface ChooseContactsFrom : UIViewController { IBOutlet UIPickerView *statePickup; IBOutlet UIPickerView *paymentMethodPickup; IBOutlet UIDatePicker *expiryDatePickup; IBOutlet UIView *statePickupView; IBOutlet UIView *paymentMethodPickupView; IBOutlet UIView *expiryDatePickupView; } (void)viewDidLoad { self.title = @"Choose Contacts"; //Fill in the states name/ stateArray = [[NSArray alloc]initWithObjects:@"",nil]; paymentModeArray = [[NSArray alloc] initWithObjects:@"Credit Card", @"Cash",@"Account",@"Voucher",@"Debit Card", nil]; paymentMethodPickup.frame = CGRectMake(0.0, 44.0, paymentMethodPickup.frame.size.width, paymentMethodPickup.frame.size.height); paymentMethodPickup.userInteractionEnabled = YES; paymentMethodPickup.multipleTouchEnabled = YES; paymentMethodPickupView.frame = CGRectMake(0.0, 210.0, paymentMethodPickupView.frame.size.width, paymentMethodPickupView.frame.size.height); statePickup.frame = CGRectMake(0.0, 44.0,statePickup.frame.size.width, statePickup.frame.size.height); statePickupView.frame = CGRectMake(0.0, 210.0, statePickupView.frame.size.width, statePickupView.frame.size.height); stateArray = [[NSArray alloc] initWithObjects:@"state1", @"state2", @"state3", @"state4", @"state5", @"state6", @"state7", @"state8", @"state9", @"state10", nil]; expiryDatePickup.frame = CGRectMake(0.0, 44.0, expiryDatePickup.frame.size.width, expiryDatePickup.frame.size.height); expiryDatePickupView.frame = CGRectMake(0.0, 210.0, expiryDatePickupView.frame.size.width, expiryDatePickupView.frame.size.height); [super viewDidLoad]; } -(IBAction)back:(id)sender { [self dismissModalViewControllerAnimated:YES]; } pragma mark pickerView delegates (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView { return 1; } (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component { if( thePickerView == statePickup) { return [stateArray count]; } else if(thePickerView == paymentMethodPickup) { return [paymentModeArray count]; } else { return 0; } } (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { if(thePickerView == statePickup) { return [stateArray objectAtIndex:row]; } else if(thePickerView == paymentMethodPickup) { return [paymentModeArray objectAtIndex:row]; } else { return @" "; } } (CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component{ return 50; } (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component { return 250; } (void)pickerView:(UIPickerView *)thepickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { if(thepickerView == statePickup) { state.text=[stateArray objectAtIndex:row]; } if(thepickerView == paymentMethodPickup) { payment.text=[paymentModeArray objectAtIndex:row]; } } (void)ClearSubviews { //[firstName resignFirstResponder]; // [lastName resignFirstResponder]; // [email resignFirstResponder]; // [address1 resignFirstResponder]; // [address2 resignFirstResponder]; // [city resignFirstResponder]; // //[state resignFirstResponder]; // [payment resignFirstResponder]; // [creditCard resignFirstResponder]; // [expirydate removeFromSuperview]; // [statePickup removeFromSuperview]; // [paymentMethodPickup removeFromSuperview]; } (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { // [self showPicker:textField]; //[self setViewMovedUp]; if(textField == firstName || textField == lastName || textField == email || textField == address1 || textField == address2 ||textField == city) { [self ClearSubviews]; //pickerToolbar.hidden = TRUE; return YES; } else if(textField == payment) { [self ClearSubviews]; [self setViewMovedUp]; [payment setText:[paymentModeArray objectAtIndex:0]]; [self.view insertSubview:paymentMethodPickupView aboveSubview:self.view]; return NO; } else if(textField == state) { [self ClearSubviews]; [self setViewMovedUp]; [state setText:[stateArray objectAtIndex:0]]; [self.view insertSubview:statePickupView aboveSubview:self.view]; return NO; } else if(textField == expirydate) { [self setViewMovedUp]; expiryDatePickup.date = [NSDate date]; NSDate *date1 = [NSDate date]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; NSString *strDate=[dateFormatter stringFromDate:date1]; NSString *str=[[NSString alloc] initWithString: strDate]; [expirydate setText:str]; [self.view insertSubview:expiryDatePickupView aboveSubview:self.view]; return NO; } else if(textField == creditCard) { [self ClearSubviews]; [self setViewMovedUp]; return YES; } else { [self ClearSubviews]; return YES; } } -(BOOL)textFieldShouldEndEditing:(UITextField *)textField { return YES; } (void)textFieldDidEndEditing:(UITextField *)textField { if(textField == creditCard) { [self moveDown]; } } (BOOL)textFieldShouldReturn:(UITextField *)textField { [firstName resignFirstResponder]; [lastName resignFirstResponder]; [email resignFirstResponder]; [address1 resignFirstResponder]; [address2 resignFirstResponder]; [city resignFirstResponder]; [creditCard resignFirstResponder]; return YES; } -(IBAction)textFieldDoneEditing:(id)sender { [sender resignFirstResponder]; } ////////----------------------------------------------------------------------- pragma mark move screen (void)setViewMovedUp { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; // Make changes to the view's frame inside the animation block. They will be animated instead // of taking place immediately. CGRect rect = [self.view frame]; // If moving up, not only decrease the origin but increase the height so the view // covers the entire screen behind the keyboard. rect.origin.y -= 50.0f; rect.size.height -= 80.0f; [self.view setFrame:rect]; [UIView commitAnimations]; } -(void)moveDown { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; // Make changes to the view's frame inside the animation block. They will be animated instead // of taking place immediately. CGRect rect = [self.view frame]; rect.origin.y += 50.0f; rect.size.height += 80.0f; [self.view setFrame:rect]; // [UIView setBackgroundColor:[UIColor darkGrayColor]]; [UIView commitAnimations]; } pragma mark Method to show pickers -(void)showPicker:(UITextField *)textField { if(textField == expirydate) { expiryDatePickup .date = [NSDate date]; NSDate *date1 = [NSDate date]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; NSString *strDate=[dateFormatter stringFromDate:date1]; NSString *str=[[NSString alloc] initWithString: strDate]; [expirydate setText:str]; [self.view insertSubview:expiryDatePickup aboveSubview:self.view]; } else if(textField == payment) { [payment setText:[paymentModeArray objectAtIndex:0]]; [self.view insertSubview:paymentMethodPickupView aboveSubview:self.view]; } else if(textField == state) { [state setText:[stateArray objectAtIndex:0]]; [self.view insertSubview:statePickupView aboveSubview:self.view]; } } (IBAction)datePickerChanged:(id)sender { NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; NSDate *date=expiryDatePickup.date; formattedDateString1 = [dateFormatter stringFromDate:date]; [expirydate setText:formattedDateString1]; NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; unsigned int unitFlags = NSMonthCalendarUnit | NSDayCalendarUnit; components = [gregorian components:unitFlags fromDate:date]; [gregorian release]; } pragma mark done and cancel methods -(IBAction) btnCancelExpiryDate:(id)sender { [self moveDown]; [expirydate setText:@" "]; [expiryDatePickupView removeFromSuperview]; } -(IBAction) btnDoneExpiryDate:(id)sender { [self moveDown]; [expiryDatePickupView removeFromSuperview]; expiryDatePickup .date = [NSDate date]; } -(IBAction)cancelPaymentType:(id)sender { [self moveDown]; [payment setText:@" "]; [paymentMethodPickupView removeFromSuperview]; } -(IBAction)donePaymentType:(id)sender { [self moveDown]; [paymentMethodPickupView removeFromSuperview]; } -(IBAction)doneState:(id)sender { [self moveDown]; [statePickupView removeFromSuperview]; } (IBAction)cancelState:(id)sender; { [self moveDown]; [state setText:@" "]; [statePickupView removeFromSuperview]; }

    Read the article

  • Why my shell program wont open the file got as argument in function "cat"

    - by anna karenina
    I included the code below, sorry to bother you with so much code. Argument parsing is ok, i checked it out with watches. I've put some printfs to check out where the problem may be and it seems that it wont open the file cat receives as argument. i called from shell like "cat -b file" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #define TRUE 0 #define FALSE 1 void yes(int argc, char *argv[]); int cat(int argc, char *argv[]); //#include "cat.h" //#include "yes.h" //#include"tee.h" char buf[50],c[10], *p2,*p, *pch; int count; char *matrix[20]; void yes(int argc, char *argv[]) { int i; // if (argc >= 2 && *argv[1] == '-') // { //printf("ERROR!"); //} //if (argc == 1) // { while (1) if (puts("y") == EOF) { perror("yes"); exit(FALSE); } // } while (1) for (i = 1; i < argc; i++) if (fputs(argv[i], stdout) == EOF || putchar(i == argc - 1 ? '\n' : ' ') == EOF) { perror("yes"); exit(FALSE); } //exit(TRUE); } int main(int argc, char *argv[]) { //p=(char *)malloc(sizeof(char)*50); do { fprintf (stderr, "$ "); fgets (buf,50,stdin); p=buf; fprintf (stderr, "Comanda primita de la tastatura: "); fputs (buf, stderr); int i=0,j=0; //strcpy(p,buf); strcpy(c,"\0"); while (buf[i] == ' ') { i++; p++; } if (buf[i] == '#') fprintf (stderr, "Nici o comanda, ci e un comentariu!\n"); else { j=0; while (buf[i] != ' ' && buf[i] != '\n') { i++; j++; } strncpy (c,p,j); fprintf (stderr, "%s\n",c); if (strcmp (c,"yes") == 0) { p2 = p+j+1; pch = strtok (p2," "); count = 0; while (pch != NULL) { //printf ("%s\n",pch); matrix[count] = strdup(pch); pch = strtok (NULL, " "); count++; } yes(count, matrix); fprintf (stderr, "Aici se va executa comanda yes\n"); } else if (strcmp (c,"cat") == 0) { p2 = p+j+1; pch = strtok (p2," "); count = 0; while (pch != NULL) { //printf ("%s\n",pch); matrix[count] = strdup(pch); pch = strtok (NULL, " "); count++; } cat(count,matrix); fprintf (stderr, "Aici se va executa comanda cat \n"); } else if (strcmp (c,"tee") == 0) { //tee(); fprintf(stderr, "Aici se va executa comanda tee\n"); } fprintf (stderr, "Aici se va executa comanda basename\n"); strcpy(buf,"\0"); } } while (strcmp(c, "exit") != 0); fprintf (stderr, "Terminat corect!\n"); return 0; } int cat(int argc, char *argv[]) { int c ; opterr = 0 ; optind = 0 ; char number = 0; char squeeze = 0; char marker = 0; fprintf(stderr,"SALUT< SUNT IN FUNCTIZE>\n"); while ((c = getopt (argc, argv, "bnsE")) != -1) switch (c) { case 'b' : number = 1; break; case 'n' : number = 2; break; case 'm' : marker = 1; break; case 's' : squeeze = 1; break; case 'E' : marker = 1; break; } if (optind + 1 != argc) { fprintf (stderr, "\tWrong arguments!\n") ; return -1 ; } FILE * fd = fopen (argv[optind], "r"); printf("am deschis fisierul %s ",argv[optind]); if (fd == NULL) { printf("FISIER NULL asdasdasdasdasd"); return 1; } char line[1025]; int line_count = 1; while (!feof(fd)) { fgets(line, 1025, fd); printf("sunt in while :> %s",line); int len = strlen(line); if (line[len - 1] == '\n') { if(len - 2 >= 0) { if(line[len - 2] == '\r') { line[len - 2] = '\0'; len -= 2; } else { line[len - 1] = '\0'; len -= 1; } } else { line[len - 1] = '\0'; len -= 1; } } if (squeeze == 1 && len == 0) continue; if (number == 1) { fprintf (stdout, "%4d ", line_count); line_count++; } else if (number == 2) { if (len > 0) { fprintf (stdout, "%4d ", line_count); line_count++; } else fprintf (stdout, " "); } fprintf(stdout, "%s", line); if (marker == 1) fprintf(stdout, "$"); fprintf(stdout, "\n"); } fclose (fd); return 0 ; }

    Read the article

  • trying to read a delimited text file from resources - but it wont run

    - by Bigfatty
    I'm having a problem where instead of reading a text file from the location string, I changed it to read the text file from the resource location and it messes up my program. I've also used the insert snippet method to get most of this code, so it is safe to say I don't know what is going on. Could some one please help? 'reads the text out of a delimited text file and puts the words and hints into to separate arrays ' this works and made the program run ' Dim filename As String = Application.StartupPath + "\ProggramingList.txt" 'this dosnt work and brings back a Illegal characters in path error. dim filename as string = My.Resources.GamesList Dim fields As String() 'my text files are delimited Dim delimiter As String = "," Using parser As New TextFieldParser(filename) parser.SetDelimiters(delimiter) While Not parser.EndOfData ' Read in the fields for the current line fields = parser.ReadFields() ' Add code here to use data in fields variable. 'put the result into two arrays (the fields are the arrays im talking about). one holds the words, and one holds the corresponding hint Programingwords(counter) = Strings.UCase(fields(0)) counter += 1 'this is where the hint is at Programingwords(counter) = (fields(1)) counter += 1 End While End Using

    Read the article

  • Javascript wont change value in TextBox

    - by mattgcon
    Here is my javascript function AppendValues(e) { var lghtcnt = 0; var vars = e.id.split(';'); var highcnt = false; var lghtid = ""; var maxltcnt = 100; for (var x = 0; x < vars.length; x++) { var tokens = vars[x].split('|'); var pram = tokens if (tokens[0] == "ID"){ lghtid = tokens[1]; } if (tokens[0] == "LTC"){ var itemcnt = 0; var currentcnt = 0; currentcnt = parseInt(tokens[1].toString()); var txtid = document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]); if (e.checked) { totallightcnt += currentcnt; if (totallightcnt > maxltcnt) { document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = 0; alert('This puts you over the limit of 100 total lights, please make adjustments.'); break; } document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = currentcnt.toString(); } else { totallightcnt -= currentcnt; document.getElementById(vars[0] + ';' + vars[1] + ';' + vars[2] + ';' + vars[3] + ';' + vars[4]).value = 0; break; } } if (highcnt) { break; } } } Here is the issue, when I check the value it DOES say theupdated value but it does not display to the user on the webpage. What could be the issue?

    Read the article

  • Ubuntu gone out of order - Wont install any packages. What do I do?

    - by Aborted
    Lately, I've been getting some strange behaviour from Ubuntu. First and the most important is that it wont install updates. It gives a package installation error and it simply wont work. Earlier I tried to install TeamViewer via the Software Center, but got the same package error. I also feel like the connection speed is going slower than it should - don't know if this one is relevant to this case. What's wrong with my installation? How do I fix these package installation errors?

    Read the article

  • Eclipse wont open Android Xml files

    - by mike
    I'm just starting with Android and everything seems to be working fine, but when I try to look at any XML file in eclipse, I get the following error. The only way I can see them is by "Opening With" - TextFile. org.eclipse.core.runtime.CoreException: Error opening the Android XML editor. Is the document an XML file? at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.createTextEditor(Unknown Source) at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.createAndroidPages(Unknown Source) at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.addPages(Unknown Source) at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:361) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526) at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Read the article

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