Daily Archives

Articles indexed Sunday April 11 2010

Page 4/79 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Unix RPC programming

    - by Abhi
    Heyy all, I needed some help with ONC RPC programming. My task is to create two-tier client-server architecture wherein one main server (something like a directory) keeps a track of level-two servers and acts as a lookup; the level-two servers exposing some trivial functions, and finally, the clients for level-two servers. The clients ask the directory where a server is located, and then communicate with it. Using RPCGEN, we can create a pair of client-server code; however, the clients in this case need to have stubs for the directory as well as the level-two functions. Being a newbie to RPC, I'm having trouble conceptualizing the way I should code this. How can I call a function from a different server if a client is generated using a different IDL ? Any pointers would be appreciated :) Regards, Abhi

    Read the article

  • JQUERY nav problem

    - by turborogue
    This is part 2 of a different problem that I was having... Hopefully this is about as simple as you can get, but I'm clearly missing something..... The gist is, I'm trying to get a mouseover effect using jquery/css with a mix of background images and colors. It's mostly there, but the issue that I'm having at the moment is, I mouseover the main nav = fine, I mouseover the subnav = fine, I mouse BACK over to that same main nav element, and it's OFF state kicks in instead of remaining ON as it's supposed to... I pasted my code here (since it's kinda long, and apparently I can only paste one link....) http://tinypaste.com/2222e -- a link to my most recent efforts is at the bottom of that pastebin -- hopefully the gist of what I'm trying to do will be clear. I'll keep plugging away for a while, but any help would be greatly appreciated!!:)

    Read the article

  • How do I remove an array dimension where the elements sum to zero?

    - by James
    I am assigning a 3D array, which contains some information for a number of different loadcases. Each row in the array defines a particular loadcase (of which there are 3) and I would like to remove the loadcase (i.e. the row) if ALL the elements of the row (in 3D) are equal to zero. The code I have at the moment is: Array = zeros(3,5) %# Initialise array Numloadcases = 3; Array(:,:,1) = [10 10 10 10 10; 0 0 0 0 0; 0 0 0 0 0;]; %# Expand to a 3D array Array(:,:,2) = [10 10 10 10 10; 0 0 0 0 0; 0 0 0 0 0;]; Array(:,:,3) = [10 10 10 10 10; 0 0 0 0 0; 0 0 20 0 0;]; Array(:,:,4) = [10 10 10 10 10; 0 0 0 0 0; 0 0 20 0 0;]; %# And to remove the second row: for i = 1:Numloadcases if sum(Array(i,:,:)) == 0 Array(i,:,:) = []; end end At the moment, the for loop I have to remove the rows causes an indexing error, as the size of the array changes in the loop. Can anyone see a work around for this?

    Read the article

  • SQLAuthority News – Spot the SQLAuthority Baby Contest – SQL Server Cheat Sheet

    - by pinaldave
    Last Year during the TechEd India 2009 SQL Server Cheat Sheets were instant hit. Yesterday when I announce that I am going to attend TechED India 2010 at Bangalore, I received many requests for the same. I have only 30 copies available at this moment.  I will print more copies of the same after this event. For the moment I am going to run quick content to win SQL Server Cheat Sheet during this event. The contest is very simple. My 7 months old daughter will join me in this trip. She will be staying with me in the same hotel where the event is organized. Here is the detail for contest: Contest: If you Spot SQLAuthority Baby, get one SQL Server Cheat Sheet. Rules: Every hour the first person to spot SQLAuthority Baby will get 1 SQL Server Cheat Sheet. If you spot her and the hourly SQL Server Cheat Sheet is given away, you still have chance to get a copy. Drop your business card or email address and we will contact you for your copy. SQLAuthority Baby is very easy to spot. Shaivi Dave If you are not attending this event and want copy, you can easily download the same from link below. Download SQL Server Cheat Sheet from here. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: MVP, Pinal Dave, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: SQL Cheat Sheet, TechEd, TechEdIn

    Read the article

  • Finding the second highest number in array

    - by Richard Jackson
    I'm having difficulty to understand the logic behind the method to find the second highest number in array. The method used is to find the highest in the array but less than the previous highest (which has already been found). The thing that I still can't figure it out is why || highest_score == second_highest is necessary. For example I input three numbers: 98, 56, 3. Without it, both highest and second highest would be 98. Please explain. int second highest = score[0]; if (score[i] > second_highest && score[i] < highest_score || highest_score == second_highest) second_highest = score[i];

    Read the article

  • a question on webpage data scraping using Java

    - by Gemma
    Hi there. I am now trying to implement a simple HTML webpage scraper using Java.Now I have a small problem. Suppose I have the following HTML fragment. <div id="sr-h-left" class="sr-comp"> <a class="link-gray-underline" id="compare_header" rel="nofollow" href="javascript:i18nCompareProd('/serv/main/buyer/ProductCompare.jsp?nxtg=41980a1c051f-0942A6ADCF43B802'); " Compare Showing 1 - 30 of 1,439 matches, The data I am interested is the integer 1.439 shown at the bottom.I am just wondering how can I get that integer out of the HTML. I am now considering using a regular expression,and then use the java.util.Pattern to help get the data out,but still not very clear about the process. I would be grateful if you guys could give me some hint or idea on this data scraping. Thanks a lot.

    Read the article

  • How can a data ellipse be superimposed on a ggplot2 scatterplot?

    - by Radu
    Hi, I have an R function which produces 95% confidence ellipses for scatterplots. The output looks like this, having a default of 50 points for each ellipse (50 rows): [,1] [,2] [1,] 0.097733810 0.044957994 [2,] 0.084433494 0.050337990 [3,] 0.069746783 0.054891438 I would like to superimpose a number of such ellipses for each level of a factor called 'site' on a ggplot2 scatterplot, produced from this command: > plat1 <- ggplot(mapping=aes(shape=site, size=geom), shape=factor(site)); plat1 + geom_point(aes(x=PC1.1,y=PC2.1)) This is run on a dataset, called dflat which looks like this: site geom PC1.1 PC2.1 PC3.1 PC1.2 PC2.2 1 Buhlen 1259.5649 -0.0387975838 -0.022889782 0.01355317 0.008705276 0.02441577 2 Buhlen 653.6607 -0.0009398704 -0.013076251 0.02898955 -0.001345149 0.03133990 The result is fine, but when I try to add the ellipse (let's say for this one site, called "Buhlen"): > plat1 + geom_point(aes(x=PC1.1,y=PC2.1)) + geom_path(data=subset(dflat, site="Buhlen"),mapping=aes(x=ELLI(PC1.1,PC2.1)[,1],y=ELLI(PC1.1,PC2.1)[,2])) I get an error message: "Error in data.frame(x = c(0.0977338099339815, 0.0844334944904515, 0.0697467834016782, : arguments imply differing number of rows: 50, 211 I've managed to fix this in the past, but I cannot remember how. It seems that geom_path is relying on the same points rather than plotting new ones. Any help would be appreciated.

    Read the article

  • Separating null byte separated UNICODE C string.

    - by Ramblingwood
    First off, this is NOT a duplicate of: http://stackoverflow.com/questions/1911053/turn-a-c-string-with-null-bytes-into-a-char-array , because the given answer doesn't work when the char *'s are Unicode. I think the problem is that because I am trying to use Unicode and thus wchar_t instead of char, the length of each character is different and thus, this doesn't work (it does in non-unicode): char *Buffer; // your null-separated strings char *Current; // Pointer to the current string // [...] for (Current = Buffer; *Current; Current += strlen(Current) + 1) printf("GetOpenFileName returned: %s\n", Current); Does anyone have a similar solution that works on Unicode strings? I have been banging my head on the this for over 4 hours now. C doesn't agree with me.

    Read the article

  • Should I use PHP or PHP + J2EE?

    - by Sean Xiong
    I'm going to start a new project with instant message support. I find that there is no good long polling solution in PHP, but there is some good ones in J2EE. I'm wondering if I can integrate PHP and J2EE to get the function? Or should I just use J2EE instead of PHP? Thanks.

    Read the article

  • check the index jquery

    - by acidzombie24
    Is there a way to get i without looping? like e.ThisIndex? $('#userContentImages li a').live('click', function (e) { if (e.button != 0) return false; var objs = $('#userContentImages li a'); for(var i=0; i<objs.length; i++) { if($(this).get(0) == objs.get(i)) break; } //do stuff return false; });

    Read the article

  • What are some models that you know of for PHP OOP?

    - by Doug
    I recently learned a lot about MVC model which is a very interesting concept. I would assume there are a lot more models out there, and I thought it would be great for people to share some models. Here's my contribution: MVC Model: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

    Read the article

  • Multiple delivery confirmations per message with Ruby SMPP

    - by Santiago Palladino
    I am using the ruby smpp library to send/receive SMS. Right now we are sending messages to two different servers, using the ruby-smpp library. One of them works perfectly, but the other one sends multiple DELIVRD confirmations for each messages. And by multiple I mean hundreds of confirmations per message in some cases. Does anyone know any possible reason behind this? I am thinking on something relative to the implementation of the protocol the company is using, since it works perfectly with the other one, and not on the lines of a bug in the specific smpp ruby library. We are using smpp v3.4.

    Read the article

  • How to read a barcode from an image

    - by tardate
    I'm seeking a library, technique or advice on how to read an EAN-13 barcode from an image (including ISBN,and ISSN encodings). The image would come from a mobile phone or webcam, so resolution may be quite poor and not well aligned. I'm specifically interested in something that could be used from ruby on rails, but answers for other languages are welcome. Open Source solutions preferred. Leading solutions so far: ZBar (previously known as Zebra - h/t @bgbg, @Natim) and ZXing (h/t @codr)

    Read the article

  • DirectoryEntry to change password: Different behavior between Vista/Server2008

    - by Gnucom
    Hey everyone, On a Vista dev machine I used this code successfully to change user "Administrator" password: directoryEntry.Invoke("SetPassword", "new"); When I moved it over to my Server 2008 dev machine that code did not work, and I was forced to use the following code: directoryEntry.Invoke("ChangePassword", new object[] { "old", "new" }); My question is, why? For both cases, I created my DirectoryEntry object as such: DirectoryEntry directoryEntry = new DirectoryEntry(string.Format("WinNT://{0}/{1}", computerName, username)); Thanks! 8)

    Read the article

  • How to create a protocol at runtime in Objective-C?

    - by Jared P
    Hi, First of all, I want to be clear that I'm not talking about defining a protocol, and that I understand the concept of @protocol someprotocol - (void)method; @end I know that the Obj-C runtime allows creation of classes at RUNTIME, as well as its ivars and methods. Also available for creation are SEL-s. I think I'm just missing something, but does anyone know what function to call to create a protocol at runtime? The main reason for this is for conformsToProtocol: to work, so just adding the appropriate methods doesn't really cut it.

    Read the article

  • .htaccess rules to have cakephp in root and wordpress in subfolder

    - by cc-mf
    Hello, How can I combine the .htaccess rules for cakephp RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] with the following RewriteEngine On RewriteCond %{HTTP_HOST} folder.yoursite.com RewriteRule ^(.*)$ /folder [L] in other words redirect anything to app/webroot/ except /blog (wich is an exisiting folder with a wordpress installation) and redirect blog.domain.com to the blog subfolder Thank you very much

    Read the article

  • Real-time data on webpage with Django and jQuery

    - by Steven Hepting
    I would like a webpage that constantly updates a graph with new data as it arrives. Regularly, all the data you have is passed to a Django view at the beginning of the request. However, I need the page to be able to update itself with fresh information every few seconds to redraw the graph. Background The webpage will be similar to this http://www.panic.com/blog/2010/03/the-panic-status-board/. The data coming in will temperature values to be graphed measured by an Arduino and saved to the Django database (I've already done this part).

    Read the article

  • typeInteger undeclared in EyeTunes framework

    - by Chris
    I copied the EyeTunes framework into my project and it says that is not declared. In the original project I go to definition and it takes me to AEDataModel.h where it is defined. However in my project it doesn't do that and it's not found. How do I add AEDataModel to my project? Thanks

    Read the article

  • Dynamic Number Table

    - by Derek D.
    Using a numbers table is helpful for many things. Like finding gaps in a supposed sequence of primary keys, or generating date ranges or any numerical range. In some cases, you will be in a production system that does not already contain a numbers table and you will also be unable to add [...]

    Read the article

  • using '.each' method: how do I get the indexes of multiple ordered lists to each begin at [0]?

    - by shecky
    I've got multiple divs, each with an ordered list (various lengths). I'm using jquery to add a class to each list item according to its index (for the purpose of columnizing portions of each list). What I have so far ... <script type="text/javascript"> /* Objective: columnize list items from a single ul or ol in a pre-determined number of columns 1. get the index of each list item 2. assign column class according to li's index */ $(document).ready(function() { $('ol li').each(function(index){ // assign class according to li's index ... index = li number -1: 1-6 = 0-5; 7-12 = 6-11, etc. if ( index <= 5 ) { $(this).addClass('column-1'); } if ( index > 5 && index < 12 ) { $(this).addClass('column-2'); } if ( index > 11 ) { $(this).addClass('column-3'); } // add another class to the first list item in each column $('ol li').filter(function(index) { return index != 0 && index % 6 == 0; }).addClass('reset'); }); // closes li .each func }); // closes doc.ready.func </script> ... succeeds if there's only one list; when there are additional lists, the last column class ('column-3') is added to all remaining list items on the page. In other words, the script is presently indexing continuously through all subsequent lists/list items, rather than being re-set to [0] for each ordered list. Can someone please show me the proper method/syntax to correct/amend this, so that the script addresses/indexes each ordered list anew? many thanks in advance. shecky p.s. the markup is pretty straight-up: <div class="tertiary"> <h1>header</h1> <ol> <li><a href="#" title="a link">a link</a></li> <li><a href="#" title="a link">a link</a></li> <li><a href="#" title="a link">a link</a></li> </ol> </div><!-- END div class="tertiary" -->

    Read the article

  • Selling an app to a company - How much to charge?

    - by Moshe
    I wrote an app targeting a particular clientele. A software company with a reputation among my target audience is willing to negotiate a price to either license or buy it. As a newcomer to the app store, I am not sure that I will successfully market it myself. What would be appropriate terms of a sale or license and what about pricing? I am looking for answers that draw from personal experience with software, although not necessarily apps. I've seen this post on SO, but it's a few years old and I assume that the app market has changed and stabilized somewhat. Thanks.

    Read the article

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