Search Results

Search found 1666 results on 67 pages for 'practical joke'.

Page 46/67 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Filtering subsets using Linq

    - by Nathan Matthews
    Hi All, Imagine a have a very long enunumeration, too big to reasonably convert to a list. Imagine also that I want to remove duplicates from the list. Lastly imagine that I know that only a small subset of the initial enumeration could possibly contain duplicates. The last point makes the problem practical. Basically I want to filter out the list based on some predicate and only call Distinct() on that subset, but also recombine with the enumeration where the predicate returned false. Can anyone think of a good idiomatic Linq way of doing this? I suppose the question boils down to the following: With Linq how can you perform selective processing on a predicated enumeration and recombine the result stream with the rejected cases from the predicate?

    Read the article

  • a completely decoupled OO system ?

    - by shrini1000
    To make an OO system as decoupled as possible, I'm thinking of the following approach: 1) we run an RMI/directory like service where objects can register and discover each other. They talk to this service through an interface 2) we run a messaging service to which objects can publish messages, and register subscription callbacks. Again, this happens through interfaces 3) when object A wants to invoke a method on object B, it discovers the target object's unique identity through #1 above, and publishes a message on the message service for object B 4) message services invokes B's callback to give it the message 5) B processes the request and sends the response for A on message service 6) A's callback is called and it gets the response. I feel this system is as decoupled as practically possible, but it has the following problems: 1) communication is typically asynchronous 2) hence it's non real time 3) the system as a whole is less efficient. Are there any other practical problems where this design obviously won't be applicable ? What are your thoughts on this design in general ?

    Read the article

  • Explicit or implicit execution control statement use

    - by Andrei Rinea
    I sometimes use if (this._currentToolForeColor.HasValue) return this._currentToolForeColor.Value; else throw new InvalidOperationException(); other times I use if (this._currentToolForeColor.HasValue) return this._currentToolForeColor.Value; throw new InvalidOperationException(); The two are equivalent, I know, but I am not sure which is the best and why. This goes even further as you can use other execution-control statements such as brake or continue : while(something) { if(condition) { DoThis(); continue; } else break; } versus while(something) { if(condition) { DoThis(); continue; } break; } EDIT 1 : Yes the loop example(s) suck because they are synthetic (i.e.: made up for this question) unlike the first which is practical.

    Read the article

  • What is the best method of assessment for computer science students?

    - by Gavimoss
    This question is a bit more philosophical so feel free to remove if you like but it's been bugging me for the last 4 years! As a final year student I find that exams can be often be passed with a couple of days of cramming, without necessarily retaining or understanding the content i.e. a regurgitation of lecture notes is often enough to gain high marks. A friend of mine is about to graduate with an honours degree whose final year evaluation was based solely on practical work (a project, assignment marks and the creation of a poster) yet all of this work could have been completed by a third party. Personally I don't think either of these methods of assessment is sufficient as I am currently on track for a 1st class honours in artificial intelligence and computer science and believe this is mostly due to my skill in passing exams not my skill as a programmer or my vast in depth knowledge of any of the subjects I have "studied". Surely there is a better way to assess our skills - isn't there?

    Read the article

  • Dynamic name of NSMutableDictionary?

    - by Bruno
    Hi everyone I load from a txt file many info, and I would like, if possible, to dynamically create NSmutable dictionary with the elements of the txt. For example, each is like that: id of element | date | text What I'm asking is the equivalent of the NSString stringWithFormat:. Can we do the same for an Mutable Dictionary? To be more practical, let's say the NSString *date is equal to "23/12/2009" (for europe). I want to create a dictionary called 23/12/2009 without declaring *23/12/2009 but just something like dictionaryWithFormat: @"%@", date]; I'm stuck on this, and I don't even know if it is possible. If not, what's the best way to approach that? Thanks everyone Regards

    Read the article

  • Best means to store data locally when offline

    - by mickartz
    I am in the midst of writing a small program (more to experiment with vs 2010 than anything else) Despite being an experiment it has some practical use for our local athletics club. My thought was to access the DB (currently online) to download the current members and store locally on a laptop (this is a MS sql table, used to power the club's website). take the laptop to the event (yes there ARE places that don't have internet coverage), add members to that days race (also a row from a sql table (though no changes would be made to this), record results (new records in 3rd table) Once home, showered and within internet access again, upload/edit the tables as per the race results/member changes etc. So I was thinking i'd do something like write xml files locally with the data, including a field to indicate changes etc? If anyone can point me in a direction i would appreciate it...hell if anyone could tell me if this has a name, I'd appreciate it.

    Read the article

  • Is it possible to reference a file stored in Isolated Storage by its URI?

    - by Joel
    Using this previous question as motivation, I would like to temporarily store images and videos in Isolated Storage. My application (written in WPF/C#) will allow a user to review these temporarily stored items by viewing their contents in a MediaElement. I was hoping to set the MediaElement's Source Property to a video or image's URI stored in IsolatedStorage but I cannot figure out how to dynamically create a URI since it doesn't appear to be naively supported by IsolatedStorage. Any help would be greatly appreciated - thank you in advance! Update - 1/21/09 After battling the issue for a day, I concluded that the Isolated Storage approach is not practical for storing large video files that need to be referenced by a Uri.

    Read the article

  • Advantages of using WCF to work with Sharepoint Services WSS3.0?

    - by val
    Hi folks, what is your opinion or better off your practical experience using WCF to work with WSS instead of SP web services? I am writing some custom library for our software to store and retrieve files from WSS document libraries using sharepoint web services. I am not entirely happy with the performance of the sp web services - a bit too slow in many cases. Now, microsoft claims a significant improvements in WCF over remoting and I am looking into a good way to use WCF for my file services. Any suggestions or ideas? Maybe a good source of coding practices or blogs? Thanks a lot, Val

    Read the article

  • How can i connect two or more machines via tcp cable to form a network grid?

    - by Gath
    How can i connect two or more machines to form a network grid and how can i distribute work load to the two machines? What operating systems do i need to run on the machines, and what application should i use to manage the load balancing? NB: I read somewhere that google uses cheap machines to perform this fete, how do they connect two network cards( 'Teaming' ) and distribute load across the machines? Good practical examples would serve me good, with actual code samples. Pointers to some good site i might read this stuff will be highly appreciated.

    Read the article

  • $.get sends prototype functions in request URL?

    - by pimvdb
    I have some prototype functions added to Object which in my opinion were practical in certain scenarios. However, I noticed that when I executed a $.get, the prototype functions are handled as data members and are sent like http://...?prototypefunc=false. This is rather useless as I don't supply these as data members, but they are added to the query string. To be exact, I have this code: Object.prototype.in = function() { for(var i=0; i<arguments.length; i++) if(arguments[i] == this) return true; return false; } $.get('http://localhost/test.php', {'test': 'foo'}, function(text) { }); The corresponding URL constructed is: http://localhost/test.php?test=foo&in=false How can I avoid this?

    Read the article

  • Advise on starting a new job

    - by Sisiutl
    I hope this isn't too off-topic, but in a week I will start a new job at a manufacturing company managing the development of a new eCommerce site. The company scores about a 3 on the "Joel" test. I will inherit 3 programmers who developed the company web site and do general IT programming. I have the grey hair and credentials to have their initial respect but I'm an engineer, not a manager. I'm looking for practical advise - particularly for the first 90 days - on how to establish myself, keep the team together, and move forward.

    Read the article

  • Does anybody have practice in programming PCMEF - architectures?

    - by Erkki
    PCMEF is an architecture style presented in the book Practical Software Engineering by Maciaszek and Liong. The layers are: P: Presentation C: Controller M: Mediator E: Entity F: Foundation. It is some kind of enchancement compared with MVC - architecture. I recommend it to interactice, data and communicating - oriented purposes. I have programmed it using Visual Prolog. Foundation in my applications is the data model (domains) for the application. PCMEF is like a simulated computer: Presentation is the display, Controller the user interface and event handling, Mediator the internal logic and data highway. Entity is the database or external interfaces and F defines the knowledge. This is a really nice small architecture. Does any other have experiance of it?

    Read the article

  • Need to dynamically-generate a "sticky note" text

    - by gravyface
    Working on a website that has an image of a sticky note which will change text somewhat frequently (every month or so) as new "todo" items are created on it. Font I'm currently using is not Web Safe and the text is slightly angled to match the skew of the sticky note as well. Now I'm a pragmatist, and in situations like this I would normally secede defeat and opt for something more CSS/HTML practical. But no more! I'm falling a bit behind on what's going on with HTML5, CSS3, PNG graphics, Flash (ugh), and/or any other rich visuals. I'm decent with PHP/CSS/JS (jquery), have dabbled in Flash/actionscript too. My question is: what tools/method should I be looking at here?

    Read the article

  • How to pass or display mySQL data based on subscription or billing

    - by spm
    I want to build a PHP based site where, the user can view data based on the types of data they've paid for. Allow me to use something simple for an example. Let's say historical data for basketball was not readily available but could be purchased. Simple information such as the Winner, Loser, Final score and date are all stored in a mySQL table. What would be involved so that, when the user logs in, they can only see the historical data they have paid for. My theories so far about the architecture: I imagined a mySQL table storing True or False values for all historical game data they have paid for. Based on this, a 'data chart' object enables the user to view all data within their mySQL row which has a value of 'true.' Follow ups: Assuming I am correct, what methods are popular or practical for this type of service.

    Read the article

  • Write the longest possible loop.

    - by Abhay
    Hello Group, Recently I was asked this question in a technical discussion. What is the longest possible loop that can be written in a programming language? This loop has to be as long as possible and yet not an infinite loop and should not end-up crashing the program (Recursion etc...) I honestly did not know how to attack this problem, so I asked him if is it practically possible. He said using some computer science concepts, you can arrive at a hypothetical number which may not be practical but nevertheless it will still not be infinite. Anyone here; knows how to analyse / attack this problem. P.S. Choosing some highest limit for a type that can store the highest numerical value is apparently not an answer. Thanks in advance,

    Read the article

  • How to hash and check for equality of objects with circular references

    - by mfya
    I have a cyclic graph-like structure that is represented by Node objects. A Node is either a scalar value (leaf) or a list of n=1 Nodes (inner node). Because of the possible circular references, I cannot simply use a recursive HashCode() function, that combines the HashCode() of all child nodes: It would end up in an infinite recursion. While the HashCode() part seems at least to be doable by flagging and ignoring already visited nodes, I'm having some troubles to think of a working and efficient algorithm for Equals(). To my surprise I did not find any useful information about this, but I'm sure many smart people have thought about good ways to solve these problems...right? Example (python): A = [ 1, 2, None ]; A[2] = A B = [ 1, 2, None ]; B[2] = B A is equal to B, because it represents exactly the same graph. BTW. This question is not targeted to any specific language, but implementing hashCode() and equals() for the described Node object in Java would be a good practical example.

    Read the article

  • JS Framework that doesn't use CSS selectors?

    - by RoToRa
    A thing that I noticed about most JavaScript frameworks is that the most common way to find/access the DOM elements is to use CSS selectors. However this usually requires the framework to include a CSS selector parser, because they need to support selectors, that the browser natively doesn't, foremost the frameworks own proprietary extensions. I would think that these parsers are large and slow. Wouldn't it be more efficient to have something that doesn't require a parser, such a chained method calls? Some like: id("example").children().class("test").hasAttribute("href") instead of $("#example > .test[href]") Are there any frameworks around that do something like this? And how do they compare with jQuery and friends in regard to performance and size? EDIT: You can consider this a theoretical discussion topic. I don't plan to use anything other than jQuery in any practical projects in near furure. I was just wondering why there aren't any other, possibly better approaches.

    Read the article

  • How to set result of function as global variable.

    - by George
    I'm sure this is really simple and I'm drawing a giant blank, but how do you set the result of a function as a global variable? Example, I want to set the first "color" in array "colors" as global variable "color" (I know the example doesn't make much practical sense, but it's just to illustrate my question): var color = ""; function selectColor () { var colors = ["blue","red","green","yellow"]; var color = colors[0]; return color; } window.onload = function () { selectColor (); alert(color); }

    Read the article

  • Logical xor operator in c++?

    - by RAC
    Is there such a thing? First time I encountered a practical need for it, but I don't see one listed in stroustrup. I intend to write: // Detect when exactly one of A,B is equal to five. return (A==5) ^^ (B==5); But there is no ^^ operator. Can I use bitwise ^ here and get the right answer (regardless of machine representation of true and false)? I never mix & and &&, or | and ||, so I hesitate to do that with ^ and ^^. I'd be more comfortable writing my own "bool XOR(bool,bool)" function instead.

    Read the article

  • Representing parent-child relationships in SharePoint lists

    - by Chris Farmer
    I need to create some functionality in our SharePoint app that populates a list or lists with some simple hierarchical data. Each parent record will represent a "submission" and each child record will be a "submission item." There's a 1-to-n relationship between submissions and submission items. Is this practical to do in SharePoint? The only types of list relationships I've done so far are lookup columns, but this seems a bit different. Also, once such a list relationship is established, then what's the best way to create views on this kind of data. I'm almost convinced that it'd be easier just to write this stuff to an external database, but I'd like to give SharePoint a shot in order to take advantage of the automated search capabilities.

    Read the article

  • joining programming projects for free

    - by josephj1989
    Hi All Not sure if this is an appropriate question for the forum. I an experienced software developer with over 15 years in design and development of systems -mostly using Oracle software and ERP solutions using Oracle Apps. But due to some personal reasons I had to stay away from work for a period of 5 years.Now I am finding it hard to get back in. I have trained myself thoroughly in microsoft technologies C#,.NET,SQL SERVER,ASP .NET and also certified in these areas.Now I want to gain some practical experience with these technologies.I am very willing to take up some project work for free so that I can gain some experience and also add to my portfolio. Is any of you in a position to give me some voluntary work. I did try to find open source work but none is available. I can do the following very well. Analysis/Design Oracle Database PLSQL/SQL SQL Server TSQL C# .NET and .NET Platform ASP.NET I can also do Web Development HTML,CSS, JAVASCRIPT,JQUERY Unix Shell Scripting Java Swing Development Thanks

    Read the article

  • Secure way to backup MySQL databases?

    - by user203538
    What is the best/secure way to backup a mysql database on windows server (2008)? I have "MySQL Administrator" but that requires that you save passwords for backup project. I'm not keen on doing as anyone gaining access to the server would then have easy access to the database. Can you do anything similar to SQL Server like using Windows authentication. If not what is the most secure (and practical) way of backups. Lastly, what are the privileges needed to backup a database? I have created a single user just for this task. Please advise.

    Read the article

  • Django form to enter/save html to database

    - by Ian
    I'm in my first week of Django development and am working on an admin page that will let me write some quick html using TinyMCE and then save it to the database. I don't need to display this web page on the site or add it to urls.py, etc. The html snippet will be loaded from the database and used in a view function. I've read in "Practical Django Projects" how to integrate TinyMCE, so my question is more concerned with the best approach for the form itself. Specifically: 1. Is there a built-in form like flatpage that works well for this? I only need one field in the form for the html. 2. How do I save the form's text after it's entered? I created a model with a JSONField to save the html in, but I'm not clear on what to do next. Thanks.

    Read the article

  • Access to bytes array of a Bitmap

    - by Deulis
    1- In Windows CE, I have a Bitmap object in C#. 2- I have a C function in an extern dll that expects as parameters the pointer to a bytes array that represents an image in RGB565 format, width and height. This function will draw on this array of bytes. So I need to pass the byte array pointer of the Bitmap object, but I can find a practical way to get this pointer. One way is convert this Bitmap into a bytes array using a memory stream or something else, but it will create a new bytes array, so I will keep in memory both object, the Bitmap and the bytes array, but I don’t want it because the few available memory, that’s why I need to access to the bytes array of the bitmap object, not create a new bytes array. Anyone can help me?

    Read the article

  • How to create GUI as inner class with WindowBuilder

    - by Tim Kemp
    I would like to use WindowBuilder in Eclipse to construct Swing GUIs. The JPanels I need to build will be inner classes in a non-GUI wrapper, like so: public class MyWrapper extends MyBaseClass { ... class MyPanel extends JPanel { ... } } So my question is this: can I construct MyPanel using WindowBuilder? If so, how should I set it up? If anyone is interested, the wrapper is an abstract base class which the plug-ins I am developing for my app must extend; deployment concerns mean that it's not really practical to put the GUIs in a separate JAR either so I pretty much have to do it this way. My current workflow, which is awful, is to build the GUI in NetBeans and paste the entire generated class into Eclipse where I connect it up to the methods in my wrapper. I am very hopeful that WindowBuilder will let me work more reliably and efficiently if I can trick it into generating code in MyPanel, not MyWrapper. Thanks

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >