Search Results

Search found 52 results on 3 pages for 'alexis abril'.

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

  • e-Seminars para Parceiros - Abril 2010

    - by Claudia Costa
    A equipa Alliances& Channels apresenta os novos e-Seminar para o mês de Abril. Para se inscrever nas formações que se encontram abaixo por favor utilize os links de registo indicados.   NOME DIA DURAÇÃO LOCAL Oracle IT Modernization Series: Migrating away from Sybase     15   09h00/1hora   On-line   Migrating to Database 11g value proposition     19   09h00/ 1hora   On-line   Upgrading to Database 11g value proposition     23   09h00/ 1hora   On-line   Oracle Content Management for PeopleSoft Overview   30   09h00/1hora   On-line       --------------------------------------------------------------------- Para mais informações por favor contacte: Melissa Lopes 214235194  

    Read the article

  • Oracle Embedded - 14 de Abril

    - by Claudia Costa
      Convidamo-lo a participar num evento que a Oracle irá realizar no próximo dia 14 de Abril, dedicado a soluções para sistemas Embedded.   A Oracle tem sido desde sempre o líder indisputado - em termos de desempenho, fiabilidade e escalabilidade - em sistemas de gestão de base de dados para aplicações críticas de gestão das grandes organizações. Hoje, no entanto, as aplicações críticas são implementadas não apenas nos data centers, mas cada vez mais em dispositivos móveis, nas infraestruturas de rede e em sistemas de aplicação específica. Por isso, o compromisso da Oracle em desenvolver os melhores produtos de gestão de dados alarga-se hoje do data center às aplicações designadas edge e embedded.   A Oracle oferece hoje a gama mais completa do mercado em tecnologias embedded, tanto para ISVs como para fabricantes de dispositivos e equipamentos, proporcionando-lhe a escolha dos produtos de base de dados e middleware embeddable que melhor se ajustem aos seus requisitos técnicos:   ·         Oracle Database 11g ·         Oracle Database Lite 11g ·         Oracle Berkeley DB ·         Oracle TimesTen In-Memory Database ·         Oracle Fusion Middleware 11g ·         Java for Business   Mais informação sobre produtos embedded Oracle aqui.   Segundo a IDC, a Oracle é hoje o líder mundial no mercado das bases de dados embedded com uma quota de mercado de 28,2% em 2008, estando a crescer a um ritmo 40% superior ao seu concorrente mais próximo e 50% superior à media do mercado.   A par com a riqueza da sua oferta tecnológica, a Oracle oferece igualmente modelos de licenciamento e de preços que se ajustam às necessidades de quem usa esses componentes tecnológicos como peças de uma solução final integrada a se vendida aos seus cliente finais.   A Oracle está empenhada em contribuir para o sucesso da sua empresa. Ao pôr os seus interesses acima de tudo, ganha a sua empresa e ganha a Oracle. E, mais importante que tudo, ganham os clientes, que recebem as melhores soluções possíveis.   Em resumo, as soluções embedded da Oracle proporcionam-lhe:   ·         Melhores produtos ·         Clientes mais satisfeitos ·         Maior rentabilidade das suas soluções   Agenda: ·         Oracle and Embedded ·         Embedded Market Trends ·         Oracle portfolio Oracle Database 11g o    Oracle Berkeley DB  o    Oracle Database Lite o    Oracle TimesTen o    Oracle Fusion Middleware ·         Demo: Berkeley DB ·         Embedded Software Licensing (ESL) Models   -----------------------------------------------------------------------------------   Clique aqui e registe-se.   Horário e Local: 9h30 - 18h00 Oracle Lagoas Park - Edf. 8 Porto Salvo   Para mais informações, por favor contacte: Melissa Lopes 214235194  

    Read the article

  • RewriteRule not working at server level?

    - by Alexis Wilke
    I wanted to forbid some robots from doing certain things to my websites and decided to add a RewriteRule for that purpose. The rule works when put in one of my <VirtualHost *:80> tag and looks like this: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} libwww-perl RewriteCond %{REQUEST_METHOD} POST RewriteRule . - [F,L] However, I wanted to apply that to all my websites instead of just one of them. So with the newest version of Apache2 settings, I decided to put that code in the security.conf file. This file is defined under /etc/apache2/conf-available/... (and yes, I have a softlink from the /etc/apache2/conf-enabled/... directory.) However, if the definition is only in the conf-available/security.conf files, it somehow gets ignored. From the documentation, it says that these Rewrite* commands all work at server level! Any idea of what I would be missing?

    Read the article

  • What is the proper SEO handling of pages appearing in popups using IFRAMEs?

    - by Alexis Wilke
    I am working on a CMS which makes use of IFRAMEs to display some forms, for illustration, say a Search form. So the user clicks the Search button and the website reacts by opening a popup window which includes an IFRAME to the actual Search form. This means I have a "bare"¹ page with the search form. Page which, obviously, is directly accessible via its own URI. In terms of SEO, the forms have no content worthy of being indexed, so I was thinking to mark them as NOINDEX. Is that the correct way to handle such pages? From what I read on some other question, Google suggests to put links from IFRAMEs to other pages. However, I definitively do not want a user visible link to the Home page, or whatever page in link with the form, in the content of my forms because that could be misinterpreted by the user. However, if <link> tags would work too, which one should I use? (i.e. "top" would work, right? with the home page in there?) ¹ By bare I mean that the normal theme is not show, it will be a plain white background with just and only the simplest form.

    Read the article

  • facebook internal search by google [migrated]

    - by Alexis
    I am currently working on a challenge; basically using google api; I would search for facebook fan pages; most specifically the "about" timeline for the email add and the date the business was founded. So far I have come to this: site:facebook.com/pages + "business type" + "country" + "@email.com" I need to add something else so that it can give me back the date it was founded in. If you see the facebook fan page in the about section; there is for e.g (Founded 06/02/2010) The bracketed info above is what I need to add to succeed in adding; any idea?

    Read the article

  • Search for a specific info on pages

    - by Alexis
    I am currently working on a challenge; basically using google api; I would search for facebook fan pages; most specifically the "about" timeline for the email add and the date the business was founded. So far I have come to this: site:facebook.com/pages + "business type" + "country" + "@email.com" I need to add something else so that it can give me back the date it was founded in. If you see the facebook fan page in the about section; there is for e.g (Founded 06/02/2010) The bracketed info above is what I need to add to succeed in adding to the string above; any idea?

    Read the article

  • form submitting with mechanize and Python

    - by MATELIN Alexis
    I'm trying to scrap a website that requires to submit two forms : a first one to loggin and a second one to specify my research. I'm using Python and the mechanize package. No problem with the first one, but i just can't figure out how to pass through the second one. Here is the part of my code related to the firm above-mentionned agemin=18 agemax=25 by='region' country='France' region=2 newcustomers=1 browser.select_form(nr=0) browser['age[min]']=agemin browser['age[max]']=agemax browser['country']=country browser['region']=region browser['by']=by browser['new-customers']=newcustomers response=browser.submit() content=response.read() but when I submit the variable 'age[min]' by example, I get the following error message : TypeError: object of type 'int' has no len() to give you some more informations, here is what I get with 'print br.form' <POST http://www.adopteunmec.com/qsearch/ajax_quick application/x-www-form-urlencoded <SelectControl(age[min]=[, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, *30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])> <SelectControl(age[max]=[, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, *45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])> <SelectControl(by=[*region, distance])> <SelectControl(country=[*fr, be, ch, ca])> <SelectControl(region=[*1, 2, 3, 4, 5, 6, 7, 8, 22, 23, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 11])> <SelectControl(distance[min]=[*, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000])> <SelectControl(distance[max]=[, 0, 10, 20, 30, 40, 50, 60, 70, *80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000])> <CheckboxControl(new=[*1])>> My guess is that the form needs an object (like a list) containing all the variables to accept it ; that's why it refuses the variables submited one by one. Thank you in advance for any help ! Alexis

    Read the article

  • RAID 5 configuration and future expansion

    - by Alexis Hirst
    hi, I am building a PC to act as a file server among other things, and I was wondering whether it is a good idea to create 2 partitions on the RAID 5 array, one for OS one for data, or to have a separate disk for OS and use array for data. Also, one day i may want to add another disk to the array, so would there be any issues if I had the OS partition on the RAID5 array when it came to resizing the data partition?

    Read the article

  • Rapidshare download manager accessible over network

    - by Alexis Hirst
    Hi, Basically I am looking for a download manager, which I can run on my server to download rapidshare files, while also being able to access it over the network via a standalone client application or web interface on another machine. I use azsmrc for azureus, so something similar to this would be great. Any ideas?

    Read the article

  • What's the best way to run Drupal and Django sites behind the same Varnish server?

    - by Alexis Bellido
    I have a high traffic website running with Drupal and Apache, five web servers behind a Varnish server load balancing. Let's say this site is example.com. I'm using five backends and a director like this in my default.vcl: director balancer round-robin { { .backend = web1; } { .backend = web2; } { .backend = web3; } { .backend = web4; } { .backend = web5; } } Now I'm working on a new Django project that will be a new section of this site running on example.com/new-section. After checking the documentation I found I can do something like this: sub vcl_recv { if (req.url ~ "^/new-section/") { set req.backend = newbackend; } else { set req.backend = default; } } That is, using a different backend for a subdirectory /new-section under the same domain. My question is, how do I make something like this work with my director and load balancing setup? I'm probably going to run two or more web servers (backends) with my new Django project, each one with a mix of Gunicorn, Nginx, and a few Python packages, and would like to put all of those in their own Varnish director to load balance. Is it possible to do use the above approach to decide which director to use?, like this: sub vcl_recv { if (req.url ~ "^/new-section/") { set req.director = newdirector; } else { set req.director = balancer; } } All suggestions welcome. Thanks!

    Read the article

  • iPhone log reader

    - by Alexis Hirst
    I went to the apple store today to discuss a problem with my iPhone battery, and they plugged it into one of their macs and used an application that interpreted the logs stored on my phone. So, my question is, does anybody know the name of the application that reads the logs, and if so, where it is available? Since it is a diagnostic tool, I'm guessing it won't be openly available, but I thought i would ask anyway.

    Read the article

  • One server with multiple desktops "heads" with VNC

    - by Alexis K
    I am managing a system of kiosks. Each kiosk currently is running a web browser with the application for the kiosk running in the browser. Each kiosk needs to be able to display separate content. At times, the application running in the web browser freezes. Thus, I have to go out to the site to refresh the page. I want to see if there is a way to have one central server that has multiple browser heads. Then each kiosk would run a program like VNC to display one of the heads. This way when the program freezes, I just have to login to the central server and refresh the page. Getting VNC or another remote desktop software installed on the clients is no problem. What I am looking for is a way to have VNC remote into a specific head of a head of a web browser. Does such a thing exist? Or do I have to run a VM for each kiosk to remote into? Any advice, pointers, or solutions would be helpful.

    Read the article

  • Unique issue with Rails setup

    - by Alexis Abril
    Becoming a bit of a Ruby convert, but I've run into an issue with my Rails installation. I realize, in spirit, this question may overlap with superuser.com, but am asking here due to the nature of the installation. My command: sudo gem install rails Response is: /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/spec_fetcher.rb:232: warning:getc is obsolete; use STDIN.getc instead The "/opt/local" may be giving away the fact I'm using MacPorts(Mac OS 10.4). After that response, there is no new command line issued by the system, just a hang. Any insite is greatly appreciated.

    Read the article

  • How to imitate focus on a div element?

    - by Alexis Abril
    The scenario involves imitating a drop down list. Instead of the standard input select element, we're using a set of custom images in combination with a few CSS styles and jQuery behaviors. All in all, we have a drop down list that works just fine. The question revolves around a drop down list losing focus. A normal select element losing focus would automatically close the list, however, since we are using a set of divs, it's not possibly to set or lose focus(and subsequently hide the list). We've been able to imitate normal drop down behavior by hiding a text input behind the div and setting the focus to it dynamically. For example: User clicks drop down list - content list is displayed and hidden text input is set as focus. Event is bound to the text input losing focus which hides the content list. I'm curious if the community has a better approach to hiding a div when a user clicks off, presses escape, etc.

    Read the article

  • What is the correct usage of blueprint-typography-body([$font-size])?

    - by Alexis Abril
    Recent convert to RoR and I've been using Compass w/ Blueprint to dip into the proverbial pool. Compass has been fantastic, but I've come across something strange within the Typography library. The blueprint-typography-body mixin contains the following: =blueprint-typography-body($font-size: $blueprint-font-size) line-height: 1.5 +normal-text font-size: 100% * $font-size / 16px My question revolves around "font-size." I'm a bit lost, as I would expect to pass in a font size and have that size reflected upon page load. However, in this scenario the formula seems to dictate a percentage against the default font. ie: +blueprint-typography-body(10px) //produces 7.5px off of the default font size of 12px from what I can tell. In essence, I'm curious if there is a standard to setting font size within Compass other than explicitly declaring "font-size: 10px". Note: The reason I'm leaning towards Blueprint/Compass font stylings is due to the standardization of line-heights, fonts and colors.

    Read the article

  • VEMap and a GeoRSS feed(hosted separately)

    - by Alexis Abril
    The scenario is as follows: A WCF web service exists that outputs a valid GeoRSS feed. This lives in its own domain as a number of different applications have access to it. A web page(on a different site) has been created with an instance of a VEMap(Bing/Virtual Earth map object). Now, VEMap can accept an input feed in this format via the following: var layer = new VEShapeLayer(); var veLayerSpec = new VEShapeSourceSpecification(VEDataType.GeoRSS, "someurl", layer); map.ImportShapeLayerData(veLayerSpec, onComplete, true); onComplete is a callback function I'm using to replace the default pin graphic with something custom. The question is in regards to "someurl", which is a path to a local xml file containing the geographic information(georss simple format). I've realized this feed and the map must be hosted in the same domain, so I've created a generic handler that reads the remote feed and returns it in the same format. var veLayerSpec = new VEShapeSourceSpecification(VEDataType.GeoRSS, "/somelocalhandler.ashx", layer); When I do this, I get the VEMap error("z is null"). This is the same error one would receive when trying to access a remote feed. When I copy the feed into a local xml file(ie, "feed.xml") there is no error. The order of operations is currently: remote feed - local handler - VEMap import If I'm over complicating this procedure, let me know! I'm a bit new to the Bing Maps API and might have missed something. Any assistance is appreciated.

    Read the article

  • "Session is Closed!" - NHibernate

    - by Alexis Abril
    This is in a web application environment: An initial request is able to successfully complete, however any additional requests return a "Session is Closed" response from the NHibernate framework. I'm using a HttpModule approach with the following code: public class MyHttpModule : IHttpModule { public void Init(HttpApplication context) { context.EndRequest += ApplicationEndRequest; context.BeginRequest += ApplicationBeginRequest; } public void ApplicationBeginRequest(object sender, EventArgs e) { CurrentSessionContext.Bind(SessionFactory.Instance.OpenSession()); } public void ApplicationEndRequest(object sender, EventArgs e) { ISession currentSession = CurrentSessionContext.Unbind( SessionFactory.Instance); currentSession.Dispose(); } public void Dispose() { } } SessionFactory.Instance is my singleton implementation, using FluentNHibernate to return an ISessionFactory object. In my repository class, I attempt to use the following syntax: public class MyObjectRepository : IMyObjectRepository { public MyObject GetByID(int id) { using (ISession session = SessionFactory.Instance.GetCurrentSession()) return session.Get<MyObject>(id); } } This allows code in the application to be called as such: IMyObjectRepository repo = new MyObjectRepository(); MyObject obj = repo.GetByID(1); I have a suspicion my repository code is to blame, but I'm not 100% sure on the actual implementation I should be using. I found a similar issue on SO here. I too am using WebSessionContext in my implementation, however, no solution was provided other than writing a custom SessionManager. For simple CRUD operations, is a custom session provider required apart from the built in tools(ie WebSessionContext)?

    Read the article

  • Scrollbar problem with jquery ui dialog in Chrome and Safari

    - by alexis.kennedy
    I'm using the jquery ui dialog with modal=true. In Chrome and Safari, this disables scrolling via the scroll bar and cursor keys (scrolling with the mouse wheel and page up/down still works). This is a problem if the dialog is too tall to fit on one page - users on a laptop get frustrated. Someone raised this three months ago on the jquery bug tracker - http://dev.jqueryui.com/ticket/4671 - it doesn't look like fixing it is a priority. :) So does anyone (i) have a fix for this? (ii) have a suggested workaround that would give a decent usability experience? I'm experimenting with mouseover / scrollto on bits of the form, but it's not a great solution :( EDIT: props to Rowan Beentje (who's not on SO afaict) for finding a solution to this. jQueryUI prevents scrolling by capturing the mouseup / mousedown events. So this: $("dialogId").dialog({ open: function(event, ui) { window.setTimeout(function() { jQuery(document) .unbind('mousedown.dialog-overlay') .unbind('mouseup.dialog-overlay') ; }, 100); }, modal: true}); seems to fix it. Use at own risk, I don't know what other unmodal behaviour unbinding this stuff might allow.

    Read the article

  • ASP.NET 3.5 Web Site stopped importing System namespace by default

    - by Alexis
    I have a VB Web Site project that has recently (and mysteriously) stopped importing the "System" namespace by default. I'm having to either place a "Imports System" line at the top of each code behind, or preface everything with "System", which is fairly annoying, not to mention redundant. I can't for the life of me figure out how to get the System namespace back to being imported by default. I've already checked to see that WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config contains the <add namespace="System"/> line--it does. That was my best lead. I'm tearing my hair out. Does anyone have any suggestions?

    Read the article

  • How can I detect when a file download has completed in ASP.NET?

    - by Alexis
    I have a popup window that displays "Please wait while your file is being downloaded". This popup also executes the code below to start the file download. How can I close the popup window once the file download has completed? I need some way to detect that the file download has completed so I can call self.close() to close this popup. System.Web.HttpContext.Current.Response.ClearContent(); System.Web.HttpContext.Current.Response.Clear(); System.Web.HttpContext.Current.Response.ClearHeaders(); System.Web.HttpContext.Current.Response.ContentType = fileObject.ContentType; System.Web.HttpContext.Current.Response.AppendHeader("Content-Disposition", string.Concat("attachment; filename=", fileObject.FileName)); System.Web.HttpContext.Current.Response.WriteFile(fileObject.FilePath); Response.Flush(); Response.End();

    Read the article

  • CSS3 transition on table row using height property

    - by Alexis Leclerc
    I have an HTML table displaying some information with a few rows. On each row, the user can click to reveal some additional rows that contains information related to the clicked row. Something like this: While the additional rows are being created with an AJAX request, a loading row is inserted right after the clicked row : Currently, everything works perfectly (drill down style), but I would like to add some animation to the loading row. I found a question ( this one ) that has a JSFiddle showing kind of what I want ( this fiddle ). I tried to implement something similar with CSS3 transitions, but I can't get it to work. Here's my simulated attempt ( fiddle only for deployment of the loading row ) using these transitions : -webkit-transition: height 0.1s ease-in-out; -moz-transition: height 0.1s ease-in-out; -ms-transition: height 0.1s ease-in-out; -o-transition: height 0.1s ease-in-out; transition: height 0.1s ease-in-out; Any thought on why my fiddle doesn't do any animation? Any other methods you would propose? Thanks!

    Read the article

  • Android - Loop Through strings.xml file

    - by Alexis Cartier
    I was wondering if there is anyway to loop through the strings.xml file. Let's say that I have the following format: <!-- FIRST SECTION --> <string name="change_password">Change Password</string> <string name="change_server">Change URL</string> <string name="default_password">password</string> <string name="default_server">http://xxx:8080</string> <string name="default_username">testPhoneAccount</string> <!-- SECOND SECTION --> <string name="debug_settings_category">Debug Settings</string> <string name="reload_data_every_startup_pref">reload_data_every_startup</string> <string name="reload_data_on_first_startup_pref">reload_data_on_first_startup</string> Now let's say I have this: private HashMap<String,Integer> hashmapStringValues = new HashMap<String, Integer>(); Is there a way to iterate only in the second section of my xml file? Maybe wrap the section with a tag like <section2> and then iterate through it? public void initHashMap(){ for (int i=0;i< ???? ;i++) //Here I need to loop only in the second section of my xml file { String nameOfTag = ? // Here I get the name of the tag int value = R.string.nameOfTag // Here I get the associated value of the tag this.hashmapStringValues.put(nameOfTag,value); } }

    Read the article

  • Do you know of a C macro to compute Unix time and date?

    - by Alexis Wilke
    I'm wondering if someone knows/has a C macro to compute a static Unix time from a hard coded date and time as in: time_t t = UNIX_TIMESTAMP(2012, 5, 10, 9, 26, 13); I'm looking into that because I want to have a numeric static timestamp. This will be done hundred of times throughout the software, each time with a different date, and I want to make sure it is fast because it will run hundreds of times every second. Converting dates that many times would definitively slow down things (i.e. calling mktime() is slower than having a static number compiled in place, right?) [made an update to try to render this paragraph clearer, Nov 23, 2012] Update I want to clarify the question with more information about the process being used. As my server receives requests, for each request, it starts a new process. That process is constantly updated with new plugins and quite often such updates require a database update. Those must be run only once. To know whether an update is necessary, I want to use a Unix date (which is better than using a counter because a counter is much more likely to break once in a while.) The plugins will thus receive an update signal and have their on_update() function called. There I want to do something like this: void some_plugin::on_update(time_t last_update) { if(last_update < UNIX_TIMESTAMP(2010, 3, 22, 20, 9, 26)) { ...run update... } if(last_update < UNIX_TIMESTAMP(2012, 5, 10, 9, 26, 13)) { ...run update... } // as many test as required... } As you can see, if I have to compute the unix timestamp each time, this could represent thousands of calls per process and if you receive 100 hits a second x 1000 calls, you wasted 100,000 calls when you could have had the compiler compute those numbers once at compile time. Putting the value in a static variable is of no interest because this code will run once per process run. Note that the last_update variable changes depending on the website being hit (it comes from the database.) Code Okay, I got the code now: // helper (Days in February) #define _SNAP_UNIX_TIMESTAMP_FDAY(year) \ (((year) % 400) == 0 ? 29LL : \ (((year) % 100) == 0 ? 28LL : \ (((year) % 4) == 0 ? 29LL : \ 28LL))) // helper (Days in the year) #define _SNAP_UNIX_TIMESTAMP_YDAY(year, month, day) \ ( \ /* January */ static_cast<qint64>(day) \ /* February */ + ((month) >= 2 ? 31LL : 0LL) \ /* March */ + ((month) >= 3 ? _SNAP_UNIX_TIMESTAMP_FDAY(year) : 0LL) \ /* April */ + ((month) >= 4 ? 31LL : 0LL) \ /* May */ + ((month) >= 5 ? 30LL : 0LL) \ /* June */ + ((month) >= 6 ? 31LL : 0LL) \ /* July */ + ((month) >= 7 ? 30LL : 0LL) \ /* August */ + ((month) >= 8 ? 31LL : 0LL) \ /* September */+ ((month) >= 9 ? 31LL : 0LL) \ /* October */ + ((month) >= 10 ? 30LL : 0LL) \ /* November */ + ((month) >= 11 ? 31LL : 0LL) \ /* December */ + ((month) >= 12 ? 30LL : 0LL) \ ) #define SNAP_UNIX_TIMESTAMP(year, month, day, hour, minute, second) \ ( /* time */ static_cast<qint64>(second) \ + static_cast<qint64>(minute) * 60LL \ + static_cast<qint64>(hour) * 3600LL \ + /* year day (month + day) */ (_SNAP_UNIX_TIMESTAMP_YDAY(year, month, day) - 1) * 86400LL \ + /* year */ (static_cast<qint64>(year) - 1970LL) * 31536000LL \ + ((static_cast<qint64>(year) - 1969LL) / 4LL) * 86400LL \ - ((static_cast<qint64>(year) - 1901LL) / 100LL) * 86400LL \ + ((static_cast<qint64>(year) - 1601LL) / 400LL) * 86400LL ) WARNING: Do not use these macros to dynamically compute a date. It is SLOWER than mktime(). This being said, if you have a hard coded date, then the compiler will compute the time_t value at compile time. Slower to compile, but faster to execute over and over again.

    Read the article

1 2 3  | Next Page >