Search Results

Search found 80 results on 4 pages for 'ness'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Is goto to improve DRY-ness OK?

    - by Marco Scannadinari
    My code has many checks to detect errors in various cases (many conditions would result in the same error), inside a function returning an error struct. Instead of looking like this: err_struct myfunc(...) { err_struct error = { .error = false }; ... if(something) { error.error = true; error.description = "invalid input"; return error; } ... case 1024: error.error = true; error.description = "invalid input"; // same error, but different detection scenario return error; break; // don't comment on this break please (EDIT: pun unintended) ... Is use of goto in the following context considered better than the previous example? err_struct myfunc(...) { err_struct error = { .error = false }; ... if(something) goto invalid_input; ... case 1024: goto invalid_input; break; return error; invalid_input: error.error = true; error.description = "invalid input"; return error;

    Read the article

  • Detecting const-ness of nested type

    - by Channel72
    Normally, if I need to detect whether a type is const I just use boost::is_const. However, I ran into trouble when trying to detect the const-ness of a nested type. Consider the following traits template, which is specialized for const types: template <class T> struct traits { typedef T& reference; }; template <class T> struct traits<const T> { typedef T const& reference; }; The problem is that boost::is_const doesn't seem to detect that traits<const T>::reference is a const type. For example: std::cout << std::boolalpha; std::cout << boost::is_const<traits<int>::reference>::value << " "; std::cout << boost::is_const<traits<const int>::reference>::value << std::endl; This outputs: false false Why doesn't it output false true?

    Read the article

  • IAR Embedded Workbench - setting endian-ness of variable

    - by Seidleroni
    I'm using IAR Embedded Workbench for ARM (ARM7TDMI-S) and the majority of my work is done using little-endian format. However, I saw in the manual that I can do something like : __big_endian int i, j; to declare those two variables as big endian (while the rest of the app as little endian). This seems like a fantastic feature, but when I try to compile, I always get the errror: Error[Pa002]: the type attribute "__big_endian" is not allowed on this declaration. The big endian line above is copied directly from the manual, but it does not work. This is a great feature of the compiler and would make life a big easier. Any ideas how to get it working? I have my language conformance set to 'Allow IAR extensions' on the C/C++ Compiler options tab on the IDE options.

    Read the article

  • Does this have anything to do with endian-ness?

    - by eSKay
    This piece of code: #include<stdio.h> void hello() { printf("hello\n"); } void bye() { printf("bye\n"); } int main() { printf("%p\n", hello); printf("%p\n", bye); return 0; } output on my machine: 0x80483f4 0x8048408 [second address is bigger in value] on Codepad 0x8048541 0x8048511 [second address is smaller in value] Does this have anything to do with endian-ness of the machines? If not, Why the difference in the ordering of the addresses? Also, Why the difference in the difference? 0x8048541 - 0x8048511 = 0x30 0x8048408 - 0x80483f4 = 0x14 Btw, I just checked. This code (taken from here) says that both the machines are Little-Endian #include<stdio.h> int main() { int num = 1; if(*(char *)&num == 1) printf("Little-Endian\n"); else printf("Big-Endian\n"); return 0; }

    Read the article

  • Can someone explain this "endian-ness" function for me?

    - by Mike
    Write a program to determine whether a computer is big-endian or little-endian. bool endianness() { int i = 1; char *ptr; ptr = (char*) &i; return (*ptr); } So I have the above function. I don't really get it. ptr = (char*) &i, which I think means a pointer to a character at address of where i is sitting, so if an int is 4 bytes, say ABCD, are we talking about A or D when you call char* on that? and why? Would some one please explain this in more detail? Thanks. So specifically, ptr = (char*) &i; when you cast it to char*, what part of &i do I get?

    Read the article

  • Looking for best approach to create new projects for enviroment specifics files

    - by Ness
    ClearCase Question... Overview of requirements: There are 3 diff environments (DEV, TEST and PROD) which have a folder called 'common' that users across all envs. There are multiple servers in those 3 envs and we want to store their server environment specific configuration files in Clearcase. The executables files are different for each environment. Thus there will not be cross delivery require between dev/test/prod. Any thoughts on how we can approach this? Is keeping it simplest is the best approach here? One component to one vobs as (DEV_Serv1, TEST_Serv1, PROD_Serv1, Dev_Serv2, Test_Serv2 and etc)? OR Have multiple components VOB? One other thing is developers here like to use snapshots views.

    Read the article

  • Is there a web application equivalent of Hypercard?

    - by Gabriel Cuvillier
    Recently, I found an interesting Wiki/CMS/Database hybrid called Wagn, where the most important unit of information is the 'Card'. That terminology immediately made me think of Hypercard. As expected, there is some "Hypercard-ness" in that application. Do you know of other web applications/frameworks with that "Hypercard-ness" thing, or if its successor still must be invented? Note: I insist on web applications because I already know the desktop ones.

    Read the article

  • SSIS DTSX File Repair Tool

    - by Eric Ness
    I'm working with an SSIS 2005 file that crashes Visual Studio 2005 on my workstation. This happens when I open the data flow diagram and Visual Studio attempts to validate the package. I can open it successfully on another computer though. The package itself is fairly simple and only has two control flow tasks and maybe ten tasks in the data flow. I'm wondering if there is a tool that goes through the XML in the dtsx file and repairs any issues or if this is even necessary. The dtsx file is about 171 kB and it seems like there's a lot in it considering what a simple package it is.

    Read the article

  • Multiple aggregate functions in one SQL query from the same table using different conditions

    - by Eric Ness
    I'm working on creating a SQL query that will pull records from a table based on the value of two aggregate functions. These aggregate functions are pulling data from the same table, but with different filter conditions. The problem that I run into is that the results of the SUMs are much larger than if I only include one SUM function. I know that I can create this query using temp tables, but I'm just wondering if there is an elegant solution that requires only a single query. I've created a simplified version to demonstrate the issue. Here are the table structures: EMPLOYEE TABLE EMPID 1 2 3 ABSENCE TABLE EMPID DATE HOURS_ABSENT 1 6/1/2009 3 1 9/1/2009 1 2 3/1/2010 2 And here is the query: SELECT E.EMPID ,SUM(ATOTAL.HOURS_ABSENT) AS ABSENT_TOTAL ,SUM(AYEAR.HOURS_ABSENT) AS ABSENT_YEAR FROM EMPLOYEE E INNER JOIN ABSENCE ATOTAL ON ATOTAL.EMPID = E.EMPID INNER JOIN ABSENCE AYEAR ON AYEAR.EMPID = E.EMPID WHERE AYEAR.DATE > '1/1/2010' GROUP BY E.EMPID HAVING SUM(ATOTAL.HOURS_ABSENT) > 10 OR SUM(AYEAR.HOURS_ABSENT) > 3 Any insight would be greatly appreciated.

    Read the article

  • Customizing Mail Message in SSIS Event Handler

    - by Eric Ness
    I want to add an email notification to an SSIS 2005 package event handler. I've added a Send Mail task to the event handler. I'd like to customize the email body to include things like the error description. I've tried including @[System::ErrorDescription] in the MessageSource field, but the mail message doesn't include the value of ErrorDescription only the name of the variable.

    Read the article

  • execution of instructions in a child process

    - by ness kh
    I want to exit from a child process when the execution of os.system(comm) will be executed. My code is: pid = os.fork() if pid == 0: #instruction else: comm = "python file.py" os.system(comm) os.exit(error) Now, my file file.py contains a loop, and I can get out from it only if a condition is satisfied. But, even when the condition is not satisfied, the program exits from the loop and displays the message error. Also it doesn't execute the rest of instructions in file.py. file.py is : while 1: if(condition): break # rest of instructions

    Read the article

  • What free Remote Desktop (server) solutions are there?

    - by Tao
    I know Ubuntu comes with a "Remote Desktop" option that appears to be a straightforward VNC server, and I'm trying to understand the alternatives. Here are the possibilities I've heard about so far: VNC VNC + SSH Tunnelling NX Server, free edition FreeNX NeatX X2Go X11 Forwarding over SSH xrdp I'm coming at this from a Windows user's perspective: To the best of my experience, RDP (aka Terminal Services) is a reasonably secure (barring mitm/server spoofing), efficient desktop sharing protocol with well-supported clients, that can be exposed to the internet when necessary without major fears of intrusion. To the best of my knowledge straight VNC is none of those things, which is where I get confused - why wouldn't a better desktop sharing technology be developed or used in the open-source world? I know VNC can be wrapped with SSH, but that seems beyond the reach of a casual user. X11 forwarding over SSH may be more or less efficient, I have no idea, but is definitely even more complicated, and doesn't (as far as I know) give you access to already-running stuff (no desktop sharing as such, just remote application running). So, I'd like any feedback/preferences amongst these or any other "Free" desktop sharing options, using these criteria and/or any others: Security (esp. for access across internet) Efficiency (bandwidth usage, responsiveness, etc) Free-ness, as in Speech (not sure where RDP or FreeNX lie for this) Free-ness, as in Beer (are there any commercial solutions with usable dependable free offerings?) Ease of use (server and client side) Cross-OS Client availability Cross-OS Server availability Support for independent sessions and shared (and/or "Console") sessions Ongoing support/maintenance/development Thanks!

    Read the article

  • links for 2010-06-16

    - by Bob Rhubart
    Automating Enterprise Reporting with SOA and Oracle Business Intelligence Publisher In the latest article in the Enterprise Solution Cookbook series, authors John Chung and Harish Gaur take you step-by-step through the development of an automated reporting platform using Oracle's SOA Suite, WebCenter, and Business Intelligence Publisher. (tags: soa enterprise2.0 architect entarch bpm oracle otn) @ORACLENERD: Job: Infrastructure Technical Architect Oracle ACE Chet "ORACLENERD" Justice shares the 411 on a great new gig for the right architect.  (tags: jobs employment infrastructure architect oracleace) Andrew Ness: Building a training environment for RAC, ASM and Dataguard on OEL 5.4 "In all the environments I've worked in where Oracle DBAs are involved, " says Ness, "they would have chewed my arm off to have this level of control over where their data lives." (tags: oracle grid database dba) Chris Quenelle: Virtualization terms UNIXy Goodness blogger Chris Quenelle dives into Wikipedia to compile this short but valuable glossary of virtualization terms.  (tags: solaris hypervisor virtualization) William Vambenepe: CMDB in the Cloud: not your father's CMDB "Most [customers] will be dealing with a mix of old-style and Cloud applications and they’ll be looking for a unified management approach. This helps CMDB incumbents. If you doubt the power to continuity, take a minute to realize that the entire value proposition of hypervisor-style virtualization is centered around it." -- William Vambenepe (tags: oracle otn cloud virtualization) Merv Adrian: Oracle Exadata: a Data Management Tipping Point "In this second version of its newest platform, Oracle not only provides the latest technology in each part of the data-management architecture, but also integrates them under the full control of one vendor, with a unified approach to leveraging the full stack." -- Merv Adrian (tags: oracle exadata database)

    Read the article

  • Suspected brute force attack

    - by HarveySaayman
    Recently I acquired a dedicated server from a local ISP to play around with. As the tags suggest, its a windows server 2008 R2 machine. I've only had it for a few days, and no real traffic is going to it yet. I haven't even deployed a "real" website to it yet. Just a silly page so that I could check IIS, my host headers, DNS records, etc are all configured correctly. While playing around, I noticed a ton of Audit Failure entries in the event viewers security logs. It seems something is trying to access the administrator account, and failing. It smells like a brute force attack to me. My ISP gave me the account details of the administrator account and I used those to RDP into the box, which I've heard is not the securest of situations. I created myself another account and added myself to the administrator group, so im using that account to gain acceess to the machine now. In response to all of this i used http://strongpasswordgenerator.com/ to generate me some 20 character length strong passwords and changed all of my account passwords, even the SQL sa user. I also enabled the auto ban feature of FileZillaServer (my FTP server) My questions: 1) how can i detect this kind of thing better? 2) how can i protect my server from unauthorized access better? PS: I'm a software dev, not a sysadmin so please mind my server security idiot-ness-ness

    Read the article

  • copy windows registry and/or other locked files

    - by karolrvn
    Hi. While improving my (personal) backup system, I noticed, that I cannot copy certain locked files, like the windows registry files. Is there a way to copy such things? Or a specific solution for the registry (I know of the regedit-File-Export ,,solution'' but this is to text format and seems slow). AFAIK, On Linux the locking system is advisory and on Windows it is mandatory. Can I somehow bypass the mandatory-ness for backup purposes etc.? TIA.

    Read the article

  • Possible to (re)sync 2 drives into RAID 1 Array?

    - by MsLis
    Have an XP machine with 2 drives configured in a RAID 1 array. Trying to fix a boot problem, I took the drives out to run chkdsk on them, and I accidentally got them out-of-sync (event logs, etc). Is there any way to duplicate the contents of one drive onto the other to restore their RAID-ness, or have I really messed myself up?

    Read the article

  • Is there an imperative language with a Haskell-like type system?

    - by Graham Kaemmer
    I've tried to learn Haskell a few times over the last few years, and, maybe because I know mainly scripting languages, the functional-ness of it has always bothered me (monads seem like a huge mess for doing lots of I/O). However, I think it's type system is perfect. Reading through a guide to Haskell's types and typeclasses (like this), I don't really see a reason why they would require a functional language, and furthermore, they seem like they would be perfect for an industry-grade object-oriented language (like Java). This all begs the question: has anyone ever taken Haskell's typing system and made a imperative, OOP language with it? If so, I want to use it.

    Read the article

  • Where do I put all these function-like #defines, in C?

    - by Tristan
    I'm working with an embedded system, and I'm ending up with a ton of HW-interfacing #define functions. I want to put all of these into a separate file (for OOP-ness), but I don't know the best way to #include that. Do I just put them all into a .c file, then include that? Seems silly to put these in a .h file.

    Read the article

  • New XEN Server, Intel i7, Errors were encountered while processing: xen-linux-system-amd64

    - by Sheldon
    I have just got a new machine to run XEN VM's on, it has an Intel i7 processor: - Intel Haswell Core i7-4790 3.6GHz 8MB LGA1150 I have setup the host with the current 6.2.0 I have set up a new Debian 7 64bit VM and any package I try and run fails with the following errors: Errors were encountered while processing: xen-utils-common xen-utils-4.1 xen-system-amd64 xen-linux-system-3.2.0-4-amd64 xen-linux-system-amd64 E: Sub-process /usr/bin/dpkg returned an error code (1) Excuse my noob-ness but should it even be running an AMD package ? Any ideas on how to fix this ? Thanks

    Read the article

  • black and white pages not recognized by printer

    - by user46627
    I have a document which has color on about 25% of its pages. When I print it in the copy shop, the printer's technically supposed to recognize the b/w pages. However, all pages are registered as colored, i.e. the pages are color-enabled pages which happen to not have any colors on them (but I'm paying for the color-enabled-ness). Regrettably, the staff have to charge me for color because the printer's leased and they have to pay for color pages, so showing them that there's no color doesn't help me. What are possible sources for b/w pages showing up like that?

    Read the article

  • JCP Party at JavOne and other JCP events

    - by heathervc
    Don't miss all of these great opportunities to get involved with the JCP program at JavaOne next week. The details are listed below and listed on the JCP at JavaOne page  as well. Join us for the annual JCP community party on Tuesday evening, 2 October, to be held at the Infusion Lounge. Drop by starting at 6:30 pm to meet fellow Java Community members, JCP members and EC representatives, enjoy appetizers/beer, pick up a door prize, enter a raffle and congratulate the winners and nominees (newly updated nominee information available now) of the 10th annual awards in three categories: JCP Member of the Year, Outstanding Spec Lead, and Most Significant JSR. The day by day breakdown is as follows... Sunday 9/30/12JCP and OpenJDK: Using the JUGs' "Adopt" Programs in Your Group Session ID: UGF10434Location: Moscone West - 2002Date and Time: 9/30/12, 12:15 PM - 1:00 PMJCP Public Executive Committee Face-to-Face Meeting Open to Executive Committee Members and the Java Developer CommunityLocation: Clift Hotel, 495 Geary Street, San Francisco - Rita Room (downstairs from Lobby)Date and Time: 9/30/12, 2:00 PM - 3:30 PM; Agenda includes open Q&A, JCP.Next, EC Elections - no JavaOne pass required! Monday 10/1/12JCP in the OTN Java DEMOgrounds Location: Hilton Hotel Grand BallroomDate and Time: 10/1/12, 4:00 PM - 4:30 PMJCP.Next: Reinvigorating Java Standards Session ID: BOF6272Location: Hilton San Francisco - Plaza A/BDate and Time: 10/1/12, 4:30 PM - 5:15 PM101 Ways to Improve Java: Why Developer Participation Matters Session ID: BOF6283Location: Hilton San Francisco - Continental Ballroom 4Date and Time: 10/1/12, 5:30 PM - 6:15 PM Tuesday 10/2/12JCP in the OTN Java DEMOgrounds Location: Hilton Hotel Grand BallroomDate and Time: 10/2/12, 12:00 PM - 1:30 PMSpec Leads Meeting with the JCP PMO Location: Hilton San Francisco - Van Ness RoomDate and Time: 10/2/12, 3:00 PM - 4:00 PMCome learn how you benefit from the changesMeet the JCP Executive Committee Candidates Session ID: BOF6307Location: Hilton San Francisco - Golden Gate 3/4/5Date and Time: 10/2/12, 4:30 PM - 5:15 PMThe 10th Annual JCP Awards Presentation and Party Enjoy an evening with this year's JCP Award nominees and watch as we announce the winners -  no JavaOne pass required! Location: Infusion Lounge - 124 Ellis Street, San FranciscoDate and Time: 10/2/12, 6:30 PM - 9:00 PM Hope to see you there!

    Read the article

  • How should I start with Lisp?

    - by Gary Rowe
    I've been programming for years now, working my way through various iterations of Blub (BASIC, Assembler, C, C++, Visual Basic, Java, Ruby in no particular order of "Blub-ness") and I'd like to learn Lisp. However, I have a lot of intertia what with limited time (family, full time job etc) and a comfortable happiness with my current Blub (Java). So my question is this, given that I'm someone who would really like to learn Lisp, what would be the initial steps to get a good result that demonstrates the superiority of Lisp in web development? Maybe I'm missing the point, but that's how I would initially see the application of my Lisp knowledge. I'm thinking "use dialect A, use IDE B, follow instructions on page C, question your sanity after monads using counsellor D". I'd just like to know what people here consider to be an optimal set of values for A, B, C and perhaps D. Also some discussion on the relative merit of learning such a powerful language as opposed to, say, becoming a Rails expert. Just to add some more detail, I'll be developing on MacOS (or a Linux VM) - no Windows based approaches will be necessary, thanks. Notes for those just browsing by I'm going to keep this question open for a while so that I can offer feedback on the suggestions after I've been able to explore them. If you happen to be browsing by and feel you have something to add, please do. I would really welcome your feedback. Interesting links Assuming you're coming at Lisp from a Java background, this set of links will get you started quickly. Using Intellij's La Clojure plugin to integrate Lisp (videocast) Lisp for the Web Online version of Practical Common Lisp (c/o Frank Shearar) Land of Lisp a (+ (+ very quirky) game based) way in but makes it all so straightforward

    Read the article

  • How should I start with Lisp?

    - by Gary Rowe
    I've been programming for years now, working my way through various iterations of Blub (BASIC, Assembler, C, C++, Visual Basic, Java, Ruby in no particular order of "Blub-ness") and I'd like to learn Lisp. However, I have a lot of intertia what with limited time (family, full time job etc) and a comfortable happiness with my current Blub (Java). So my question is this, given that I'm someone who would really like to learn Lisp, what would be the initial steps to get a good result that demonstrates the superiority of Lisp in web development? Maybe I'm missing the point, but that's how I would initially see the application of my Lisp knowledge. I'm thinking "use dialect A, use IDE B, follow instructions on page C, question your sanity after monads using counsellor D". I'd just like to know what people here consider to be an optimal set of values for A, B, C and perhaps D. Also some discussion on the relative merit of learning such a powerful language as opposed to, say, becoming a Rails expert. Just to add some more detail, I'll be developing on MacOS (or a Linux VM) - no Windows based approaches will be necessary, thanks. Notes for those just browsing by I'm going to keep this question open for a while so that I can offer feedback on the suggestions after I've been able to explore them. If you happen to be browsing by and feel you have something to add, please do. I would really welcome your feedback. Interesting links Assuming you're coming at Lisp from a Java background, this set of links will get you started quickly. Using Intellij's La Clojure plugin to integrate Lisp (videocast) Lisp for the Web Online version of Practical Common Lisp (c/o Frank Shearar) Land of Lisp a (+ (+ very quirky) game based) way in but makes it all so straightforward

    Read the article

1 2 3 4  | Next Page >