Search Results

Search found 249 results on 10 pages for 'mystery'.

Page 8/10 | < Previous Page | 4 5 6 7 8 9 10  | Next Page >

  • BIRT logging in the onFetch step of a dataset

    - by Mark Underwood
    Hi all, Im having trouble with some javascript in the onFetch step of a dataset in a BIRT report. I've added logging in the initialise step of the report in a few different ways. The runtime im using is Tivoli Common Reporting, and they supply a logging framework. Its initialised as so reportContext.setPersistentGlobalVariable("logfileName", "DateRangeParm.log"); setupLogging(); logInitialize(); debugLogger("Started logging in initialize step"); debugLogger("Date: " + new Date()); This works fine to log on the steps of the report(ie initialise, BeforeRender, AfterRender etc.) but I cant seem to log anything in the Dataset steps such as onFetch etc. Ive also tried importPackage(Packages.java.util.logging); var fileHandler = new FileHandler("/tmp/birt.log", true); var rootLogger = Logger.getLogger(""); rootLogger.addHandler(fileHandler); as the BIRT instructions tell me to do in the BIRTFAQ Once again this allowed me to log things in the main report (ie BeforeRender etc) but not in the dataset onFetch Step. Ive also tried putting the previous javascript into the onFetch and that didnt seem to work either. Its a bit of a mystery. Im running Ubuntu 9.04. IBM java 1.5. Eclipse 3.5.0 and BIRT 2.5.1. Any help would be great.

    Read the article

  • NHibernate - joining on a subquery using ICriteria

    - by owensymes.mp
    I have a SQL query that I need to represent using NHibernate's ICriteria API. SELECT u.Id as Id, u.Login as Login, u.FirstName as FirstName, u.LastName as LastName, gm.UserGroupId_FK as UserGroupId, inner.Data1, inner.Data2, inner.Data3 FROM dbo.User u inner join dbo.GroupMember gm on u.Id = gm.UserAnchorId_FK left join ( SELECT di.UserAnchorId_FK, sum(di.Data1) as Data1, sum(di.Data2) as Data2, sum(di.Data3) as Data3 FROM dbo.DailyInfo di WHERE di.Date between '2009-04-01' and '2009-06-01' GROUP BY di.UserAnchorId_FK ) inner ON inner.UserAnchorId_FK = u.Id WHERE gm.UserGroupId_FK = 195 Attempts so far have included mapping 'User' and 'DailyInfo' classes (my entities) and making a DailyInfo object a property of the User object. However, how to map the foreign key relationship between them is still a mystery, ie <one-to-one></one-to-one> <one-to-many></one-to-many> <generator class="foreign"><param name="property">Id</param></generator> (!) Solutions on the web are generally to do with subqueries within a WHERE clause, however I need to left join on this subquery instead to ensure NULL values are returned for rows that do not join. I have the feeling that I should be using a Criteria for the outer query, then forming a 'join' with a DetachedCriteria to represent the subquery?

    Read the article

  • UINavigationController creating a blank view out of thin air?

    - by Alex Gosselin
    Ok, this one is really weird... I can't show code for it exactly cause it follows a pretty snake-like pattern through subclasses etc, there would be a pile of it. The important parts are that I push a view controller, which during viewWillAppear pushes another view controller onto the nav controller. My nav controller is an item in a tab bar. When I press back twice, I wind up at a blank view with the same title as my root view controller, (I have no other views having this title). I even tested and put a NSLog() in viewWillAppear to make sure it was the same view appearing, but for some reason the mystery blank view is showing up instead of my view. I am able to get the original view back by pressing the button on the tab bar again. (The one that corresponds to the nav controller). This confuses me greatly, so any help would be appreciated. I will post code if somebody could narrow down what code to put. Thanks.

    Read the article

  • uitableview reloadData issue

    - by CocoaNewBee
    I've been debugging my iphone app and found something interesting. I have a UIViewControllers with TabBarcontroller( 6 tabs). each tab is a UIViewController and it has a UITtableview. The viewDidLoad works and brings the initial data. On of the UITableView has a search bar. After the user touchs presses search some magic happens and I get an array with data. I cant see the new data in the tableview and the [tableView reloadData] has no effect outside viewDidLoad (first time). I can see the array holding the data and the dataSource is set to self. Yet, no displaying of data! so I 've tried [self.tableView reloadData] & [self.tableView setNeedsDisplay] Funny enough, the new data is not being displayed. However if I move the table up or down the cellForRowAtIndexPath is being fired and the first row shows data. can anyone shed some light on this mystery??? if there a [self.view refreshscreen] ??

    Read the article

  • Sending wordpress title-value across PHP-pages

    - by VoodooBurger
    I recently made this wordpress blog, where you can sign up a team for an event, when clicking a link under the event post. This link takes you to a sign-up form on another php-page. The link is added in the loop of the events-template like this: <?php query_posts('cat=8');?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <div id="tilmeldknap"><?php wp_list_pages("title_li=&depth=1&include=63"); ?></div> <?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>... So every upcoming event will have the same sign-up button. All I need now is to somehow send the specific event-post-title along to the sign-page, so that the following form-submit action will contain that title aswell. But since I'm not very good at php it seems like a mystery, altho I bet it's very simple! I'm guessing it's something like: $event=$_POST['single_post_title()'] But how to get the value to the next php-page I have no idea... please help, anyone :) An eksample can be seen throught this link: http://gadebold.dk/events/ The link sais: 'Tilmeld Hold'

    Read the article

  • Core-data: when accessing a relationship, the count method on NSSet fails

    - by lordsandwich
    I'm trying to access a relationship (one to many) programatically. My Data model contains an NSManagedEntity called language (with a two string attributes) with a relationship to an entity called WordCategory (one-to-many). I use an NSFetchRequest to get all the Language entities. that works fine. I get the valueForKey for the relationship and that works fine. I can work with its objects. However, when I try to send the message count to the NSSet that stores the WordCategory objects I get a In other words, this line works: NSLog(@"word category count %@",[[wordCategory anyObject] valueForKey:@"name"]); This one doesn't: NSLog(@"word category count %@",[wordCategory count] I get a the message: EXC_BAD_ACCESS in the debugger. Here's the rest of the code: NSManagedObjectContext *moc = [myAppDelegate managedObjectContext]; NSFetchRequest *request = [[NSFetchRequest alloc] init]; [request setEntity:[NSEntityDescription entityForName:@"Language" inManagedObjectContext:moc]]; NSError *error = nil; NSArray *results = [moc executeFetchRequest:request error: &error]; if (error) { [NSApp presentError:error]; return; } NSManagedObject *obj = [results objectAtIndex:0]; NSSet *wordCategory = [obj valueForKey:@"category"]; NSLog(@"word category count %@",[wordCategory count]); I'll appreciate any light than anybody can shed in this mystery. Thanks for your help!

    Read the article

  • sqrt(int_value + 0.0) -- Does it have a purpose?

    - by Earlz
    Hello, while doing some homework in my very strange C++ book, which I've been told before to throw away, had a very peculiar code segment. I know homework stuff always throws in extra "mystery" to try to confuse you like indenting 2 lines after a single-statement for-loop. But this one I'm confused on because it seems to serve some real-purpose. basically it is like this: int counter=10; ... if(pow(floor(sqrt(counter+0.0)),2) == counter) ... I'm interested in this part especially: sqrt(counter+0.0) Is there some purpose to the +0.0? Is this the poormans way of doing a static cast to a double? Does this avoid some compiler warning on some compiler I do not use? The entire program printed the exact same thing and compiled without warnings on g++ whenever I left out the +0.0 part. Maybe I'm not using a weird enough compiler? Edit: Also, does gcc just break standard and not make an error for Ambiguous reference since sqrt can take 3 different types of parameters? [earlz@EarlzBeta-~/projects/homework1] $ cat calc.cpp #include <cmath> int main(){ int counter=0; sqrt(counter); } [earlz@EarlzBeta-~/projects/homework1] $ g++ calc.cpp /usr/lib/libstdc++.so.47.0: warning: strcpy() is almost always misused, please use strlcpy() /usr/lib/libstdc++.so.47.0: warning: strcat() is almost always misused, please use strlcat() [earlz@EarlzBeta-~/projects/homework1] $

    Read the article

  • SharePoint Designer Workflow: Unruly 'Collect User Data' Action

    - by Jeremy
    I'm a student in a SharePoint class online. This problem has riddled everyone I've discussed it with, including the teacher. There seems to be some sort of problem when I create a workflow with the collect data action. I can create workflows that send e-mails and use the other actions just fine. What could be causing this problem? My reproduction steps are simple: Create a new Site Collection with the Blank Site template. Create a new Custom List. In SharePoint Designer, start a new workflow on the Custom List. Add the collect data action to the workflow. Set the user to the one that created the task. Set the data to anything. A single check box, a string, Choice, doesn't matter. Leave the output variable as default. Mystery error appears! When the Check Workflow button is pressed, nothing happens. No message box appears at all. The warning icon in the Steps panel merely points out that there are some errors, it isn't specific as to what they are. Additionally, when I click on the data object again after it's been created, it doesn't populate the form with the old values. It goes back to the default name with no fields. So there's definitely something going wrong here. I've narrowed the problem down to the data object, but I don't know what to do about it. The workflow acts like normal for other activities. For example, delete the Collect Data action and add a Send Email one instead and it compiles and runs successfully.

    Read the article

  • Photoshop CS5 not recognising activeDocument

    - by Max Kielland
    I wrote a quite big script for Photoshop CS5.1 on my 64bit Vista machine. Now when I run the very same script on my new 64bit Windows 7 machine, Adobe ExtendScript Tool complains about activeDocument (no such element) in this simple script: #target photoshop var pDoc = app.activeDocument; alert("Done!"); I have tried both and without #target and choosing the target in the ExtendedScript Tool. Is there something I have missed, or do I need to install something more. I only installed the 64bit version of Photoshop. Is it so that the 32bit Photoshop has the script extensions? I don't see why I need to install both 32bit and 64bit versions if I'm only going to use the 64bit version. EDIT I installed the 32bit version as well. Tried the same script against 32 and 64 bit, still no difference. SOLVED The mystery is solved. It is embarrassing simple if you interpret the error message more careful. Of course I can't get an activeDocument if there are no documents in Photoshop, duh!?! I interpreted it as the statement activeDocument wasn't recognised, but of course if I have no document there is no such element (as a photoshop document) to give me. I'm used to C++ and would expect the reuslt to be a NULL value or similar if there is a problem to get the document... excuses, excuses ;) Well, if someone else should get into the same problem, here is the answer on my expense :D

    Read the article

  • How does browser know when to prompt user to save password?

    - by Eric
    This is related to the question I asked here: http://stackoverflow.com/questions/2382329/how-can-i-get-browser-to-prompt-to-save-password This is the problem: I CAN'T get my browser to prompt me to save the password for the site I'm developing. (I'm talking about the bar that appears sometimes when you submit a form on Firefox, that says "Remember the password for yoursite.com? Yes / Not now / Never") This is super frustrating because this feature of Firefox (and most other modern browsers, which I hope work in a similar fashion) seems to be a mystery. It's like a magic trick the browser does, where it looks at your code, or what you submit, or something, and if it "looks" like a login form with a username (or email address) field and a password field, it offers to save. Except in this case, where it's not offering my users that option after they use my login form, and it's making me nuts. :-) (I checked my Firefox settings-- I have NOT told the browser "never" for this site. It should be prompting.) My question: exactly what the heuristics are that Firefox (or any other modern browser) uses to know when it should prompt the user to save? This shouldn't be too difficult to answer, since it's right there in the Mozilla source (I don't know where to look or else I'd try to dig it out myself). You'd think there would be a blog post or some other similar developer note from the Mozilla developers about this but I can't find that either. (* Note that if your answer to me has anything to do with cookies, encryption or anything else that is about how I'm storing the user's passwords in the database, you've probably misread my question. :-)

    Read the article

  • pinpointing "conditional jump or move depends on uninitialized value(s)" valgrind message

    - by kamziro
    So I've been getting some mysterious uninitialized values message from valgrind and it's been quite the mystery as of where the bad value originated from. Seems that valgrind shows the place where the unitialised value ends up being used, but not the origin of the uninitialised value. ==11366== Conditional jump or move depends on uninitialised value(s) ==11366== at 0x43CAE4F: __printf_fp (in /lib/tls/i686/cmov/libc-2.7.so) ==11366== by 0x43C6563: vfprintf (in /lib/tls/i686/cmov/libc-2.7.so) ==11366== by 0x43EAC03: vsnprintf (in /lib/tls/i686/cmov/libc-2.7.so) ==11366== by 0x42D475B: (within /usr/lib/libstdc++.so.6.0.9) ==11366== by 0x42E2C9B: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_float<double>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, char, double) const (in /usr/lib/libstdc++.so.6.0.9) ==11366== by 0x42E31B4: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, double) const (in /usr/lib/libstdc++.so.6.0.9) ==11366== by 0x42EE56F: std::ostream& std::ostream::_M_insert<double>(double) (in /usr/lib/libstdc++.so.6.0.9) ==11366== by 0x81109ED: Snake::SnakeBody::syncBodyPos() (ostream:221) ==11366== by 0x810B9F1: Snake::Snake::update() (snake.cpp:257) ==11366== by 0x81113C1: SnakeApp::updateState() (snakeapp.cpp:224) ==11366== by 0x8120351: RoenGL::updateState() (roengl.cpp:1180) ==11366== by 0x81E87D9: Roensachs::update() (rs.cpp:321) As can be seen, it gets quite cryptic.. especially because when it's saying by Class::MethodX, it sometimes points straight to ostream etc. Perhaps this is due to optimization? ==11366== by 0x81109ED: Snake::SnakeBody::syncBodyPos() (ostream:221) Just like that. Is there something I'm missing? What is the best way to catch bad values without having to resort to super-long printf detective work?

    Read the article

  • Django 'ImproperlyConfigured' error after deployment on google app engine

    - by oreon
    Hello, I'm currently trying to get my first django project running on Google App Engine. I followed the instructions given here http://www.allbuttonspressed.com/projects/djangoappengine as best I could. Unfortunately I have run into some issues. Locally everything runs fine, no problems. I then tried to deploy my project to the cloud. This is where I'm totally stuck. I always receive 500 Server Errors coupled with google.appengine.runtime.DeadlineExceededError's. Every now and then I get the following error message in my logs, which I think is the root of the problem : <class 'django.core.exceptions.ImproperlyConfigured'>: ImportError projectyalanda.pricecompare: No module named projectyalanda.pricecompare Obviously something is wrong in the way I reference my django app. Why this is only an issue in the cloud is a mystery to me. The interesting part in the settings.py file is setup as following: INSTALLED_APPS = ( 'djangotoolbox', # 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'projectyalanda.pricecompare', ) I absolutely can't figure out why django/appengine wouldn't be able to find the module, especially since everything works perfectly locally. So where else can I look? The local folder structure is of course also correct as automatically done by django, so maybe something is messed up during deployment? How would I be able to find out? Please help me ;-) Thanks

    Read the article

  • How are Scala closures transformed to Java objects?

    - by iguana
    I'm currently looking at closure implementations in different languages. When it comes to Scala, however, I'm unable to find any documentation on how a closure is mapped to Java objects. It is well documented that Scala functions are mapped to FunctionN objects. I assume that the reference to the free variable of the closure must be stored somewhere in that function object (as it is done in C++0x, e.g.). I also tried compiling the following with scalac and then decompiling the class files with JD: object ClosureExample extends Application { def addN(n: Int) = (a: Int) => a + n var add5 = addN(5) println(add5(20)) } In the decompiled sources, I see an anonymous subtype of Function1, which ought to be my closure. But the apply() method is empty, and the anonymous class has no fields (which could potentially store the closure variables). I suppose the decompiler didn't manage to get the interesting part out of the class files... Now to the questions: Do you know how the transformation is done exactly? Do you know where it is documented? Do you have another idea how I could solve the mystery?

    Read the article

  • Abstracting boxed array structures in J

    - by estanford
    I've been working on a J function for a while, that's supposed to scan a list and put consecutive copies of an element into separate, concatenated boxes. My efforts have taken me as far as the function (<;. 2) ((2&(~:/\)),1:) which tests successive list entries for inequality, returns a list of boolean values, and cuts the list into boxes that end each time the number 1 appears. Here's an example application: (<;. 2) ((2&(~:/\)),1:) 1 2 3 3 3 4 1 1 1 +-+-+-----+-+-----+ |1|1|0 0 1|1|0 0 1| +-+-+-----+-+-----+ The task would be finished if I could then replace all those booleans with their corresponding values in the input argument. I've been looking for some kind of mystery function that would let me do something like final =: mysteryfunction @ (<;. 2) ((2&(~:/\)),1:) final 1 2 3 3 3 4 1 1 1 +-+-+-----+-+-----+ |1|2|3 3 3|4|1 1 1| +-+-+-----+-+-----+ In an ideal situation, there would be some way to abstractly represent the nesting pattern generated by (<;. 2) ((2&(~:/\)),1:) to the original input list. (i.e. "This boxed array over here has the first element boxed at depth one, the second element boxed at depth one, the third, fourth, and fifth elements boxed together at depth one,..., so take that unboxed list over there and box it up the same way.") I tried fooling around with ;. , S: , L:, L. and &. to produce that behavior, but I haven't had much luck. Is there some kind of operator or principle I'm missing that could make this happen? It wouldn't surprise me if I were overthinking the whole issue, but I'm running out of ideas.

    Read the article

  • Extract attributes from NSManagedObject array.

    - by Pavel Peroutka
    NSFetchRequest *req = [NSFetchRequest init]; NSEntityDescription *descr = [NSEntityDescription entityForName:@"City" inManagedObjectContext:context]; [req setEntity:descr]; NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"streetName" ascending:YES]; [req setSortDescriptors:[NSArray arrayWithObject:sort]]; [sort release]; //fetch NSError *error; NSArray *result = [context executeFetchRequest:req error:&error]; //extract names NSMutableArray *streets = [[NSMutableArray alloc] init]; for () { ??? = [array objectAtIndex:i]; [streets addObject:name]; } I expected Core Data to be little more intuitive. I am new in it and I could use some help. I fetched all objects(rows) from the entity (table) City. Now I have an array of objects. From the array I need to extract the attribute “streetName” to an array which will feed the picker. I figured I need to do it in the loop but I could not figure out the way to do it. Please help. I have a background with SQL but Core Data is still a big mystery to me. Is there any publication which would take a SQL statement and show comparable Core Data syntax? Thanks.

    Read the article

  • "hour" int taken from NSDate not behaving as expected at midnight??

    - by Eric
    I feel like I've lost my mind. Can someone tell me what's going on here? Also, I'm sure there is a better way to do what I'm trying to do, but I'm not interested in that now. I'd just like to solve the mystery of why my ints are not responding to logic as expected. // Set "At: " field close to current time NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"HH"]; int hour = [[dateFormatter stringFromDate:[NSDate date]] intValue]; [dateFormatter setDateFormat:@"mm"]; int minute = [[dateFormatter stringFromDate:[NSDate date]] intValue]; NSLog(@"currently %i:%i",hour, minute); if(hour >= 12){ // convert to AM/PM selectedMeridiem = 1; if(hour != 12){ hour = hour - 12; } } else{ selectedMeridiem = 0; } selectedHour = hour - 1; if(selectedHour <= 0){ selectedHour = 11; } When I debug the above code with my clock set to 12:XX AM, the integer "hour" returned is 0. But then any if statements with the condition if(hour == 0) are not evaluated. Likewise, this would not be evaluated either: if(hour < 1). The code above puts the hour int into another int, selectedHour (don't worry about why I'm doing this for now), but selectedHour suffers from the same weird behavior; the if(selectedHour <= 0) line is never evaluated. Am I going crazy, or am I just an idiot? Maybe there's some behavior of 0 integers that I'm not aware of. All of my code runs fine as long as it's not 12:XX AM.

    Read the article

  • Modify Jquery UI slider control

    - by Jean-Yves Deman
    I use the Jquery UI slider control. My slider has a width of 200px. I would like the center of my left handle is shifted 14px to the right and the center of my right handle is offset to the left of 14px. So, my good slider will more than 172px (200-14-14). The background-image measure good 200px. The length of 14px is calculated as follows: width of the handle (28px) / 2. Can you help me solve this mystery? Thank you in advance. .ui-slider .ui-slider-handle { width:28px; height:28px; background:url(images/bulle.png) no-repeat 0 0; overflow: hidden; position:absolute; margin-left:0px; top: -7px; border-style:none; cursor:help; }? I use "margin-left:0px;" to delete the "margin-left:-14px" by default. But, my right handle spring 28px to the right ! Help me please !

    Read the article

  • Spring MVC 3 - How come @ResponseBody method renders a JSTLView?

    - by Ken Chen
    I have mapped one of my method in one Controller to return JSON object by @ResponseBody. @RequestMapping("/{module}/get/{docId}") public @ResponseBody Map<String, ? extends Object> get(@PathVariable String module, @PathVariable String docId) { Criteria criteria = new Criteria("_id", docId); return genericDAO.getUniqueEntity(module, true, criteria); } However, it redirects me to the JSTLView instead. Say, if the {module} is product and {docId} is 2, then in the console I found: DispatcherServlet with name 'xxx' processing POST request for [/xxx/product/get/2] Rendering view [org.springframework.web.servlet.view.JstlView: name 'product/get/2'; URL [/WEB-INF/views/jsp/product/get/2.jsp]] in DispatcherServlet with name 'xxx' How can that be happened? In the same Controller, I have another method similar to this but it's running fine: @RequestMapping("/{module}/list") public @ResponseBody Map<String, ? extends Object> list(@PathVariable String module, @RequestParam MultiValueMap<String, String> params, @RequestParam(value = "page", required = false) Integer pageNumber, @RequestParam(value = "rows", required = false) Integer recordPerPage) { ... return genericDAO.list(module, criterias, orders, pageNumber, recordPerPage); } Above do returns correctly providing me a list of objects I required. Anyone to help me solve the mystery?

    Read the article

  • How can this code throw a NullReferenceException?

    - by Davy8
    I must be going out of my mind, because my unit tests are failing because the following code is throwing a null ref exception: int pid = 0; if (parentCategory != null) { Console.WriteLine(parentCategory.Id); pid = parentCategory.Id; } The line that's throwing it is: pid = parentCategory.Id; The console.writeline is just to debug in the NUnit GUI, but that outputs a valid int. Edit: It's single-threaded so it can't be assigned to null from some other thread, and the fact the the Console.WriteLine successfully prints out the value shows that it shouldn't throw. Edit: Relevant snippets of the Category class: public class Category { private readonly int id; public Category(Category parent, int id) { Parent = parent; parent.PerformIfNotNull(() => parent.subcategories.AddIfNew(this)); Name = string.Empty; this.id = id; } public int Id { get { return id; } } } Well if anyone wants to look at the full code, it's on Google Code at http://code.google.com/p/chefbook/source/checkout I think I'm going to try rebooting the computer... I've seen pretty weird things fixed by a reboot. Will update after reboot. Update: Mystery solved. Looks like NUnit shows the error line as the last successfully executed statement... Copy/pasted test into new console app and ran in VS showed that it was the line after the if statement block (not shown) that contained a null ref. Thanks for all the ideas everyone. +1 to everyone that answered.

    Read the article

  • C# Configuration Manager . ConnectionStrings

    - by Yoda
    I have a console app containing an application configuration file containing one connection string as shown below: <configuration> <connectionStrings> <add name="Target" connectionString="server=MYSERVER; Database=MYDB; Integrated Security=SSPI;" /> </connectionStrings> </configuration> When I pass this to my Connection using: ConfigurationManager.ConnectionStrings[1].ToString() I have two values in there, hence using the second in the collection, my question is where is this second coming from? I have checked the Bin version and original and its not mine! Its obviously a system generated one but I have not seen this before? Can anyone enlighten me? The mystery connection string is: data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true This isn't a problem as such I would just like to know why this is occuring? Thanks in advance! For future reference to those who may or may not stumble on this, after discovering the machine.config its become apparent it is bad practice to refer to a config by its index as each stack will potentially be different, which is why "Keys" are used. Cheers all!

    Read the article

  • What happens when we combine RAII and GOTO ?

    - by Robert Gould
    I'm wondering, for no other purpose than pure curiosity (because no one SHOULD EVER write code like this!) about how the behavior of RAII meshes with the use of Goto (lovely idea isn't it). class Two { public: ~Two() { printf("2,"); } }; class Ghost { public: ~Ghost() { printf(" BOO! "); } }; void foo() { { Two t; printf("1,"); goto JUMP; } Ghost g; JUMP: printf("3"); } int main() { foo(); } When running the following code in VS2005 I get the following output: 1,2,3 BOO! However I imagined, guessed, hoped that 'BOO!' wouldn't actually appear as the Ghost should have never been instantiated (IMHO, because I don't know the actual expected behavior of this code). Any Guru out there knows what's up? Just realized that if I instantiate an explicit constructor for Ghost the code doesn't compile... class Ghost { public: Ghost() { printf(" HAHAHA! "); } ~Ghost() { printf(" BOO! "); } }; Ah, the mystery ...

    Read the article

  • get value from css using document.getElementById().style.height javascript

    - by Jamex
    Hi, Please offer insight into this mystery. I am trying to get the height value from a div box by var high = document.getElementById("hintdiv").style.height; alert(high); I can get this value just fine if the attribute is contained within the div tag, but it returns a blank value if the attribute is defined in the css section. This is fine, it shows 100px as a value. The value can be accessed. <div id="hintdiv" style="height:100px; display: none;"> . . var high = document.getElementById("hintdiv").style.height; alert(high); This is not fine, it shows an empty alert screen. The value is practically 0. #hintdiv { height:100px display: none; } <div id="hintdiv"> . . var high = document.getElementById("hintdiv").style.height; alert(high); But I have no problem accessing/changing the "display:none" attribute whether it is in the tag or in the css section. The div box displays correctly by both attribute definition methods (inside the tag or in the css section). I also tried to access the value by other variations, but no luck document.getElementById("hintdiv").style.height.value ----> undefined document.getElementById("hintdiv").height ---->undefined document.getElementById("hintdiv").height.value ----> error, no execution Any solution? TIA.

    Read the article

  • How can I make NSUndoManager's undo/redo action names work properly?

    - by Gabe
    I'm learning Cocoa, and I've gotten undo to work without much trouble. But the setActionName: method is puzzling me. Here's a simple example: a toy app whose windows contain a single text label and two buttons. Press the On button and the label reads 'On'. Press the Off button and the label changes to read 'Off'. Here are the two relevant methods (the only code I wrote for the app): -(IBAction) turnOnLabel:(id)sender { [[self undoManager] registerUndoWithTarget:self selector:@selector(turnOffLabel:) object:self]; [[self undoManager] setActionName:@"Turn On Label"]; [theLabel setStringValue:@"On"]; } -(IBAction) turnOffLabel:(id)sender { [[self undoManager] registerUndoWithTarget:self selector:@selector(turnOnLabel:) object:self]; [[self undoManager] setActionName:@"Turn Off Label"]; [theLabel setStringValue:@"Off"]; } Here's what I expect: I click the On button The label changes to say 'On' In the Edit menu is the item 'Undo Turn On Label' I click that menu item The label changes to say 'Off' In the Edit menu is the item 'Redo Turn On Label' In fact, all these things work as I expect apart from the last one. The item in the Edit menu reads 'Redo Turn Off Label', not 'Redo Turn On Label'. (When I click that menu item, the label does turn to On, as I'd expect, but this makes the menu item's name even more of a mystery. What am i misunderstanding, and how can I get these menu items to display the way I want them to?

    Read the article

  • How can I implement an interface member in protected ?

    - by Nicolas Dorier
    Hi, I've been quite surprise when I saw the metadata of ReadOnlyObservableCollection in VS 2008... public class ReadOnlyObservableCollection<T> : ReadOnlyCollection<T>, INotifyCollectionChanged, INotifyPropertyChanged { // Summary: // Initializes a new instance of the System.Collections.ObjectModel.ReadOnlyObservableCollection<T> // class that serves as a wrapper for the specified System.Collections.ObjectModel.ObservableCollection<T>. // // Parameters: // list: // The collection to wrap. public ReadOnlyObservableCollection(ObservableCollection<T> list); // Summary: // Occurs when an item is added or removed. protected virtual event NotifyCollectionChangedEventHandler CollectionChanged; // // Summary: // Occurs when a property value changes. protected virtual event PropertyChangedEventHandler PropertyChanged; // Summary: // Raises the System.Collections.ObjectModel.ReadOnlyObservableCollection<T>.CollectionChanged // event. // // Parameters: // args: // The event data. protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args); // // Summary: // Raises the System.Collections.ObjectModel.ReadOnlyObservableCollection<T>.PropertyChanged // event. // // Parameters: // args: // The event data. protected virtual void OnPropertyChanged(PropertyChangedEventArgs args); } As you can see, CollectionChanged, a member of INotifyCollectionChanged is implemented in protected... and I can't do that in my own class. .NET framework should not compile ! Does someone has an explanation of this mystery ?

    Read the article

  • What language is this???

    - by Misha Koshelev
    Dear All: I thought this was Javascript... but parser is giving me trouble. Any ideas? Thank you! Misha for (;;); {"error":0,"errorSummary":"","errorDescription":"","errorIsWarning":false,"silentError":0,"payload":{"collections": [{"name":"bcm","type":"flp","filter":"flp_662923563701","value":"662923563701","editable":true,"deletable":true,"members": ["1319651388","539562714","710814793","569071038","1553739575","2413243"]}, {"name":"mstp","type":"flp","filter":"flp_715806870131","value":"715806870131","editable":true,"deletable":true,"members": ["1263807225","1159429816","508447486","508005223","1234906348","642723993","552875889","23401888","10701320","8302901","7931988","3007490","1286522890","1128447272","1076062553","775679867","737520202","640799498","224400055","224400048","14211567","7909445","3005965","2404364","218216","660037273","224400089","73306230","9603033","1111694","1034418884","775680513" ,"704526828","518753881","512477182","224400016","24904610","19000876","5403952","3005641","2100348","100000421128298","1445411167","691445174","1020020100","795471177","683724539","682441089","532450522","224400129","224400005","3006522","2246813","1302265","7197","1900494", "100000474978266","2533582","1205125","1384091677","1260996959","710814793","514951289","224400164","224400156","173601800","13304723","7938844","3004783","3001379","302817","716739950 ","706849","1418109424","562676898","82501644","3007569","13173"]}, {"name":"mystery","type":"flp","filter":"flp_687949656211","value":"687949656211","editable":true,"deletable":true,"members": ["100001286464748","508123007","100001161894460","1148567030","1048974191","769992391","831734347","15347","1297180076","756692945","3005266","733396195","34410910","100000940154241"," 748426280","569417581","1318922027","100000164920046","1475269609","1436536592","10000016210 8385","754095305","100000421128298","537833189","100000692471928","7920231","673753496","3006217","1221878","8365333","1128447272","224400133","218216","505457123","1421958541","183829 5926","2349408","1622810085","1201640391","510959992","23429895","542118016","1017385668","586225579","625100539","100000474886633","26404148","1384091677","224400156","806908635","843 187401","400435","768261176","7901808","748496482","1541469473","2511982","25401573","503715 506","1226000844","559195162","41400094","1099436201","409816","1584400985","1577092523","100000349351880","199301581"]},{"name":"SMS Subscriptions","type":"ms","filter":"ms","value":"3","editable":true,"deletable":false,"members":[]}],"current_view":false}}

    Read the article

< Previous Page | 4 5 6 7 8 9 10  | Next Page >