Search Results

Search found 6433 results on 258 pages for 'trouble shooting'.

Page 134/258 | < Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >

  • Persisting a collection backed by viewstate in a CompositeControl

    - by tomfanning
    Maybe it's been a long day but I'm having trouble persisting a collection backed by the ASP.NET ViewState in a CompositeControl. Here's a simplified version: public class MyControl : CompositeControl { public Collection<MyObject> MyObjectCollection { get { return (Collection<MyObject>)ViewState["coll"] == null ? new Collection<MyObject>() : (Collection<MyObject>)ViewState["coll"]; } set { ViewState["coll"] = value; } } } public partial class TestPage : System.Web.UI.Page { protected void btn_Click(object sender, EventArgs e) { myControl1.MyObjectCollection.Add(new MyObject()); } } When the button is clicked, the event hander btn_Click executes fine, but the setter for MyObjectCollection never gets called, hence the new MyObject() never gets persisted. I think I'm just having a blonde moment. Anyone fancy helping out?

    Read the article

  • Recommendations on Triming Large Amounts of Text from a DOM Object

    - by aronchick
    I'm doing some in browser editing, and I have some content that's on the order of around 20k characters long in a <pre>. So it looks something like: <pre> Text 1 Text 2 Text 3 Text 4 [...] Text 20,000 </pre> I'd like to use jquery to trim it down when someone hits a button to chop, but I'm having trouble doing it without overloading the browser. Assume I know that the character numbers are at 16,510 - 17,888, and what I'd like to do is trim it. I was using: jQuery('#textsection').html(jQuery('textarea').html().substr(range.start)); But browsers seem to enjoy crashing when I do this. Alternatives?

    Read the article

  • jQuery: jquery form plugin syntax?

    - by k00k
    I'm using jquery with the jquery form plugin. I read through a bunch of posts, the docs, etc., and I'm still having trouble with what I believe to be simple. I have a form with some simple text inputs and a couple textareas, and I have this link that I want to trigger submission of that form to a specific method (/email): <a id="email-data">Send Email</a> and this jquery in doc ready: $('#email-data').click(function() { var options = { url: '/email/', success: alert('Email sent.') }; $('#report-giftcard-sales-form').ajaxSubmit(options); }); So I would expect it to submit to my /email method, but no such luck. Currently I just have the /email method logging a debug message, so it's as simple as can be. Any help is greatly appreciated.

    Read the article

  • OpenGL ES 1.1 vs 2.0 for 2D Graphics, with rotated sprites?

    - by Lee Olayvar
    I am having trouble finding information related to which i should choose, OpenGL ES 1.1 or 2.0 for 2D graphics. OpenGL ES 1.1 on Android is a bit limited to my knowledge, and based purely on sprite count the only useful renderer is draw_texture() (as far as i know). However, that does not have rotation and rotation is very important to me. Now with the NDK adding support for OpenGL ES 2.0, i am trying to figure out if there is anything that preforms as well as draw_texture(), but can handle rotation. Anyone have any information on if 2.0 can help me in this area?

    Read the article

  • Perl open file problem

    - by alexBrand
    I am having some trouble trying to print from a file. Any ideas? Thanks open(STDOUT,">/home/int420_101a05/shttpd/htdocs/receipt.html"); print "alex"; close(STDOUT); open(INF,"/home/int420_101a05/shttpd/htdocs/receipt.html"); $emailBody = <INF>; close(INF); print $emailBody; ERRORS: Filehandle STDOUT reopened as INF only for input at ./test.c line 6. print() on closed filehandle STDOUT at ./test.c line 9.

    Read the article

  • How to Convert ILayer to IPolygon In ArcObjects

    - by Scott
    Having trouble converting an Ilayer to an IPolygon. I am developing a toolbar for ArcMap and I grab a layer via code from the side table of contents. The Layer is a Polygon, but the code won't convert it to a IPolygon. Can anyone help me out? This is the code I am using to try and convert it to a IPolygon... IPolygon poly = m_document.Maps.get_Item(0).get_Layer(0) as IPolygon; I can do this: ILayer layer = m_document.Maps.get_Item(0).get_Layer(0) as ILayer; And that works, just not converting it to a IPloygon..

    Read the article

  • Query Only Specified Number Of Items From Parent/Child Categories

    - by RogeR
    I'm having trouble figureing out how to query every item in a certain category and only list the newest 10 items by date. Here is my table layout: download_categories category_id (int) primary key title (var_char) parent_id (int) downloads id (int) primary key title (var_char) category_id (int) date (date) I need to query every file in a main category that lets say has 100 items and 5 child categories and only spit out the last 10 added. I have functions right now that just add up all the files so I can get a count by category, but I can't seem to modify the code to only display a certain amount of items based on the date.

    Read the article

  • Sencha Touch 2: List does not display in Panel

    - by jrboddie
    I am working on an MVC app in Sencha Touch 2 and am having trouble getting a list to display in a nested panel. The structure of the app has a main view which is a tab panel. One of the items in the tab panel is a defined panel, xtype: 'homepanel'. An item in this panel is the list, xtype: 'newslist' that is linked to the appropriate store and model files. The list does not display unless I change its parent 'homepanel' to a type, Ext.navigation.View. What am I missing in the definition of 'homepanel' as a Panel that prevents the display of the list? Ext.define('ACSO.view.Home', { extend: 'Ext.Panel', //<--works if Ext.navigation.View xtype: 'homepanel', requires: [ 'Ext.TitleBar', 'ACSO.view.NewsList' ], config: { title: 'Home', iconCls: 'home', cls: 'home', scrollable: true, styleHtmlContent: true, items: [ { xtype: 'newslist' } ] } });

    Read the article

  • JSF hiding exceptions?

    - by bshacklett
    I have a managed bean for a JSF page which is doing JPA calls in the constructor to populate fields in the bean. I'm having a bit of trouble with another call to persist an entity (to populate data for testing). I'm expecting it to throw some sort of exception since it's not working, but I'm not getting anything. Just of the heck of it I tried the following: Query newQuery = em.createQuery("Bad Syntax"); List newList = newQuery.getResultList(); I'd expect an IllegalArgumentException here since the query string is completely invalid, but the page still loads and I don't see any exceptions anywhere. Am I right in expecting this exception? If so, why am I not seeing it?

    Read the article

  • Is there a way in PHP to check if a directory is a symlink?

    - by tixrus
    The title says it all. I have symlinks to certain directories because the directories' names have non English characters that I got fed up trying to get apache's rewrite rules to match. There's a bounty on that question http://stackoverflow.com/questions/2916194/trouble-with-utf-8-chars-apache2-rewrite-rulesif anyone wants to go for it, and from the looks of things a lot of people would like to see a general solution to this problem, but meanwhile I made a plain ascii symlink to each of these offending directories. Now the rewrite rules are back to just alpha and _ and - and my security concerns are less and it loads the resources I want. But I still need the actual target directory name for display purposes. I googled "PHP directory info, PHP symlink" but didn't find anything. I need to do something like this: if (is_symlink($myResDirName)) { $realDirName = follow_symlink($myResDirName); }

    Read the article

  • EF4 CTP5 Code First approach ignores Table attributes

    - by Justin
    I'm using EF4 CTP5 code first approach but am having trouble getting it to work. I have a class called "Company" and a database table called "CompanyTable". I want to map the Company class to the CompanyTable table, so have code like this: [Table(Name = "CompanyTable")] public class Company { [Key] [Column(Name = "CompanyIdNumber", DbType = "int")] public int CompanyNumber { get; set; } [Column(Name = "CompanyName", DbType = "varchar")] public string CompanyName { get; set; } } I then call it like so: var db = new Users(); var companies = (from c in db.Companies select c).ToList(); However it errors out: Invalid object name 'dbo.Companies'. It's obviously not respecting the Table attribute on the class, even though it says here that Table attribute is supported. Also it's pluralizing the name it's searching for (Companies instead of Company.) How do I map the class to the table name?

    Read the article

  • How do I use modulus for float/double?

    - by ShrimpCrackers
    I'm creating an RPN calculator for a school project. I'm having trouble with the modulus operator. Since we're using the double data type, modulus won't work on floating point numbers. For example, 0.5 % 0.3 should return 0.2 but I'm getting a division by zero exception. The instruction says to use fmod(). I've looked everywhere for fmod(), including javadocs but I can't find it. I'm starting to think it's a method I'm going to have to create? edit: hmm, strange. I just plugged in those numbers again and it seems to be working fine...but just in case. Do I need to watch out using the mod operator in Java when using floating types? I know something like this can't be done in C++ (I think).

    Read the article

  • analysis Big Oh notation psuedocode

    - by tesshu
    I'm having trouble getting my head around algorithm analysis. I seem to be okay identifying linear or squared algorithms but am totally lost with nlogn or logn algorithms, these seem to stem mainly from while loops? Heres an example I was looking at: Algorithm Calculate(A,n) Input: Array A of size n t?0 for i?0 to n-1 do if A[i] is an odd number then Q.enqueue(A[i]) else while Q is not empty do t?t+Q.dequeue() while Q is not empty do t?t+Q.dequeue() return t My best guess is the for loop is executed n times, its nested while loop q times making NQ and the final while loop also Q times resulting in O(NQ +Q) which is linear? I am probably totally wrong. Any help would be much appreciated. thanks

    Read the article

  • Jquery - add server control

    - by superexsl
    Hey, I'm having trouble with a custom control and adding it dynamically using JQuery. I've got the following code: $('.custom_control_div').replaceWith( "<div><cc:mycustomcontrol id='cControl' ></cc:mycustomcontrol></div>" ); This doesn't throw any errors, but doesn't work because I need to use runat=server in my custom control. However, if I add runat=server in the code above, no javascript is executed on the page (and jqueryUI no longer works). The custom control works fine when I add it directly to the page from design-time. Is there a way to add a control, with runat=server using Jquery? Thanks

    Read the article

  • Programming language for web

    - by cable729
    I haven't programmed in a while, and have kind of lost interest, but I want to get back, and I've enjoyed C# the most, a lot more than objective-c and visual basic. So I want to make some games that me and my friends will be able to play next school year. So basically something you can play on the web. What programming languages deploy to the web? If c# is possible, and a mac with safari/firefox would be able to use it (I can't install plugins, and I don't want to get in trouble for making myself admin again) Flash, Java, etc. If java does, I'd like that most since it's most like c#. Then what libraries/engines would I use? I want to do 2d. And then what IDE would I use? Thanks in advance!

    Read the article

  • Drupal: Multiple Stylesheets

    - by Vecta
    I'm currently creating a custom Drupal theme for my company and I'm having trouble getting multiple stylesheets to load. I followed the instructions on this page by adding stylesheets to the .info file in the format: stylesheets[all][] = style.css stylesheets[all][] = name2.css etc... However, when I load the page nothing changes and when I view source, it consistently lists style.css but seems to ignore the others. Am I misunderstood in the process of adding additional stylesheets? What could I be doing incorrectly? Thanks for any help!

    Read the article

  • Default enum visibility in C++

    - by Benjamin Borden
    I have a class that looks like this: namespace R { class R_Class { enum R_Enum { R_val1, R_val2, R_val3 } private: // some private stuff public: // some public stuff } } I'm performing unit testing using an automated test tool (LDRA). The compiler (GHS) claims that my test harness cannot access the type R::R_Class::R_Enum. I have no trouble accessing the values within a similar class that is defined as such: namespace S { class S_Class { public: enum S_Enum { S_val1, S_val2, S_val3 } } private: // some private stuff public: // some public stuff } Do enums in C++ need to be given explicit visibility directives? If not given any, do they default to private? protected?

    Read the article

  • how to prune data set?

    - by sakura90
    The MovieLens data set provides a table with columns: userid | movieid | tag | timestamp I have trouble reproducing the way they pruned the MovieLens data set used in: http://www.cse.ust.hk/~yzhen/papers/tagicofi-recsys09-zhen.pdf In 4.1 Data Set of the above paper, it writes "For the tagging information, we only keep those tags which are added on at least 3 distinct movies. As for the users, we only keep those users who used at least 3 distinct tags in their tagging history. For movies, we only keep those movies that are annotated by at least 3 distinct tags." I tried to query the database: select TMP.userid, count(*) as tagnum from (select distinct T.userid as userid, T.tag as tag from tags T) AS TMP group by TMP.userid having tagnum = 3; I got a list of 1760 users who labeled 3 distinct tags. However, some of the tags are not added on at least 3 distinct movies. Any help is appreciated.

    Read the article

  • viewDidLoad never called in Sub-classed UIViewController

    - by Steve
    I've run into some trouble with loading a sub-classed UIViewController from a nib. My viewDidLoad function is never called. The super-class has no nib, but the sub-classes each have their own. i.e. @interface SuperClass : UIViewController { } @end @interface SubClass : SuperClass{ } @end @implementation SubClass - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { } return self; } - (void)viewDidLoad{ // Never called } The view is loaded from a nib as follows: SubClass *scvc = [[SubClass alloc] initWithNibName:@"SubClass" bundle:nil]; [self.navigationController pushViewController:scvc animated:YES]; [scvc release]; There is a nib file with this name and it has it's file owner's class set properly. viewDidLoad is not called in the child or super. Any ideas?

    Read the article

  • Python and Plone help

    - by Grenko
    Im using the plone cms and am having trouble with a python script. I get a name error "the global name 'open' is not defined". When i put the code in a seperate python script it works fine and the information is being passed to the python script becuase i can print the query. Code is below: #Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE # Insert data that was passed from the form query=request.query #print query f = open("blast_query.txt","w") for i in query: f.write(i) return printed I also have a second question, can i tell python to open a file in in a certain directory for example, If the script is in a certain loaction i.e. home folder, but i want the script to open a file at home/some_directory/some_directory can it be done?

    Read the article

  • iPad: CoreData FetchedRequest Ignores Changes in Predicate

    - by Michael
    Hi there, While programming an iPad-app, I'm just running into trouble using a fetchedResultsController with a "dynamic" predicate. it seems the changes to the predicate get ignored. No matter how the predicate changes, I always get the result of the first fetch ... same code runs without no problems on iphone-env (3.1.x) !! sample : - (void)performSearch:(NSString *)searchText { self.displaySearchResults = TRUE; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"searchWords contains[cd] %@", searchText]; [self.fetchedSearchResultsController.fetchRequest setPredicate:predicate]; NSError *error = nil; if (![self.fetchedSearchResultsController performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } if(deviceIsIPad) { [self showSearchResults]; } else { [cookBookOverview reloadData]; } } can anyone help plz ? btw.: excuse my painful english ;-)

    Read the article

  • Login code sample which has been hacked via SQL Injection, although mysql_real_escape_string...

    - by artmania
    Hi friends, I use CodeIgniter, and having trouble with hacking :( is it possible to make SQL Injection to the login code below: function process_login() { $username = mysql_real_escape_string($this->input->post('username')); $password = mysql_real_escape_string(MD5($this->input->post('password'))); //Check user table $query = $this->db->getwhere('users', array('username'=>$username, 'password'=>$password)); if ($query->num_rows() > 0) { // success login data Am I using the mysql_real_escape_string wrong? or what? Appreciate helps!

    Read the article

  • How to debug CSS/Javascript hover issues

    - by Jason Creighton
    I often find myself wanting to debug CSS layout issues that involve DOM changes caused by Javascript in reaction to a hover event or different CSS rules applying due to the :hover selector. Normally, I'd use Firebug to inspect the element that's giving me trouble and see what its CSS properties were, and where those properties come from. However, when hovering is involved, it becomes impossible, because as soon as you move your mouse down to the Firebug panel, the elements you're interested in are no longer hovered, the CSS rules that apply are different, and (in the case of JS hovers) the DOM is changed. Is there any way I can "freeze" the state of the DOM and application of :hover in order to inspect the DOM as it was during a hover event? Any other ideas on how to debug this sort of issue are welcome, of course.

    Read the article

  • Dealing with multiple Javascript IF statements.

    - by Joey
    Is it possible to put multiple IF statements in Javascript? If so, I'm having a fair amount of trouble with the statement below. I was wondering if you can put another IF statement in between if (data == 'valid') AND else? I want to add another if data =='concept') between the two. if (data == 'valid') { $("#file").slideUp(function () { $("#file").before('<div class="approvedMessage">WIN WIN WIN!</div>'); setTimeout(ApprovedProof, 5000); }); function ApprovedProof() { $("#file").slideDown(); $('.approvedMessage').fadeOut(); } } else { $("#file").slideUp(function () { $("#file").before('<div class="deniedMessage">NO NO NO!</div>'); setTimeout(DeniedProof, 5000); }); function DeniedProof() { $("#file").slideDown(); $('.deniedMessage').fadeOut(); } }

    Read the article

  • How to generate GIR files from the Vala compiler?

    - by celil
    I am trying to create python bindings to a vala library using pygi with gobject introspection. However, I am having trouble generating the GIR files (that I am planning to compile to typelib files subsequently). According to the documentation valac should support generating GIR files. Compiling the following helloworld.vala public struct Point { public double x; public double y; } public class Person { public int age = 32; public Person(int age) { this.age = age; } } public int main() { var p = Point() { x=0.0, y=0.1 }; stdout.printf("%f %f\n", p.x, p.y); var per = new Person(22); stdout.printf("%d\n", per.age); return 0; } with the command valac helloworld.vala --gir=Hello-1.0.gir doesn't create the Hello-1.0.gir file as one would expect. How can I generate the gir file?

    Read the article

< Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >