Search Results

Search found 66916 results on 2677 pages for 'real time strategy'.

Page 22/2677 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • C++: How would I get unix time?

    - by John D.
    I need a function or way to get the UNIX epoch in seconds, much like how I can in PHP using the time function. I can't find any method except the time() in ctime which seems to only output a formatted date, or the clock() function which has seconds but seems to always be a multiple of 1 million, nothing with any resolution. I wish to measure execution time in a program, I just wanted to calculate the diff between start and end; how would a C++ programmer do this? EDIT: time() and difftime only allow resolution by seconds, not ms or anything too btw.

    Read the article

  • Ruby - Manipulating Time/DateTime by the Hour/Day?

    - by viatropos
    Where can I find some examples on how to manipulate the time objects by days/hours/etc? I would like to do this: time.now_by_hour #=> "Tue Jun 15 23 MST 2010" time.now_by_day #=> ""Tue Jun 15 MST 2010" time.now_by_hour - 4.weeks - 3.days #=> "Sat May 15 MST 2010" What is the recommended order of operations? The reason for this is I would like to run through lists of times and sort them by date to the hour, not to the minute and second.

    Read the article

  • how can I select data from MySQL based on date (unix time record)

    - by bn
    I have a record of data with unix time date in it i want to select the row based on the date/month/year only (not with time) currently Im using something like this select * from tablename where date > '$today' and date < '$tomorow' LIMIT 1; how ever this is not that accurate if the $today and $tomorrow have different time (but same date) is there any better way to do this?

    Read the article

  • how do i save time to a file?

    - by blood
    hi, i have a program that saves data to file and i want to put a time stamp of the current date/time on that log but when i try to write the time to the file it will not show up. #include <iostream> #include <windows.h> #include <fstream> #include <string> #include <sstream> #include <direct.h> #include <stdio.h> #include <time.h> using namespace std; string header_str = ("NULL"); int main() { for(;;) { stringstream header(stringstream::in | stringstream::out); header << "datasdasdasd_"; time_t rawtime; time ( &rawtime ); header << ctime (&rawtime); header_str = header.str(); fstream filestr; filestr.open ("C:\\test.txt", fstream::in | fstream::out | fstream::app | ios_base::binary | ios_base::out); for(;;) { filestr << (header_str); } filestr.close(); } return 0; } anyone know how to fix this?

    Read the article

  • Measuring the time to create and destroy a simple object

    - by portoalet
    From Effective Java 2nd Edition Item 7: Avoid Finalizers "Oh, and one more thing: there is a severe performance penalty for using finalizers. On my machine, the time to create and destroy a simple object is about 5.6 ns. Adding a finalizer increases the time to 2,400 ns. In other words, it is about 430 times slower to create and destroy objects with finalizers." How can one measure the time to create and destroy an object? Do you just do: long start = System.nanoTime(); SimpleObject simpleObj = new SimpleObject(); simpleObj.finalize(); long end = System.nanoTime(); long time = end - start;

    Read the article

  • Calculate the SUM of the Column which has Time DataType:

    - by thevan
    I want to calculate the Sum of the Field which has Time DataType. My Table is Below: TableA: TotalTime ------------- 12:18:00 12:18:00 Here I want to sum the two time fields. I tried the below Query SELECT CAST( DATEADD(MS, SUM(DATEDIFF(MS, '00:00:00.000', CONVERT(TIME, TotalTime))), '00:00:00.000' ) AS TOTALTIME) FROM [TableA] But it gives the Output as TOTALTIME ----------------- 00:36:00.0000000 But My Desired Output would be like below: TOTALTIME ----------------- 24:36:00 How to get this Output?

    Read the article

  • Apache shuts down from time to time

    - by Dugi
    I'm having trouble with my VPS as it keeps shutting apache down at least twice a day. The server is running on CentOS 6 with the latest apache. By shutting down I mean I have to go into SSH and type in this command in order to bring it up again: /sbin/service httpd start I'm not very good with servers and my host doesn't seem to have a nice customer service. Any help would be appreciated as these unexpected downtimes really know to kill one's mood.

    Read the article

  • Add 30 seconds to the time with PHP

    - by Sam
    Hey all, just wondering how I can add 30 seconds on to this? $time = date("m/d/Y h:i:s a", time()); Thankyou, again. I wasn't sure how to do it because it is showing lots of different units of time, when I only want to add 30 seconds.

    Read the article

  • adding php time

    - by redcoder
    i have a value store in variables as 11:30. I need to add a minutes to this variable..Example, adding 15 minutes to make it 11:45 can i do that ? i tried to use time() but it will give current time... but i want to add time to the specified variable

    Read the article

  • Html Agility Pack for Reading “Real World” HTML

    - by WeigeltRo
    In an ideal world, all data you need from the web would be available via well-designed services. In the real world you sometimes have to scrape the data off a web page. Ugly, dirty – but if you really want that data, you have no choice. Just don’t write (yet another) HTML parser. I stumbled across the Html Agility Pack (HAP) a long time ago, but just now had the need for a robust way to read HTML. A quote from the website: This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT (you actually don't HAVE to understand XPATH nor XSLT to use it, don't worry...). It is a .NET code library that allows you to parse "out of the web" HTML files. The parser is very tolerant with "real world" malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams). Using the HAP was a simple matter of getting the Nuget package, taking a look at the example and dusting off some of my XPath knowledge from years ago. The documentation on the Codeplex site is non-existing, but if you’ve queried a DOM or used XPath or XSLT before you shouldn’t have problems finding your way around using Intellisense (ReSharper tip: Press Ctrl+Shift+F1 on class members for reading the full doc comments).

    Read the article

  • Understanding node.js: some real-life examples

    - by steweb
    Hi all! As a curious web developer I've been hearing about node.js for several months and (just) now I'd like to learn it and, most of all, understand its "engine". So, as a real newbie about node.js I'm going to follow some tutorials. And as every new technology over the internet, find a very good and exhaustive tutorial is like looking for a needle in a haystack :) My "big question" can be split into this 3 sub-questions: I know node.js can be very useful to build web-chats. But, apart from this example (and from helloworld one :D), how could I use it? Which are the real-life examples that let me think i.e. "oh, it's fantastic, I could really integrate it for my daily projects"? I also know it implements some JS specifications. It is required to deeply know other programming languages apart from JS? Where can I find a good reference (basically, I don't want to search "node.js reference" on google hoping to be lucky enough to get some good websites)? Thanks everyone!

    Read the article

  • Handling Types for Real and Complex Matrices in a BLAS Wrapper

    - by mga
    I come from a C background and I'm now learning OOP with C++. As an exercise (so please don't just say "this already exists"), I want to implement a wrapper for BLAS that will let the user write matrix algebra in an intuitive way (e.g. similar to MATLAB) e.g.: A = B*C*D.Inverse() + E.Transpose(); My problem is how to go about dealing with real (R) and complex (C) matrices, because of C++'s "curse" of letting you do the same thing in N different ways. I do have a clear idea of what it should look like to the user: s/he should be able to define the two separately, but operations would return a type depending on the types of the operands (R*R = R, C*C = C, R*C = C*R = C). Additionally R can be cast into C and vice versa (just by setting the imaginary parts to 0). I have considered the following options: As a real number is a special case of a complex number, inherit CMatrix from RMatrix. I quickly dismissed this as the two would have to return different types for the same getter function. Inherit RMatrix and CMatrix from Matrix. However, I can't really think of any common code that would go into Matrix (because of the different return types). Templates. Declare Matrix<T> and declare the getter function as T Get(int i, int j), and operator functions as Matrix *(Matrix RHS). Then specialize Matrix<double> and Matrix<complex>, and overload the functions. Then I couldn't really see what I would gain with templates, so why not just define RMatrix and CMatrix separately from each other, and then overload functions as necessary? Although this last option makes sense to me, there's an annoying voice inside my head saying this is not elegant, because the two are clearly related. Perhaps I'm missing an appropriate design pattern? So I guess what I'm looking for is either absolution for doing this, or advice on how to do better.

    Read the article

  • Book Review: Oracle ADF Real World Developer’s Guide

    - by Frank Nimphius
    Recently PACKT Publishing published "Oracle ADF Real World Developer’s Guide" by Jobinesh Purushothaman, a product manager in our team. Though already the sixth book dedicated to Oracle ADF, it has a lot of great information in it that none of the previous books covered, making it a safe buy even for those who own the other books published by Oracle Press (McGrwHill) and PACKT Publishing. More than the half of the "Oracle ADF Real World Developer’s Guide" book is dedicated to Oracle ADF Business Components in a depth and clarity that allows you to feel the expertise that Jobinesh gained in this area. If you enjoy Jobinesh blog (http://jobinesh.blogspot.co.uk/) about Oracle ADF, then, no matter what expert you are in Oracle ADF, this book makes you happy as it provides you with detail information you always wished to have. If you are new to Oracle ADF, then this book alone doesn't get you flying, but, if you have some Java background, accelerates your learning big, big, big times. Chapter 1 is an introduction to Oracle ADF and not only explains the layers but also how it compares to plain Java EE solutions (page 13). If you are new to Oracle JDeveloper and ADF, then at the end of this chapter you know how to start JDeveloper and begin your ADF development Chapter 2 starts with what Jobinesh really is good at: ADF Business Components. In this chapter you learn about the architecture ingredients of ADF Business Components: View Objects, View Links, Associations, Entities, Row Sets, Query Collections and Application Modules. This chapter also provides a introduction to ADFBC SDO services, as well as sequence diagrams for what happens when you execute queries or commit updates. Chapter 3 is dedicated to entity objects and  is one of many chapters in this book you will enjoy and never want to miss. Jobinesh explains the artifacts that make up an entity object, how to work with entities and resource bundles, and many advanced topics, including inheritance, change history tracking, custom properties, validation and cursor handling.  Chapter 4 - you guessed it - is all about View objects. Comparable to entities, you learn about the XM files and classes that make a view object, as well as how to define and work with queries. List-of-values, inheritance, polymorphism, bind variables and data filtering are interesting - and important topics that follow. Again the chapter provides helpful sequence diagrams for you to understand what happens internally within a view object. Chapter 5 focuses on advanced view object and entity object topics, like lifecycle callback methods and when you want to override them. This chapter is a good digest of Jobinesh's blog entries (which most ADF developers have in their bookmark list). Really worth reading ! Chapter 6 then is bout Application Modules. Beside of what application modules are, this chapter covers important topics like properties, passivation, activation, application module pooling, how and where to write custom logic. In addition you learn about the AM lifecycle and request sequence. Chapter 7 is about the ADF binding layer. If you are new to Oracle ADF and got lost in the more advanced ADF Business Components chapters, then this chapter is where you get back into the game. In very easy terms, Jobinesh explains what the ADF binding is, how it fits into the JSF request lifecycle and what are the metadata file involved. Chapter 8 then goes into building data bound web user interfaces. In this chapter you get the basics of JavaServer Faces (e.g. managed beans) and learn about the interaction between the JSF UI and the ADF binding layer. Later this chapter provides advanced solutions for working with tree components and list of values. Chapter 9 introduces bounded task flows and ADF controller. This is a chapter you want to read if you are new to ADF of have started. Experts don't find anything new here, which doesn't mean that it is not worth reading it (I for example, enjoyed the controller talk very much) Chapter 10 is an advanced coverage of bounded task flow and talks about contextual events  Chapter 11 is another highlight and explains error handling, trains, transactions and more. I can only recommend you read this chapter. I am aware of many documents that cover exception handling in Oracle ADF (and my Oracle Magazine article for January/February 2013 does the same), but none that covers it in such a great depth. Chapter 12 covers ADF best practices, which is a great round-up of all the tips provided in this book (without Jobinesh to repeat himself). Its all cool stuff that helps you with your ADF projects. In summary, "Oracle ADF Real World Developer’s Guide" by Jobinesh Purushothaman is a great book and addition for all Oracle ADF developers and those who want to become one. Frank

    Read the article

  • How to differentiate between time to live and time to idle in ehcache

    - by Jacques René Mesrine
    The docs on ehache says: timeToIdleSeconds: Sets the time to idle for an element before it expires. i.e. The maximum amount of time between accesses before an element expires timeToLiveSeconds: Sets the time to live for an element before it expires. i.e. The maximum time between creation time and when an element expires. I understand timeToIdleSeconds But does it means that after the creation & first access of a cache item, the timeToLiveSeconds is not applicable anymore ?

    Read the article

  • what's the difference between php time and sql time

    - by Ying
    Can anyone tell me why the timestamp generated by the php time() function is so different from SQL datetime? If i do a date('Y-m-d', time()); in php, it gives me the time now, as it should. If I just take the time() portion and do: $now = time(); //then execute this statement 'SELECT * FROM `reservation` WHERE created_at < $now' I get nothing. But hey, so if the value of $now was 1273959833 and I queried 'SELECT * FROM `reservation` WHERE created_at < 127395983300000000' Then I see the records that ive created. I think one is tracked in microseconds vs the other is in seconds, but I cant find any documentation on this! What would be the right conversion between these two?? any help appreciated.

    Read the article

  • How to convert server time to local time?

    - by Lost_in_code
    My php file is hosted in some other part of the world. The date() and time() functions returns the date/time on the server. How do I convert that date so that it's the same as my local date/time? The date on the server is 10 hours behind my local time. I could just hard code and substract this from the server time. But what is the proper way of going about this so that no value has to be hardcoded?

    Read the article

  • Looking for a real-world example illustrating that composition can be superior to inheritance

    - by Job
    I watched a bunch of lectures on Clojure and functional programming by Rich Hickey as well as some of the SICP lectures, and I am sold on many concepts of functional programming. I incorporated some of them into my C# code at a previous job, and luckily it was easy to write C# code in a more functional style. At my new job we use Python and multiple inheritance is all the rage. My co-workers are very smart but they have to produce code fast given the nature of the company. I am learning both the tools and the codebase, but the architecture itself slows me down as well. I have not written the existing class hierarchy (neither would I be able to remember everything about it), and so, when I started adding a fairly small feature, I realized that I had to read a lot of code in the process. At the surface the code is neatly organized and split into small functions/methods and not copy-paste-repetitive, but the flip side of being not repetitive is that there is some magic functionality hidden somewhere in the hierarchy chain that magically glues things together and does work on my behalf, but it is very hard to find and follow. I had to fire up a profiler and run it through several examples and plot the execution graph as well as step through a debugger a few times, search the code for some substring and just read pages at the time. I am pretty sure that once I am done, my resulting code will be short and neatly organized, and yet not very readable. What I write feels declarative, as if I was writing an XML file that drives some other magic engine, except that there is no clear documentation on what the XML should look like and what the engine does except for the existing examples that I can read as well as the source code for the 'engine'. There has got to be a better way. IMO using composition over inheritance can help quite a bit. That way the computation will be linear rather than jumping all over the hierarchy tree. Whenever the functionality does not quite fit into an inheritance model, it will need to be mangled to fit in, or the entire inheritance hierarchy will need to be refactored/rebalanced, sort of like an unbalanced binary tree needs reshuffling from time to time in order to improve the average seek time. As I mentioned before, my co-workers are very smart; they just have been doing things a certain way and probably have an ability to hold a lot of unrelated crap in their head at once. I want to convince them to give composition and functional as opposed to OOP approach a try. To do that, I need to find some very good material. I do not think that a SCIP lecture or one by Rich Hickey will do - I am afraid it will be flagged down as too academic. Then, simple examples of Dog and Frog and AddressBook classes do not really connivence one way or the other - they show how inheritance can be converted to composition but not why it is truly and objectively better. What I am looking for is some real-world example of code that has been written with a lot of inheritance, then hit a wall and re-written in a different style that uses composition. Perhaps there is a blog or a chapter. I am looking for something that can summarize and illustrate the sort of pain that I am going through. I already have been throwing the phrase "composition over inheritance" around, but it was not received as enthusiastically as I had hoped. I do not want to be perceived as a new guy who likes to complain and bash existing code while looking for a perfect approach while not contributing fast enough. At the same time, my gut is convinced that inheritance is often the instrument of evil and I want to show a better way in a near future. Have you stumbled upon any great resources that can help me?

    Read the article

  • How to printf a time_t variable as a floating point number?

    - by soneangel
    Hi guys, I'm using a time_t variable in C (openMP enviroment) to keep cpu execution time...I define a float value sum_tot_time to sum time for all cpu's...I mean sum_tot_time is the sum of cpu's time_t values. The problem is that printing the value sum_tot_time it appear as an integer or long, by the way without its decimal part! I tried in these ways: to printf sum_tot_time as a double being a double value to printf sum_tot_time as float being a float value to printf sum_tot_time as double being a time_t value to printf sum_tot_time as float being a time_t value Please help me!!

    Read the article

  • Consolidation Strategy References

    - by BuckWoody
    I have a presentation that I give on SQL Server Consolidation Strategies, and in that presentation I talk about a few links that are useful. Here are some that I’ve found – feel free to comment on more, or if these links go stale:   Consolidation using SQL Server: http://msdn.microsoft.com/en-us/library/ee692366.aspx SQL Server Consolidation Guidance:  http://msdn.microsoft.com/en-us/library/ee819082.aspx   More references for SQL Server and Hyper-V: http://www.sqlskills.com/BLOGS/KIMBERLY/post/Virtualization-with-SQL-Server.aspx Quick overview of Virtual Server licensing implications: http://www.microsoft.com/uk/licensing/morethan250/learn/virtualisation.mspx SQL Server and Hyper-V best practices: http://sqlcat.com/whitepapers/archive/2008/10/03/running-sql-server-2008-in-a-hyper-v-environment-best-practices-and-performance-recommendations.aspx High-Availability and Hyper-V: http://technet.microsoft.com/en-us/magazine/2008.10.higha.aspx Virtualization Calculator: http://www.microsoft.com/Windowsserver2008/en/us/hyperv-calculators.aspx   May not be current, but here’s a whitepaper from VMWare for SQL Server: http://www.vmware.com/files/pdf/SQLServerWorkloads.pdf More information on SQL Server and VMWare: http://blogs.msdn.com/cindygross/archive/2009/10/23/considerations-for-installing-sql-server-on-vmware.aspx   Server Virtualization Validation Program: http://www.windowsservercatalog.com/svvp.aspx?svvppage=svvp.htm Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • John Burke's Weclome to the Applications Strategy Blog

    - by Tony Ouk
    Hi I'm John Burke and I'm the group Vice President of Oracle's Applications Business Unit.  Thanks for stopping by our Applications blog today.  The purpose of this site is to provide you, our customers, with timely, relevant, and balanced information about the state of the applications business, both here at Oracle and industry-wide. So on this site, you'll find information about Oracle's application products, how our customers have used those products to transform their businesses, and general industry trends which might help you craft YOUR applications roadmap.  So right now I'm walking to meet with one of Oracle's development executives.  I also plan to talk to Oracle customers and leading industry analysts.  I plan to provide a complete and balanced view of the total applications landscape.  I hope you check back often and view our updates.

    Read the article

  • Forrester- The Right Customer Experience Strategy

    - by Divya Malik
    I am blogging from a warm, sunny NYC today. We are here, sponsoring and attending Forrester's Customer Experience Forum 2011. Customer Experience Management has been a key area of focus for us in CRM. Our VP of CRM and eCommerce Product Marketing Kirk Mosher will be the first presenter of the Day (Tuesday morning at 7.30 am) with a breakfast session titled "Winning With A Superior Cross-Channel Customer Experience" . We are also showcasing some exciting new demos across our CRM and Commerce product lines in the areas of Integrated Sales and Marketing, Multi-Channel Commerce and Integrated Outlook and Mobile solutions on the demo floor. For those of you who are attending, do stop by, and see the latest in CRM innovations from Oracle, and talk to some experienced sales consultants. You can find more information about Oracle's CRM solutions here.  

    Read the article

  • Mobile redirect strategy

    - by Kevin
    Looking for help on deciding how to redirect users to a mobile optimized version of my site (m.mysite.com). Looking at two methods: Server configuration (.htaccess or even varnish) Webapp (php) The problem I see with #1 is with the "view full site" link on the mobile site. If a user clicks that link and they go to mysite.com won't the server just redirect them back to m.mysite.com? For #2 I could create a cookie that is checked in addition to the user agent. Any suggestions/comments? Is there a better way to "remember" if the user clicked "visit full site"? Thanks, Kevin

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >