Search Results

Search found 12674 results on 507 pages for 'programming competitions'.

Page 190/507 | < Previous Page | 186 187 188 189 190 191 192 193 194 195 196 197  | Next Page >

  • Excelsheet query

    - by kunj
    Hi, Please tell me how can I find the last word from any particular cell in excel sheet if cell contains multiple words or instructions. For ex- The below string is in particular cell: C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpg My requirement is to search only last word in that cell i.e. Blue hills.jpg Your early response is highly appreciated!!!

    Read the article

  • A good way to look back arbitrary number of items in the Array.Fold in F#

    - by tk
    In the folder function of the Array.Fold operation, i want to look back arbitrary number of items. The only way i can figure out is like this. let aFolder (dataArray, curIdx, result) (dataItem) = let N = numItemsToLookBack(result, dataItem) let recentNitems = dataArray.[curIdx - n .. curIdx - 1] let result = aCalc(result, dataItem, recentNitems ) dataArray, curIdx + 1, result myDataArray | Array.fold aFolder (myDataArray, 0, initResult) As you can see, I passed the whole dataArray and index to the folder function to get the "recentNitems". But this way allows the folder function to access not only preceding data, but also the following data. Is there a better (or more functional) way?

    Read the article

  • how to configure IP cam to stream using right network card?

    - by robin hood
    I have IP cam that supports RTSP streaming. It's connected to router with 2 network cards with IP1 and IP2 addresses. I make 2 connections to IP cam by IP1 and IP2 addresses from the same IP and I need to receive corresponding streams thru correct network card, but both streams (RTP over UDP) go thru IP1. How this can be resolved? I don't know if RTSP server binds UDP sockets to corresponding IP and I don't know what IP stack is in IP cam (weak end system or strong end system). I haven't found anything interesting in router configuration. As I understand, routing table cannot help me cos I'm connected from the same IP, is it right? Also Sorry for incomplete info but it's all I have at the moment. Thanks for your time.

    Read the article

  • Scala, make my loop more functional

    - by Pengin
    I'm trying to reduce the extent to which I write Scala (2.8) like Java. Here's a simplification of a problem I came across. Can you suggest improvements on my solutions that are "more functional"? Transform the map val inputMap = mutable.LinkedHashMap(1->'a',2->'a',3->'b',4->'z',5->'c') by discarding any entries with value 'z' and indexing the characters as they are encountered First try var outputMap = new mutable.HashMap[Char,Int]() var counter = 0 for(kvp <- inputMap){ val character = kvp._2 if(character !='z' && !outputMap.contains(character)){ outputMap += (character -> counter) counter += 1 } } Second try (not much better, but uses an immutable map and a 'foreach') var outputMap = new immutable.HashMap[Char,Int]() var counter = 0 inputMap.foreach{ case(number,character) => { if(character !='z' && !outputMap.contains(character)){ outputMap2 += (character -> counter) counter += 1 } } }

    Read the article

  • Call/Return feature of classic C++(C with Classes), what modern languages have it?

    - by AraK
    Hi, On page 57 of The Design and Evolution of C++, Dr. Stroustrup talks about a feature that was initially part of C with Classes, but it isn't part of modern C++(standard C++). The feature is called call/return. This is an example: class myclass { call() { /* do something before each call to a function. */ } return() { /* do something else after each call to a function. */ } ... }; I find this feature very interesting. Does any modern language have this particular feature?

    Read the article

  • How to determine IP used by client connecting to INADDR_ANY listener socket in C

    - by codebox_rob
    I have a network server application written in C, the listener is bound using INADDR_ANY so it can accept connections via any of the IP addresses of the host on which it is installed. I need to determine which of the server's IP addresses the client used when establishing its connection - actually I just need to know whether they connected via the loopback address 127.0.0.1 or not. Partial code sample as follows (I can post the whole thing if it helps): static struct sockaddr_in serverAddress; serverAddress.sin_family = AF_INET; serverAddress.sin_addr.s_addr = INADDR_ANY; serverAddress.sin_port = htons(port); bind(listener, (struct sockaddr *) &serverAddress, sizeof(serverAddress)); listen(listener, CONNECTION_BACKLOG); SOCKET socketfd; static struct sockaddr_in clientAddress; ... socketfd = accept(listener, (struct sockaddr *) &clientAddress, &length);

    Read the article

  • how works applications which blocks web sites?

    - by noisy
    I know only one low-level way of blocking websites - hosts file. However, it is obvious that main stream programs has some other way of achieving this. I have an idea for new model of this kind of program, but without possibility of blocking sites it is useless :(

    Read the article

  • Help Needed Finding a Programmer

    - by ssean
    Good Morning, I am trying to find a programmer to code a piece of custom software for my business. I plan on using this software to manage my business, and possibly sell it to other companies (in the same industry) at a later date. I've never hired a programmer before, so I'm not sure what to expect or where to begin. I know exactly what features I need, and how I want it laid out, I just need someone who can take my ideas and make it happen. This software will be used to manage customer information, and keep track of orders. What I think I need: * SQL Server or similar database that will be located at our office. * Desktop Application, that connects via LAN to the database server (cannot be browser based) * Multiple User Support (Simultaneous users accesing the system) * Needs to be scalable (currently we have 5 employees, but who knows what the future will bring) * Multi-Platform Support (Windows, Linux) I posted a job offer through elance, which seems to raise more questions than answers. How do I decide what language(s) will work best for my situation? (I have received offers for C#, Eclipse, .NET, Powerbuilder, etc. - I want to make sure that I choose the best one now, so I don't run into problems later) Does the programmer hold any rights to the software? (I plan to offer the software for sale at a later date) Any help or insight would be appreciated, and I'd be happy to clarify anything if it helps. Thanks in advance!

    Read the article

  • Simple way to print value of a register in x86 assembly.

    - by Bob
    I need to write a program in 8086 Assembly that receives data from the user, does some mathematical calculations and prints the answer on the screen, I have written all parts of the program and all work fine but I don't know how to print the number to the screen. At the end of all my calculation the answer is AX and it is treated as an unsigned 16 bit integer. How do I print the decimal (unsigned) value of the AX register?

    Read the article

  • How can I write simulations in Erlang?

    - by rick
    Hi guys, I want to do some numerical stuff in Erlang like this: You've got an array with the following values: [2,3,4] In each iteration, you calculate 0.1 * [n-1] + 0.7 *[n] + 0.2 * [n+1] This becomes the new [n]. If n == 0 then [n-1] = 0. If [n] == length of array then [n] = 0. So I try an example: [2,3,4] calculations: 0.1 * 0 + 0.7 * 2 + 0.2 * 3 = 2 0.1 * 2 + 0.7 * 3 + 0.2 * 4 = 3.1 0.1 * 3 + 0.7 * 4 + 0.2 * 0 = 3.1 So [2,3,4] becomes to [2, 3.1, 3.1] after one iteration. I know how to write this in a non-functional language like C. But I have difficulties to imagine, how this could be done in Erlang. I found some tutorials on how you read a file to a list. So this is not the problem. How can I spawn different Erlang processes that each process has one element of the list? How can I do calculations by communicating with 'the neighbors', so that the neighbors know where their neigbors are generically, without specifying each? How can I collect the data into a list? Eventually, is it possible to solve that problem in Erlang at all? Thanks for your help.

    Read the article

  • how to set cache for css/js file.

    - by coderex
    Hi all, I have to use the cache for the css files and js file which i used in the site. my site running in a shared hosting server. nothing can be done with server. so what could be the solution for use cache and compression for js and css files.

    Read the article

  • Applet networking patterns

    - by Kristoffersen
    Hi SO. I have an applet that connects to a server, it receives some commands and based on that it haves to draw (or move) different things. Which patterns should I use? I assume that the network connection and applet should run in two different threads? Thanks, Kristoffer

    Read the article

  • Create servlet from existing Java project

    - by user69514
    I have a Java Swing project for my class. I would like put it on my website so people can use it. However I'm not sure if there is a way to turn it into a servlet. Or do I need to know JavaScript? I'm confused. Is there a way to make my swing application into a servlet automatically?

    Read the article

  • Why can't a bind linux service to the loop-back only?

    - by Jon Trauntvein
    I am writing a server application that will provide a service on an ephemeral port that I only want accessible on the loopback interface. In order to do this, I am writing code like the following: struct sockaddr_in bind_addr; memset(&bind_addr,0,sizeof(bind_addr)); bind_addr.sin_family = AF_INET; bind_addr.sin_port = 0; bind_addr.sin_addr.s_addr = htonl(inet_addr("127.0.0.1")); rcd = ::bind( socket_handle, reinterpret_cast<struct sockaddr *>(&bind_addr), sizeof(bind_addr)); The return value for this call to bind() is -1 and the value of errno is 99 (Cannot assign requested address). Is this failing because inet_addr() already returns its result in network order or is there some other reason?

    Read the article

  • what is main focus for a developer when coding?

    - by ajsie
    i read a lot of books about how to code right and usually the are talking about all these techniques from a point of view i can't understand. eg. lets consider the singleton pattern. i'm restricting so the class can only be instantiated once. but since it's only me creating the application, if i know that the class only should be instantiated once, then why would i create it a second time? i feel like missing the big picture. what is my main goal when coding an application? how should i think? thanks

    Read the article

  • Parallelism on two duo-core processor system

    - by Qin
    I wrote a Java program that draw the Mandelbrot image. To make it interesting, I divided the for loop that calculates the color of each pixel into 2 halves; each half will be executed as a thread thus parallelizing the task. On a two core one cpu system, the performance of using two thread approach vs just one main thread is nearly two fold. My question is on a two dual-core processor system, will the parallelized task be split among different processor instead of just utilize the two core on one processor? I suppose the former scenario will be slower than the latter one simply because the latency of communicating between 2 CPU over the motherboard wires. Any ideas? Thanks

    Read the article

  • What will be the OOP approach? (or YOUR approach?)

    - by hsmit
    I'm having difficulties with some general OOP & Java approach. There are various ways to let classes/objects communicate with each other. To give a simple example: I need object A to perform action X. Object A needs P, Q and R to perform this action X. Will then Object A retrieve P, Q and R by itself (within action X), or must these values be parameters for action X?

    Read the article

  • Haskell: How to compose `not` with a function of arbitrary arity?

    - by Hynek -Pichi- Vychodil
    When I have some function of type like f :: (Ord a) => a -> a -> Bool f a b = a > b I should like make function which wrap this function with not. e.g. make function like this g :: (Ord a) => a -> a -> Bool g a b = not $ f a b I can make combinator like n f = (\a -> \b -> not $ f a b) But I don't know how. *Main> let n f = (\a -> \b -> not $ f a b) n :: (t -> t1 -> Bool) -> t -> t1 -> Bool Main> :t n f n f :: (Ord t) => t -> t -> Bool *Main> let g = n f g :: () -> () -> Bool What am I doing wrong? And bonus question how I can do this for function with more and lest parameters e.g. t -> Bool t -> t1 -> Bool t -> t1 -> t2 -> Bool t -> t1 -> t2 -> t3 -> Bool

    Read the article

< Previous Page | 186 187 188 189 190 191 192 193 194 195 196 197  | Next Page >