Daily Archives

Articles indexed Thursday May 20 2010

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

  • What is Silverlight's relationship -- if any -- to WPF?

    - by xarzu
    I was working with a WPF application and I decided that the controls and graphics I wanted to display on the grid might look better if it was a silverlight component. I thought this way because of all the cool silverlight controls that look very flash-like. But now that I have gottem my Visual Studio 2010 set up with SIlverlight, it seems that every silverlight app I can make are ASP.NET in nature. It seems that instead of a cool GUI control to make, Silverlight is telling me that it is primarely a dataflow sort of application for the web. What is the relationship, if any, between WPF and Silverlight. Can I or can I not put a silverlight control into my existing WPF application?

    Read the article

  • Tomcat - virtualhosting - name / ip / port - based

    - by lisak
    Hey, what are the usage scenarios for these kinds of virtual hosting ? Name Based - typical tomcat virtual hosting, one HOME instance with many contexts, each as an individual host IP based / port based - multiple instances of tomcat ( how is it with performance and memory consuption?) running on IP aliases (virtual IPs) for one network adapter, usually behind http apache server that can run name based virtual hostings. Otherwise I can't figure out how would I forward requests in iptables/firewall based on IP address, which is just one. How is IP based virtual hosting done as to Tomcat and multiple instances ? I'd like to hear some usage scenarios from your experience. How are you running your applications. Cause there are applications having it's own modified classloader and they are developed in a way to run alone withing a tomcat instance. Then there are trivial applications which can run within one instance without problems. Many thanks

    Read the article

  • retrieving of coordinates from google search?

    - by cheesebunz
    Is there anyway of retrieving coordinates through google search? right now my search is able to have markers on the map, but however i do not have any idea how to retrieve coordinates through just the search api alone. I have a html page named mapsToolKit.html and two js scripts with maps.js and search.js, i want the coding to be in search.js, so far i have managed to done in the maps section but is there anyway to retrieve it back through the search.js part?

    Read the article

  • [objective C] IPhone question about UIImageView memory menagement

    - by BQuadra
    Hi, i have a UIImageView of 1024x768 (the room of my game) and other various UIIMageView on it (the object of my game). The iPhone screen is smaller than the room (UIImageView 1024x768) .. i want to understand if the iPhone's system automatically intercepts the graphic elements outside the visible area of Room (the player's view) and unload temporarily (for memory optimization) or i must do this by hand?? thanks

    Read the article

  • How to keep MPMoviePlayerController open after movie ended?

    - by redguy
    If I use MPMoviePlayerController to play video in my iPhone app, it opens, loads the movie, plays it and then closes. Is it possible to force it to stay open after the movie finishes, so that user can replay it using its controls, instead of using controls in parent view? Also, is it possible to start MPMoviePlayerController in the paused mode? thanks for any advice.

    Read the article

  • How to watch DNR TV in iTunes

    - by TimH
    I have subscribed to DNR TV in iTunes, but it won't download episodes (audio podcasts work fine). Am I missing something? I added this URL in iTunes: http://feeds.feedburner.com/DnrtvWmv

    Read the article

  • g++ How to get warning on ignoring function return value

    - by ArunSaha
    lint produces some warning like: foo.c XXX Warning 534: Ignoring return value of function bar() From the lint manual 534 Ignoring return value of function 'Symbol' (compare with Location) A function that returns a value is called just for side effects as, for example, in a statement by itself or the left-hand side of a comma operator. Try: (void) function(); to call a function and ignore its return value. See also the fvr, fvo and fdr flags in §5.5 "Flag Options". I want to get this warning, if there exists any, during compilation. Is there any option in gcc/g++ to achieve this? I had turned on -Wall but that apparently did not detect this.

    Read the article

  • PHP convert external relative path to absolute path

    - by CMC
    Hello, I am trying to figure out how to convert an "external relative path" to an absolute one: I'd really like a function that will do the following: $path = "/search?q=query"; $host = "http://google.com"; $abspath = reltoabs($host, $path); And have $abspath equal to "http://google.com/search?q=query" The problem is that it is not guaranteed to be in that format, and it could already be absolute, or be pointing to a different host entirely, and I'm not quite sure how to approach this. Thanks.

    Read the article

  • How to preserve order of temp table rows when inner joined with another table?

    - by Triynko
    Does an SQL Server "join" preserve any kind of row order consistently (i.e. that of the left table or that of the right table)? Psuedocode: create table #p (personid bigint); foreach (id in personid_list) insert into #p (personid) values (id) select id from users inner join #p on users.personid = #p.id Suppose I have a list of IDs that correspond to person entries. Each of those IDs may correspond to zero or more user accounts (since each person can have multiple accounts). To quickly select columns from the users table, I populate a temp table with person ids, then inner join it with the users table. I'm looking for an efficient way to ensure that the order of the results in the join matches the order of the ids as they were inserted into the temp table, so that the user list that's returned is in the same order as the person list as it was entered. I've considered the following alternatives: using "#p inner join users", in case the left table's order is preserved using "#p left join users where id is not null", in case a left join preserves order and the inner join doesn't using "create table (rownum int, personid bigint)", inserting an incrementing row number as the temp table is populated, so the results can be ordered by rownum in the join using an SQL Server equivalent of the "order by order of [tablename]" clause available in DB2 I'm currently using option 3, and it works... but I hate the idea of using an order by clause for something that's already ordered. I just don't know if the temp table preserves the order in which the rows were inserted or how the join operates and what order the results come out in.

    Read the article

  • IE and Google Chrome timeout on an IIS6 hosted SSL page that Firefox handles well.

    - by Thomas
    Ok, here's the scenario: Up until a few weeks ago, none of us noticed anything wrong with the corporate website. People were using it without complaint. Then, a client complained that a specific page on the site was timing out for him, and only when he committed a POST action on a form filled with data. I checked it out, and it timed out for me, too. But, it only timed out in Google Chrome and IE, not in Firefox. Additionally, the same page, on the same server, but served from a different domain name (one not under the protection of SSL, either) does not time out under any browser. To clarify: https://www.mysite.com/changes.php times out on POST, but the same with http works fine. That distinction (SSL vs. Non-SSL) seems to be important, as nothing else has changed. Our certificate is valid, and Firefox detects no errors thrown by the page. I've looked at the Request and Response headers from the page, and they all follow the correct formats. Then, after wandering through the site, I noticed a few other things. Both IE and Chrome will frequently time out on any page that is PHP-based. They never time out on static images or html files. I've looked at the site from a variety of different servers, my home and work workstations, and my netbook. Because of that, I've discounted a viral infection, as I highly doubt a virus is going to hit every one of the machines to which I have access in exactly the same manner. My setup is: Server: Win2k3, II6, PHP 5.2.9-1. Clients: IE7, IE8, Chrome (regular and dev channel): Frequent timeouts on PHP pages. Firefox 2, Firefox 3: No timeouts. Firebug shows no errors or even lengthy periods serving the pages. I've spent 2 days searching for any tech knowledge that I can find, and my search parameters are all too general. Everyone has problems loading SSL pages in IE and Chrome for a wide variety of reasons. The infrequent nature of the timeouts and the fact that there are no errors being reported anywhere is starting to drive me insane. Does anyone have any insight on a problem like this?

    Read the article

  • SQLBits Videos

    - by simonsabin
    Would people be interested in buying SQLBits DVDs with the videos from SQLBits? Any funds to help future events would be good so wonder if people would be interested given you can download them yourselves for free....(read more)

    Read the article

  • FIFOs implementation

    - by nunos
    Consider the following code: writer.c mkfifo("/tmp/myfifo", 0660); int fd = open("/tmp/myfifo", O_WRONLY); char *foo, *bar; ... write(fd, foo, strlen(foo)*sizeof(char)); write(fd, bar, strlen(bar)*sizeof(char)); reader.c int fd = open("/tmp/myfifo", O_RDONLY); char buf[100]; read(fd, buf, ??); My question is: Since it's not know before hand how many bytes will foo and bar have, how can I know how many bytes to read from reader.c? Because if I, for example, read 10 bytes in reader and foo and bar are together less than 10 bytes, I will have them both in the same variable and that I do not want. Ideally I would have one read function for every variable, but again I don't know before hand how many bytes will the data have. I thought about adding another write instruction in writer.c between the write for foo and bar with a separator and then I would have no problem decoding it from reader.c. Is this the way to go about it? Thanks.

    Read the article

  • Dependent Dropdowns with single class element

    - by AJ
    I am trying to create multiple dependent dropdowns (selects) with a unique way. I want to restrict the use of selectors and want to achieve this by using a single class selectors on all SELECTs; by figuring out the SELECT that was changed by its index. Hence, the SELECT[i] that changed will change the SELECT[i+1] only (and not the previous ones like SELECT[i-1]). For html like this: <select class="someclass"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> <select class="someclass"> </select> <select class="someclass"> </select> where the SELECTs other than the first one will get something via AJAX. I see that the following Javascript gives me correct value of the correct SELECT and the value of i also corresponds to the correct SELECT. $(function() { $(".someclass").each(function(i) { $(this).change(function(x) { alert($(this).val() + i); }); }); }); Please note that I really want the minimum selector approach. I just cannot wrap my head around on how to approach this. Should I use Arrays? Like store all the SELECTS in an Array first and then select those? I believe that since the above code already passes the index i, there should be a way without Arrays also. Thanks a bunch. AJ

    Read the article

  • Expanding list of databases in SQL Server 2008 Management Studio Takes Longer than SQL Server 2005

    - by Clever Human
    Is it just me, or does expanding the list of databases in SQL Server 2008 Management Studio take significantly more time than expanding the list of databases in SQL Server 2005 Management Studio? If it isn't just me, is there an explanation for this behavior? Whatever it is doing in the background that makes it take longer, can we turn that off? Is it configurable? I know, it seems trivial, but I am perpetually being surprised at how long this takes.

    Read the article

  • Naming Suggestions For A Function Providing Method Chaining In A Different Way

    - by sid3k
    I've coded an experimental function which makes passed objects chainable by using high order functions. It's name is "chain" for now, and here is a usage example; chain("Hello World") (print) // evaluates print function by passing "Hello World" object. (console.log,"Optional","Parameters") (returnfrom) // returns "Hello World" It looks lispy but behaves very different since it's coded in a C based language, I don't know if there is a name for this idiom and I couldn't any name more suitable than "chain". Any ideas, suggestions?

    Read the article

  • Correctly assigning value to a Core Data attribute with an integer data-type

    - by Gordon Fontenot
    I'm missing something here, and feeling like an idiot about it. I'm using a UIPickerView in my app, and I need to assign the row number to a 32-bit integer attribute for a Core Data object. To do this, I am using this method: -(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { object.integerValue = row; } This is giving me a warning: warning: passing argument 1 of 'setIntegerValue:' makes pointer from integer without a cast What am I mixing up here? --Edit 1-- Ok, so I can get rid of the warning by changing the method to do the following: NSNumber *number = [NSNumber numberWithInteger:row]; object.integerValue = rating; However, I still get a value of 0 for object.integerValue if I use NSLog to print it out. object.integerValue has a max value of 5, so I print out number instead, and then I'm getting a number above 62,000,000. Which doesn't seem right to me, since there are 5 rows. If I NSLog the row variable, I get a number between 0 and 5. So why do I end up with a completely different number after casting the number to NSNumber? --Edit 2-- Ok, so I'm realizing that there is some fundamental idea that I don't understand. I now understand that the 60 million + number can be cast back to the correct 0-5 number by using integerValue. So, it seems my question is how can I save an integer between 0-5 to the attribute if the NSNumber that is returned is over 60 million? Do I need to be using a different data type?

    Read the article

  • Prgramming jquery slider

    - by Mirage
    I want to program the jquery slider myself rather than using any plugin. But i want to know the basic idea. e.g I have <ul> <li> <div>content </div> </li> <li> <div>content </div> </li> <li> <div>content </div> </li> <li> <div>content </div> </li> <li> <div>content </div> </li> </ul> I want to show horzontally only three items at one time and there will be arroes left and right end. I know jquery basics. But i don't know how should i do in steps. I mean when click on right arrow The left div should slide left and new div com right should come left ANy ideas in sequence what i need to do

    Read the article

  • Problem understanding treesort in Haskell

    - by Jerry
    I am trying to figure out how exactly does treesort from here work (I understand flatten, insert and foldr). I suppose what's being done in treesort is applying insert for each element on the list thus generating a tree and then flattening it. The only problem I can't overcome here is where the list (that is the argument of the function) is hiding (because it is not written anywhere as an argument except for the function type declaration). One more thing: since dot operator is function composition, why is it an error when I change: treesort = flatten . foldr insert Leaf to treesort = flatten( foldr insert Leaf )?

    Read the article

  • 7 Card Poker Hand Evaluator

    - by Peter
    Hey, Does anyone know a fast algorithm for evaluating 7 card poker hands? Something which is more efficient than simply brute-force checking a every 21 5-card combination of hands from a set of 7. Cheers, Pete

    Read the article

  • IE7 is making my life miserable! Getting gaps between html table columns (w/ colspan) with css togg

    - by Art Peterson
    Copy/paste this html code snippet and try it out in IE7. When you toggle the hidden columns it leaves a gap between the columns. In Firefox it works fine, the columns touch when minimized. Haven't tried IE8 yet, would be curious to hear how it works there. Any ideas? I've tried a bunch of things in the CSS like table-layout:fixed but no luck. Note: Not looking for a different toggling method because the table I'm really dealing with is 50+ columns wide and 4000+ rows so looping/jquery techniques are too slow. Here's the code - if someone can re-post a working version of it I'll instantly give them the check and be forever in your debt! <DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script> function toggle() { var tableobj = document.getElementById("mytable"); if (tableobj.className == "") { tableobj.className = "hide1 hide2"; } else { tableobj.className = ""; } } </script> <style> table { border-collapse: collapse; } td, th { border: 1px solid silver; } .hide1 .col1 { display: none; } .hide2 .col2 { display: none; } </style> </head> <body> <input type="button" value="toggle" onclick="toggle();" /> <table id="mytable"> <tr> <th>A</th> <th colspan="2">B</th> <th colspan="2" class="col1">B1</th> <th colspan="2">C</th> <th colspan="2" class="col2">C1</th> </tr> <tr> <td>123</td> <td>456</td> <td>789</td> <td class="col1">123</td> <td class="col1">456</td> <td>789</td> <td>123</td> <td class="col2">456</td> <td class="col2">789</td> </tr> </table> </body> </html>

    Read the article

  • Is there a better way to change user password in cakephp using Auth?

    - by sipiatti
    Hi, I am learning cakephp by myself. I tried to create a user controller with a changepassword function. It works, but I am not sure if this is the best way, and I could not googled up useful tutorials on this. Here is my code: class UsersController extends AppController { var $name = 'Users'; function login() { } function logout() { $this->redirect($this->Auth->logout()); } function changepassword() { $session=$this->Session->read(); $id=$session['Auth']['User']['id']; $user=$this->User->find('first',array('conditions' => array('id' => $id))); $this->set('user',$user); if (!empty($this->data)) { if ($this->Auth->password($this->data['User']['password'])==$user['User']['password']) { if ($this->data['User']['passwordn']==$this->data['User']['password2']) { // Passwords match, continue processing $data=$this->data; $this->data=$user; $this->data['User']['password']=$this->Auth->password($data['User']['passwordn']); $this->User->id=$id; $this->User->save($this->data); $this->Session->setFlash('Password changed.'); $this->redirect(array('controller'=>'Toners','action' => 'index')); } else { $this->Session->setFlash('New passwords differ.'); } } else { $this->Session->setFlash('Typed passwords did not match.'); } } } } password is the old password, passwordn is the new one, password2 is the new one retyped. Is there any other, more coomon way to do it in cake?

    Read the article

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