Search Results

Search found 349 results on 14 pages for 'gary barrett'.

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

  • Is there such a thing as a C# style extension method in C++ ?

    - by Gary Willoughby
    I'm currently learning C++ and i run into the simple problem of converting an int to a string. I've worked around it using: string IntToString(int Number) { stringstream Stream; Stream << Number; return Stream.str(); } but though it would be more elegant to use something like: int x = 5; string y = x.toString(); but how do i add the toString() method to a built in type? or am i missing something totally fundamental?

    Read the article

  • What theoretical and/or experimental programming-language features are there?

    - by Gary Rake
    I'm designing a programming language, purely for fun, and want to add as many experimental features as I can, just to make programming in it something completely different, and that not in a bad way like Brainf*ck or Malbolge. However, I seem to be quite bad at coming up with new things for it but I'm sure that there are tons of things out there that have been talked about but never really tried out. What experimental language features or concepts not implemented in mainstream languages are there at the moment? E.g: If I asked this in, let's say, 1960, an answer could be "Object-oriented programming". I'm sure that there are a lot of unimplemented ideas computer-scientists have (recently) come up with, at least I was told so.

    Read the article

  • Decoding and caching json every 60 minutes

    - by Gary
    Hi, How do I do this on a php webpage? I want to get and decode a json string and display the results as html on my page, however, I don't want it hotlinking back to the source. If I could write the decoded string to a txt file say weather.txt on the server and keep the html formatting and do it so that the page won't fetch the json script until 60 minutes has passed since the last time it was fetched regardless of how many times the page is opened during that 60 minute period and the weather.txt is viewed. All I can come up with is a simple script that hotlinks, everything else I have tried simply failed. $file = file_get_contents('http://sample.com/weather'); $out = (json_decode($file)); echo $out-mainText; Will appreciate any help with this.

    Read the article

  • C signal parent process from child

    - by Gary
    I'm trying to solve a problem I've got where a child process runs execvp() and needs to let the parent know if it returns. So, after the execvp() returns (because there's been an error), how can I tell the parent that this particular event has happened so it can handle it. There's one method of writing a string of text through the pipe I'm using and then reading that from the parent.. but it seems a bit sloppy. Is there a better way? Thanks!

    Read the article

  • How can I use a compound condition in a join in Linq?

    - by Gary McGill
    Let's say I have a Customer table which has a PrimaryContactId field and a SecondaryContactId field. Both of these are foreign keys that reference the Contact table. For any given customer, either one or two contacts may be stored. In other words, PrimaryContactId can never be NULL, but SecondaryContactId can be NULL. If I drop my Customer and Contact tables onto the "Linq to SQL Classes" design surface, the class builder will spot the two FK relationships from the Customer table to the Contact table, and so the generated Customer class will have a Contact field and a Contact1 field (which I can rename to PrimaryContact and SecondaryContact to avoid confusion). Now suppose that I want to get details of all the contacts for a given set of customers. If there was always exactly one contact then I could write something like: from customer in customers join contact in contacts on customer.PrimaryContactId equals contact.id select ... ...which would be translated into something like: SELECT ... FROM Customer INNER JOIN Contact ON Customer.FirstSalesPersonId = Contact.id But, because I want to join on both the contact fields, I want the SQL to look something like: SELECT ... FROM Customer INNER JOIN Contact ON Customer.FirstSalesPersonId = Contact.id OR Customer.SecondSalesPersonId = Contact.id How can I write a Linq expression to do that?

    Read the article

  • Execute another program in multi-threaded program

    - by Gary
    Hi, Just wondering how if it's possible to execute another program in a thread and send information to/get information from it. Essentially the same concept as with a child process and using pipes to communicate - however I don't want to use fork. I can't seem to find whether it's possible to do this, any help would be appreciated. Thanks

    Read the article

  • ASP.NET MVC / Linq-to-SQL classes: Can I get it to infer readable display names?

    - by Gary McGill
    If I have a table Orders with fields CustomerID, OrderID and OrderDate, then the "Linq-to-SQL classes" generated class will be called Orders, with members called CustomerID, OrderID and OrderDate. So far so good. However, if I then do Html.LabelFor(m => m.OrderDate) then the generated text will be "OrderDate" instead of "Order Date". I tried using Order_Date as the field name, but that didn't work. Is there any way to get it to infer a better display name? [I know that I can use data annotations to specify the display name explicitly, but I really don't want to do that for all my classes/members - I just want it to work by convention.]

    Read the article

  • Can you explicitly set a structure layout/alignment in C++ as you can in C#?

    - by Gary Willoughby
    In C# you have nice alignment attributes such as this: [StructLayout(LayoutKind.Explicit)] public struct Message { [FieldOffset(0)] public int a; [FieldOffset(4)] public short b; [FieldOffset(6)] public int c; [FieldOffset(22)] //Leave some empty space just for the heck of it. public DateTime dt; } Which gives you fine control on how you need your structure to be layed out in memory. Is there such a thing in standard C++?

    Read the article

  • How to modify posted form data within controller action before sending to view?

    - by Gary
    I want to render the same view after a successful action (rather than use RedirectToAction), but I need to modify the model data that is rendered to that view. The following is a contrived example that demonstrates two methods that that do not work: [AcceptVerbs("POST")] public ActionResult EditProduct(int id, [Bind(Include="UnitPrice, ProductName")]Product product) { NORTHWNDEntities entities = new NORTHWNDEntities(); if (ModelState.IsValid) { var dbProduct = entities.ProductSet.First(p => p.ProductID == id); dbProduct.ProductName = product.ProductName; dbProduct.UnitPrice = product.UnitPrice; entities.SaveChanges(); } /* Neither of these work */ product.ProductName = "This has no effect"; ViewData["ProductName"] = "This has no effect either"; return View(product); } Does anyone know what the correct method is for accomplishing this?

    Read the article

  • PHP - Open or copy a file when knowing only part of its name?

    - by Gary Willoughby
    I have a huge repository of files that are ordered by numbered folders. In each folder is a file which starts with a unique number then an unknown string of characters. Given the unique number how can i open or copy this file? for example: I have been given the number '7656875' and nothing more. I need to interact with a file called '\server\7656800\7656875 foobar 2x4'. how can i achieve this using PHP?

    Read the article

  • Cannot move ckeditor 4 selection to beginning

    - by Gary Hillerson
    I've been exploring numerous solutions in stackoverflow and elsewhere to try to get ckeditor 4 to scroll to the top after I've programmatically added a number of pages to it, using CKEditor's InsertHtml function. After adding my html, which looks fine, I want to position the cursor at the beginning. Here's one of a variety of things I've tried without success: function MoveCaretToStart(myEditor) { var range = new CKEDITOR.dom.range( editor.document ); range.selectNodeContents(editor.document.getBody()); range.moveToElementEditStart(range.root); // also tried range.collapse(true); range.select(); } ... MoveCaretToStart(CKEDITOR.instances['myEditor']); // which already has contents in it This doesn't throw any errors, but also doesn't move the cursor position (it remains at the end of the doc). I thought this one would be easy, but it sure hasn't been. Any help appreciated.

    Read the article

  • C# - How to implement multiple comparers for an IComparable<T> class?

    - by Gary Willoughby
    I have a class that implements IComparable. public class MyClass : IComparable<MyClass> { public int CompareTo(MyClass c) { return this.whatever.CompareTo(c.whatever); } etc.. } I then can call the sort method of a generic list of my class List<MyClass> c = new List<MyClass>(); //Add stuff, etc. c.Sort(); and have the list sorted according to my comparer. How do i specify further comparers to sort my collection different ways according to the other properties of MyClass in order to let users sort my collection in a number of different ways?

    Read the article

  • How am i overriding this C++ inherited member function without the virtual keyword being used?

    - by Gary Willoughby
    I have a small program to demonstrate simple inheritance. I am defining a Dog class which is derived from Mammal. Both classes share a simple member function called ToString(). How is Dog overriding the implementation in the Mammal class, when i'm not using the virtual keyword? (Do i even need to use the virtual keyword to override member functions?) mammal.h #ifndef MAMMAL_H_INCLUDED #define MAMMAL_H_INCLUDED #include <string> class Mammal { public: std::string ToString(); }; #endif // MAMMAL_H_INCLUDED mammal.cpp #include <string> #include "mammal.h" std::string Mammal::ToString() { return "I am a Mammal!"; } dog.h #ifndef DOG_H_INCLUDED #define DOG_H_INCLUDED #include <string> #include "mammal.h" class Dog : public Mammal { public: std::string ToString(); }; #endif // DOG_H_INCLUDED dog.cpp #include <string> #include "dog.h" std::string Dog::ToString() { return "I am a Dog!"; } main.cpp #include <iostream> #include "dog.h" using namespace std; int main() { Dog d; std::cout << d.ToString() << std::endl; return 0; } output I am a Dog! I'm using MingW on Windows via Code::Blocks.

    Read the article

  • ArchBeat Link-o-Rama Top 10 for November 4-10, 2012

    - by Bob Rhubart
    The Top 10 most popular items shared via the OTN ArchBeat Facebook Page for the week of November 4-10, 2012. OAM/OVD JVM Tuning | @FusionSecExpert Vinay from the Oracle Fusion Middleware Architecture Group (the very prolific A-Team) shares a process for analyzing and improving performance in Oracle Virtual Directory and Oracle Access Manager. Exploring Lambda Expressions for the Java Language and the JVM | Java Magazine In the latest //Java/Architect column in Java Magazine, Ben Evans, Martijn Verburg, and Trisha Gee explain how, "although Lambda expressions might seem unfamiliar to begin with, they're quite easy to pick up, and mastering them will be vital for writing applications that can take full advantage of modern multicore CPUs." SOA Galore: New Books for Technical Eyes Only Shake up up your technical skills with this trio of new technical books from community members covering SOA and BPM. Oracle Solaris 11.1 update focuses on database integration, cloud | Mark Fontecchio TechTarget editor Mark Fontecchio reports on the recent Oracle Solaris 11.1 release, with comments from IDC's Al Gillen. Solving Big Problems in Our 21st Century Information Society | Irving Wladawsky-Berger "I believe that the kind of extensive collaboration between the private sector, academia and government represented by the Internet revolution will be the way we will generally tackle big problems in the 21st century. Just as with the Internet, governments have a major role to play as the catalyst for many of the big projects that the private sector will then take forward and exploit. The need for high bandwidth, robust national broadband infrastructures is but one such example." — Irving Wladawsky-Berger ADF Mobile Custom Javasciprt – iFrame Injection | John Brunswick The ADF Mobile Framework provides a range of out of the box components to add within your AMX pages, according to John Brunswick. But what happens when "an out of the box component does not directly fulfill your development need? What options are available to extend your application interface?" John has an answer. Architects Matter: Making sense of the people who make sense of enterprise IT Why do architects matter? Oracle Enterprise Architect Eric Stephens suggests that you ask yourself this question the next time you take the elevator to the Oracle offices on the 45th floor of the Willis Tower in Chicago, Illinois (or any other skyscraper, for that matter). If you had to take the stairs to get to those offices, who would you blame? "You get the picture," he says. "Architecture is essential for any necessarily complex structure, be it a building or an enterprise." (Read the article...) Converting SSL certificate generated by a 3rd party to an Oracle Wallet | Paulo Albuquerque Oracle Fusion Middleware A-Team member Paulo Albuquerque shares "a workaround to get your private key, certificate and CA trusted certificates chain into Oracle Wallet." How Data and BPM are married to get the right information to the right people at the right time | Leon Smiers "Business Process Management…supports a large group of stakeholders within an organization, all with different needs," says Oracle ACE Leon Smiers. "End-to-end processes typically run across departments, stakeholders and applications, and can often have a long life-span. So how do organizations provide all stakeholders with the information they need?" Leon provides answers in this post. Updated Business Activity Monitoring (BAM) Class | Gary Barg Oracle SOA Team blogger Gary Barg has news for those interested in a skills upgrade. This updated Oracle University course "explains how to use Oracle BAM to monitor enterprise business activities across an enterprise in real time. You can measure your key performance indicators (KPIs), determine whether you are meeting service-level agreements (SLAs), and take corrective action in real time." Thought for the Day "For every complex problem, there is a solution that is simple, neat, and wrong." — H. L. Mencken (September 12, 1880 – January 29, 1956) Source: SoftwareQuotes.com

    Read the article

  • How to connect to a wireless network that has a two word name with a space?

    - by grinan
    Ok, I have searched for some time in earnest for an answer to this question. I have a Beagleboard which has Ubuntu 10.10 Minimal install for Arm running on it. With the default install, minimal tools, no GUI, I am unable to connect to my wireless network. The name of my network is "MYNAME NETWORK". Using a text editor to edit /etc/network/interfaces I can not seem to connect at all. As an experiment, I connected to a friends network, which has a one word name "dystek",and was able to connect with Zero issues, and update and install a full GUI for ubuntu Arm. The problem is that I don't want a full blown gui on the beagleboard, just a minimal install of ubuntu with CLI is all I need or want. Is there anyway to connect to my wireless network via editing the /etc/network/interfaces file. Surely there is... I just don't know how. Right now my interfaces file looks like this: auto lo iface lo inet loopback auto wlan0 iface wlan0 inet static address 192.168.1.200 netmask 255.255.255.0 gateway 192.168.1.1 wireless-essid BARRETT NETWORK wireless-key 46456xxxxxxxx Any help would be appreciated.

    Read the article

  • Software firewall used in network

    - by user45019
    Hi, I have a medium sized organization with users between 300-500 users. I am looking for software firewall for this type orgnization. Which type of software do you guys prefer, am not looking for hardware firewall...Can u suggest me some names of software firewall for this kind of organization. thanks, Gary

    Read the article

  • SQL SERVER – Check the Isolation Level with DBCC useroptions

    - by pinaldave
    In recent consultancy project coordinator asked me – “can you tell me what is the isolation level for this database?” I have worked with different isolation levels but have not ever queried database for the same. I quickly looked up bookonline and found out the DBCC command which can give me the same details. You can run the DBCC UserOptions command on any database to get few details about dateformat, datefirst as well isolation level. DBCC useroptions Set Option                  Value --------------------------- -------------- textsize                    2147483647 language                    us_english dateformat                  mdy datefirst                   7 lock_timeout                -1 quoted_identifier           SET arithabort                  SET ansi_null_dflt_on           SET ansi_warnings               SET ansi_padding                SET ansi_nulls                  SET concat_null_yields_null     SET isolation level             read committed I thought this was very handy script, which I have not used earlier. Thanks Gary for asking right question. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL System Table, SQL Tips and Tricks, T SQL, Technology Tagged: Transaction Isolation

    Read the article

  • Great Surprise &ndash; MSDN Ultimate

    - by MarkPearl
    So, I attended the Microsoft Community Evening. The attendance was better than I was expecting for December and we had our first Programming Languages Meeting where Gary did a great presentation on an intro to Ruby. The best surprize of the evening happened when I was about to leave, Robert MacLean asked me how we did our MS licensing – the fact being that we were about to reach the end of our empower license with Microsoft and that I had no idea how we were going to afford upgrading it early next year. Well, out comes a Microsoft Visual Studio Ultimate with MSDN 12 month subscription. An absolute awesome gift – thanks Robert! Best gift ever!

    Read the article

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