Search Results

Search found 784 results on 32 pages for 'da cheng'.

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

  • HRC BEST PRACTICE TOUR: la tappa di Roma del 28/05

    - by Claudia Caramelli-Oracle
    Guest post by Paola Provvisier, Master Principal Sales Consultant - Oracle 12.00 Normal 0 14 false false false IT X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-family:"Calibri","sans-serif"; mso-ascii- mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi- mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Presso la Banca del Mezzogiorno - Mediocredito Centrale, il 28 maggio scorso, si è svolto l’incontro dal titolo Compensation & Benefit – Welfare Aziendale, organizzato da HRComunity Academy nell’ambito della sua iniziativa HRC BEST PRACTICE TOUR e sponsorizzato da Oracle. La giornata ha visto protagonisti alcune grandi realtà bancarie e industriali con la partecipazione di circa 30 specialisti dell’area HR - Compensation & Benefit. Gli interventi che si sono succeduti nell’ambito della giornata hanno avuto come tema la condivisione delle best-pratice e delle iniziative in corso tra le aziende intervenute, con particolare riguardo alle proposte in merito al tema ‘Flexible Benefit’. Oracle, quale sponsor della giornata, ha introdotto con una Technical Overview gli attuali scenari del mercato del lavoro e le evoluzioni tecnologiche sulla piattaforma Oracle HCM Cloud, con particolare riguardo alle innovazioni a supporto dei temi della Compensation. La giornata, che ha suscitato apprezzamento e vivace interesse da parte di tutti i partecipanti con una proficua e partecipata sessione di domande e risposte a seguito dei vari interventi, si è conclusa con un piacevole buffet. Altre foto dell'evento sono presenti sulla Pagina Facebook di HRC.

    Read the article

  • I manager della logistica a confronto

    - by Paolo Leveghi
    Il 4 di Aprile scorso una quindicina di manager della logistica appartenenti a diversi settori industriali (Retail, Consumer Goods, Natural Resources, etc) si sono ritrovati per un workshop di lavoro oganizzato da Oracle con la collaborazione di Assologistica. Il tema era libero: di cosa avreste bisogno per migliorare la logistica delle vostre aziende?  La discussione è stata viva e durata per più di tre ore. Gli spunti della serata, assieme a quelli che verranno fuori dall'analogo incontro che si svolgerà il 18 Aprile prossimo, saranno parte di una presentazione che verrà preparata da Assologistica e distribuita al suo network.

    Read the article

  • A verdade sobre o NuGet e seu futuro (pt-BR)

    - by srecosta
    Há uma série de mal-entendidos sobre o NuGet e sobre o ecossistema do qual ele faz parte: ele é da Microsoft ou ele é da comunidade; ele é open source ou ele não é; ele existe fora do Visual Studio ou só nele? Neste post, que é uma tradução de um post do Phil Haack (o @haacked) que eu pedi pra traduzir, ele tenta responder alguns deles e deixar claro qual é a missão do NuGet e o que a comunidade pode fazer para torná-lo melhor.O post continua no meu blog: http://www.srecosta.com/2012/11/19/a-verdade-sobre-o-nuget-e-seu-futuro/Abraços,Eduardo Costa

    Read the article

  • Simplifique sua mobilidade empresarial

    - by RED League Heroes-Oracle
    Por muitos anos, os departamentos de TI das empresas deram maior atenção aos computadores (desktops e notebooks), para que estes pudessem trabalhar com as aplicações de negócios. Com o advento da computação móvel, as aplicações passaram a não estar vinculadas somente aos computadores. Hoje os usuários buscam usar ou acessar as aplicações da empresa através de tablets ou smartphones a qualquer hora, em qualquer lugar. VIVEMOS EM UM AMBIENTE MULTICANAL. Este novo ambiente traz novas oportunidades e desafios, confira neste e-book como a Oracle pode auxiliar você e sua empresa nesta nova era.

    Read the article

  • Calling a WCF service from Java

    - by Ian Kemp
    As the title says, I need to get some Java 1.5 code to call a WCF web service. I've downloaded and used Metro to generate Java proxy classes, but they aren't generating what I expect, and I believe this is because of the WSDL that the WCF service generates. My WCF classes look like this (full code omitted for brevity): public class TestService : IService { public TestResponse DoTest(TestRequest request) { TestResponse response = new TestResponse(); // actual testing code... response.Result = ResponseResult.Success; return response; } } public class TestResponse : ResponseMessage { public bool TestSucceeded { get; set; } } public class ResponseMessage { public ResponseResult Result { get; set; } public string ResponseDesc { get; set; } public Guid ErrorIdentifier { get; set; } } public enum ResponseResult { Success, Error, Empty, } and the resulting WSDL (when I browse to http://localhost/TestService?wsdl=wsdl0) looks like this: <xsd:element name="TestResponse"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" name="TestSucceeded" type="xsd:boolean" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="ErrorIdentifier" type="q1:guid" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/" /> <xsd:simpleType name="ResponseResult"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Error" /> <xsd:enumeration value="Success" /> <xsd:enumeration value="EmptyResult" /> </xsd:restriction> </xsd:simpleType> <xsd:element name="ResponseResult" nillable="true" type="tns:ResponseResult" /> <xsd:element name="Result" type="tns:ResponseResult" /> <xsd:element name="ResultDesc" nillable="true" type="xsd:string" /> ... <xs:element name="guid" nillable="true" type="tns:guid" /> <xs:simpleType name="guid"> <xs:restriction base="xs:string"> <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" /> </xs:restriction> </xs:simpleType> Immediately I see an issue with this WSDL: TestResponse does not contain the properties inherited from ResponseMessage. Since this service has always worked in Visual Studio I've never questioned this before, but maybe that could be causing my problem? Anyhow, when I run Metro's wsimport.bat on the service the following error message is generated: [WARNING] src-resolve.4.2: Error resolving component 'q1:guid' and the outputted Java version of TestResponse lacks any of the properties from ResponseMessage. I hacked the WSDL a bit and changed ErrorIdentifier to be typed as xsd:string, which makes the message about resolving the GUID type go away, but I still don't get any of ResponseMessage's properties. Finally, I altered the WSDL to include the 3 properties from ResponseMessage in TestResponse, and of course the end result is that the generated .java file contains them. However, when I actually call the WCF service from Java, those 3 properties are always null. Any advice, apart from writing the proxy classes myself?

    Read the article

  • How to Resolve Jason issue

    - by Mohammad Nezhad
    I am working in a web scheduling application which uses DayPilot component I started by reading the documentation and use the calendar control. but whenever I do some thing which (fires an event on the Daypilot control) I face with following error An exception was thrown in the server-side event handler: System.InvalidCastException: Instance Of JasonData doesn't hold a double at DayPilot.Jason.JasonData.op_Explicit(JasonData data) at DayPilot.Web.Ui.Events.EventMoveEventArgs..ctor(JasonData parameters, string[] fields, JasonData data) at DayPilot.Web.Ui.DayPilotCalendar.ExecuteEventJASON(String ea) at DayPilot.Web.Ui.DayPilotCalendar.System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(string ea) at System.Web.UI.Page.PrepareCallback(String callbackControlID) here is the completed code in the ASPX page <DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server" Direction="RTL" Days="7" DataStartField="eventstart" DataEndField="eventend" DataTextField="name" DataValueField="id" DataTagFields="State" EventMoveHandling="CallBack" OnEventMove="DayPilotCalendar1_EventMove" EventEditHandling="CallBack" OnEventEdit="DayPilotCalendar1_EventEdit" EventClickHandling="Edit" OnBeforeEventRender="DayPilotCalendar1_BeforeEventRender" EventResizeHandling="CallBack" OnEventResize="DayPilotCalendar1_EventResize" EventDoubleClickHandling="CallBack" OnEventDoubleClick="DayPilotCalendar1_EventDoubleClick" oncommand="DayPilotCalendar1_Command" and here is the complete codebehind protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) Initialization(); } private void dbUpdateEvent(string id, DateTime start, DateTime end) { // update for move using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["db"].ConnectionString)) { con.Open(); SqlCommand cmd = new SqlCommand("UPDATE [event] SET [eventstart] = @start, [eventend] = @end WHERE [id] = @id", con); cmd.Parameters.AddWithValue("id", id); cmd.Parameters.AddWithValue("start", start); cmd.Parameters.AddWithValue("end", end); cmd.ExecuteNonQuery(); } } private DataTable dbGetEvents(DateTime start, int days) { // get Data SqlDataAdapter da = new SqlDataAdapter("SELECT [id], [name], [eventstart], [eventend], [state], [other] FROM [event] WHERE NOT (([eventend] <= @start) OR ([eventstart] >= @end))", ConfigurationManager.ConnectionStrings["DayPilotTest"].ConnectionString); ; da.SelectCommand.Parameters.AddWithValue("start", start); da.SelectCommand.Parameters.AddWithValue("end", start.AddDays(days)); DataTable dt = new DataTable(); da.Fill(dt); return dt; } protected void DayPilotCalendar1_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e) { // Drag and Drop dbUpdateEvent(e.Value, e.NewStart, e.NewEnd); DayPilotCalendar1.DataSource = dbGetEvents(DayPilotCalendar1.StartDate, DayPilotCalendar1.Days); DayPilotCalendar1.DataBind(); DayPilotCalendar1.Update(); } private void Initialization() { // first bind DayPilotCalendar1.StartDate = DayPilot.Utils.Week.FirstDayOfWeek(new DateTime(2009, 1, 1)); DayPilotCalendar1.DataSource = dbGetEvents(DayPilotCalendar1.StartDate, DayPilotCalendar1.Days); DataBind(); } protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e) { // change the color based on state if (e.Tag["State"] == "Fixed") { e.DurationBarColor = "Brown"; } } protected void DayPilotCalendar1_EventResize(object sender, DayPilot.Web.Ui.Events.EventResizeEventArgs e) { dbUpdateEvent(e.Value, e.NewStart, e.NewEnd); DayPilotCalendar1.DataSource = dbGetEvents(DayPilotCalendar1.StartDate, DayPilotCalendar1.Days); DayPilotCalendar1.DataBind(); DayPilotCalendar1.Update(); } protected void DayPilotCalendar1_EventDoubleClick(object sender, EventClickEventArgs e) { dbInsertEvent(e.Text , e.Start, e.End, "New", "New Meeting"); DayPilotCalendar1.DataSource = dbGetEvents(DayPilotCalendar1.StartDate, DayPilotCalendar1.Days); DayPilotCalendar1.DataBind(); DayPilotCalendar1.Update(); } note that I remove unnecessary code behinds

    Read the article

  • Avoid Resource Conflict

    - by Yan Cheng CHEOK
    I have a MFC exe, trying to dynamic load a MFC dll. // This is code in MFC exe HINSTANCE h = AfxLoadLibrary(_T("DLL.dll")); typedef void(*FUN)(); FUN fun = (FUN)GetProcAddress(h, "loveme"); FreeLibrary(h); Both MFC exe and MFC dll, are having their own resource file. However, I realize that, if MFC exe and MFC dll are having a same resource ID, conflict may occur. // This is code in MFC dll. Both exe and dll, are having resources with // ID 101. CString s; s.LoadString(101); // Resource 101 in exe is being shown :( AfxMessageBox(s); May I know how I can avoid resource ID conflict problem? Can we have two resource in both MFC and DLL, although their ID is different, but they are independent from each other? This means, DLL will only load DLL's resource. EXE will only load EXE's resource.

    Read the article

  • How to implement Comet server side with Python?

    - by Morgan Cheng
    I once tried to implement Comet in PHP. Soon, I found that PHP is not suitable for Comet, since each HTTP request will occupy one process/thread. As a result, it doesn't scale well. I just installed mod_python in my XAMPP. I thought it would be easy to implement Comet with Python asynchronous programming. But still cannot get a clue how to implement it. Is there any idea how to implement Comet in mod_python?

    Read the article

  • Help to Install STLPort in VC6

    - by Yan Cheng CHEOK
    I try to follow the following steps to install STLPort in VC6 1) I change C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT content set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE% set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB% to (The directory C:\STLport-5.2.1\lib is not exsits?) set INCLUDE=C:\STLport-5.2.1\stlport;%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE% set LIB=C:\STLport-5.2.1\lib;%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB% 2) I C:\>cd C:\STLport-5.2.1\build\lib C:\STLport-5.2.1\build\lib>"c:\Program Files\Microsoft Visual Studio\VC98\bin\VCVARS32.BAT" Setting environment for using Microsoft Visual C++ tools. C:\STLport-5.2.1\build\lib>c:\STLport-5.2.1\configure.bat msvc6 STLport Configuration Tool for Windows The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. Setting compiler: Microsoft Visual C++ 6.0 The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. Setting platform: Windows XP The system cannot find the path specified. Done configuring STLport. Go to build/lib folder and type "nmake clean install" to build and install STLport to the "lib" and "bin" folders. Go to build/test/unit folder and type nmake clean install to build unit tests and install them in bin folder. 3) The code within configure.bat, which give me The system cannot find the path specified is REM initially create/overwrite config.mak echo # STLport Configuration Tool for Windows > build\Makefiles\nmake\config.mak echo # >> build\Makefiles\nmake\config.mak echo # config.mak generated with command line: >> build\Makefiles\nmake\config.mak echo # configure %1 %2 %3 %4 %5 %6 %7 %8 %9 >> build\Makefiles\nmake\config.mak echo # >> build\Makefiles\nmake\config.mak What I shall change them to? How can I continue the build? Thanks.

    Read the article

  • Is it fair for us to conclude XOR string encryption is less secure than well known encryption (Say Blowfish)

    - by Yan Cheng CHEOK
    I was wondering, is it fair to conclude, XOR string encryption is less secure than other encryption method, say Blowfish This is because for both methods, their input are Unencrypted string A secret key string XOR(string value,string key) { string retval(value); short unsigned int klen=key.length(); short unsigned int vlen=value.length(); short unsigned int k=0; short unsigned int v=0; for(v;v<vlen;v++) { retval[v]=value[v]^key[k]; k=(++k<klen?k:0); } return retval; } Is there any proof that XOR encryption method is more easy to be "broken" than Blowfish if the same key is being chosen?

    Read the article

  • How to write Asynchronous LINQ query?

    - by Morgan Cheng
    After I read a bunch of LINQ related stuff, I suddenly realized that no articles introduce how to write asynchronous LINQ query. Suppose we use LINQ to SQL, below statement is clear. However, if the SQL database responds slowly, then the thread using this block of code would be hindered. var result = from item in Products where item.Price > 3 select item.Name; foreach (var name in result) { Console.WriteLine(name); } Seems that current LINQ query spec doesn't provide support to this. Is there any way to do asynchronous programming LINQ? It works like there is a callback notification when results are ready to use without any blocking delay on I/O.

    Read the article

  • How to protect critical section in PHP?

    - by Morgan Cheng
    I did some search about this topic but found nothing valuable. If I don't use PHP default session handler, there is no session lock at request level. So, I have to protect critical section by myself. In Java, we have synchronized. In C#, we have lock. In PHP, how to do that?

    Read the article

  • Java 2D Drawing Framework

    - by Yan Cheng CHEOK
    Currently, I am using JHotDraw https://sourceforge.net/projects/jhotdraw/ as Figures Drawing Framework in my application. JHotDraw is a two-dimensional graphics framework for structured drawing editors that is written in Java. It is based on Erich Gamma's JHotDraw, which is copyright 1996, 1997 by IFA Informatik and Erich Gamma. I was wondering, besides JHotDraw, do you try out any Java 2D Drawing Framework, which is worth a try?

    Read the article

  • How does Windows LIve ID work?

    - by Morgan Cheng
    I happens to find this nice article explaining how OpenID works. Clearly, OpenID consumer and OpenID server transfer information through URL query string. I'm wondering how Live ID accomplish similar functionality. It seems the info is not exchanged through query string in URL. And, since Live ID login server have different domain name from consumer domain, it is not applicable to transfer info through cookie. I tried to google tutorial of Live ID, but the result is full of jargon and hard to understand. Is there any easy-to-understand tutorial about How Live ID works?

    Read the article

  • Is Updating double operation atomic

    - by Yan Cheng CHEOK
    In Java, updating double and long variable may not be atomic, as double/long are being treated as two separate 32 bits variables. http://java.sun.com/docs/books/jls/second_edition/html/memory.doc.html#28733 In C++, if I am using 32 bit Intel Processor + Microsoft Visual C++ compiler, is updating double (8 byte) operation atomic? I cannot find much specification mention on this behavior. When I say "atomic variable", here is what I mean : Thread A trying to write 1 to variable x. Thread B trying to write 2 to variable x. We shall get value 1 or 2 out from variable x, but not an undefined value.

    Read the article

  • How does GMail implement Comet?

    - by Morgan Cheng
    With the help of HttpWatch, I tried to figure out how GMail implement Comet. I Login in GMail with two account, one in IE and the other in Firefox. Chatting in GTalk in GMail with some magic words like "WASSUP". Then, I logoff both GMail accounts, filter any http content without "WASSUP" string. The result shows which HTTP request is the streaming channel. (Note: I have to logoff. Otherwise, never-ending HTTP would not show content in HttpWatch.) The result is interesting. The URL for stream channel is like: https://mail/channel/bind?VER=8&at=xn3j33vcvk39lkfq..... There is no surprise that GMail do Comet in IE with IFRAME. The Http content starts with " Originally, I guessed that GMail do Comet in Firefox with multipart XmlHttpRequest. To my surprise, the response header doesn't have "multipart/x-mixed-replace" header. The response headers are as below: HTTP/1.1 200 OK Content-Type: text/plain; charset=utf-8 Cache-Control: no-cache, no-store, max-age=0, must-revalidate Pragma: no-cache Expires: Fri, 01 Jan 1990 00:00:00 GMT Date: Sat, 20 Mar 2010 01:52:39 GMT X-Frame-Options: ALLOWALL Transfer-Encoding: chunked X-Content-Type-Options: nosniff Server: GSE X-XSS-Protection: 0 Unfortunately, the HttpWatch doesn't tell whether a HTTP request is from XmlHttpRequest or not. The content is not HTML but JSON. It looks like a response for XHR, but that would not work for Comet without multipart/x-mixed-replace, right? Is there any way else to figure out how GMail implement Comet? Thanks.

    Read the article

  • Having template function defination in cpp file - Not work for VC6

    - by Yan Cheng CHEOK
    I have the following source code : // main.cpp #include "a.h" int main() { A::push(100); } // a.cpp #include "a.h" template <class T> void A::push(T t) { } template void A::push(int t); // a.h #ifndef A_H class A { public: template <class T> static void push(T t); }; #endif The code compiled charming and no problem under VC2008. But when come to my beloved VC6, it give me error : main.obj : error LNK2001: unresolved external symbol "public: static void __cdecl A::push(int)" (?push@A@@SAXH@Z) Any workaround? I just want to ensure my function definition is re-inside cpp file.

    Read the article

  • Why JavaScript Statement "ga = ga || []" Works?

    - by Morgan Cheng
    Below javascript statements will cause error, if ga is not declared. if (ga) { alert(ga); } The error is: ga is not defined It looks undeclared variable cannot be recognized in bool expression. So, why below statement works? var ga = ga || []; To me, the ga is treated as bool value before "||". If it is false, expression after "||" is assigned to final ga.

    Read the article

  • BorderLayout problem with JSplitPane after adding JToolbar (Java)

    - by Alex Cheng
    Hello all. Problem: My program layout is fine, as below before I add JToolbar to BorderLayout.PAGE_START Here's a screenshot before JToolbar is added: Here's how it looked like after adding JToolbar: May I know what did I do wrong? Here's the code I used: //Create the text pane and configure it. textPane = new JTextPane(); -snipped code- JScrollPane scrollPane = new JScrollPane(textPane); scrollPane.setPreferredSize(new Dimension(300, 300)); //Create the text area for the status log and configure it. changeLog = new JTextArea(5, 30); changeLog.setEditable(false); JScrollPane scrollPaneForLog = new JScrollPane(changeLog); //Create a split pane for the change log and the text area. JSplitPane splitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT, scrollPane, scrollPaneForLog); splitPane.setOneTouchExpandable(true); //Create the status area. JPanel statusPane = new JPanel(new GridLayout(1, 1)); CaretListenerLabel caretListenerLabel = new CaretListenerLabel("Caret Status"); statusPane.add(caretListenerLabel); //Create the toolbar JToolBar toolBar = new JToolBar(); -snipped code- //Add the components. getContentPane().add(toolBar, BorderLayout.PAGE_START); getContentPane().add(splitPane, BorderLayout.CENTER); getContentPane().add(statusPane, BorderLayout.PAGE_END); //Set up the menu bar. actions = createActionTable(textPane); JMenu editMenu = createEditMenu(); JMenu styleMenu = createStyleMenu(); JMenuBar mb = new JMenuBar(); mb.add(editMenu); mb.add(styleMenu); setJMenuBar(mb); Please help, I'm new to GUI Building, and I don't feel like using Netbeans to drag and drop the UI for me... Thank you in advance.

    Read the article

  • Replace LinkedList element value through LinkedList.Enumerator

    - by Yan Cheng CHEOK
    I realize there are no way for me to replace value through LinkedList.Enumerator. For instead, I try to port the below Java code to C# // Java ListIterator<Double> itr1 = linkedList1.listIterator(); ListIterator<Double> itr2 = linkedList2.listIterator(); while(itr1.hasNext() && itr2.hasNext()){ Double d = itr1.next() + itr2.next(); itr1.set(d); } // C# LinkedList<Double>.Enumerator itr1 = linkedList1.GetEnumerator(); LinkedList<Double>.Enumerator itr2 = linkedList2.GetEnumerator(); while(itr1.MoveNext() && itr2.MoveNext()){ Double d = itr1.Current + itr2.Current; // Opps. Compilation error! itr1.Current = d; } Any other technique I can use?

    Read the article

  • How to implement Session timeout in Web Server Side?

    - by Morgan Cheng
    I beheld a web framework implementing in-memory session in this way. The session object is added to Cache with timeout. When the time is out, the session is removed from Cache automatically. To protect race condition, each request should acquire lock on given session object to proceed. Each request will "touch" the session in Cache to refresh the timeout. Everything looks fine, until this scenario is discovered. Say, one operation takes a long time, longer than timeout. Another request comes and wait on session lock which is currently hold by the long-time request. Finally, the long-time request is over, it releases the lock. But, since it already takes longer time than timeout, the session object is already removed from Cache. This is obvious because the only request holding the lock doesn't have a chance to "touch" the session object in cache. The second request gets the lock but cannot retrieve the expired Session object. Oops... To fix this issue, the second request has to re-create the Session object. But, this is just like digging a buried dead body from tomb and try to bring it back to life. It causes buggy code. I'm wondering what's the best way to implement timeout in session to handle such scenario. I know that current platform must have good session mechanism. I just want to know the under-the-hood how.

    Read the article

  • How does session_start lock in PHP?

    - by Morgan Cheng
    Originally, I just want to verify that session_start locks on session. So, I create a PHP file as below. Basically, if the pageview is even, the page sleeps for 10 seconds; if the pageview is odd, it doesn't. And, session_start is used to obtain the page view in $_SESSION. I tried to access the page in two tabs of one browser. It is not surprising that the first tab takes 10 seconds since I explicitly let it sleep. The second tab would not sleep, but it should be blocked by sessiont_start. That works as expected. To my surprise, the output of the second page shows that session_start takes almost no time. Actually, the whole page seems takes no time to load. But, the page does take 10 seconds to show in browser. obtained lock Cost time: 0.00016689300537109 Start 1269739162.1997 End 1269739162.1998 allover time elpased : 0.00032305717468262 The page views: 101 Does PHP extract session_start out of PHP page and execute it before other PHP statements? This is the code. <?php function float_time() { list($usec, $sec) = explode(' ', microtime()); return (float)$sec + (float)$usec; } $allover_start_time = float_time(); $start_time = float_time(); session_start(); echo "obtained lock<br/>"; $end_time = float_time(); $elapsed_time = $end_time - $start_time; echo "Cost time: $elapsed_time <br>"; echo "Start $start_time<br/>"; echo "End $end_time<br/>"; ob_flush(); flush(); if (isset($_SESSION['views'])) { $_SESSION['views'] += 1; } else { $_SESSION['views'] = 0; } if ($_SESSION['views'] % 2 == 0) { echo "sleep 10 seconds<br/>"; sleep(10); } $allover_end_time = float_time(); echo "allover time elpased : " . ($allover_end_time - $allover_start_time) . "<br/>"; echo "The page views: " . $_SESSION['views']; ?>

    Read the article

  • How to build Graceful Degradation AJAX web page?

    - by Morgan Cheng
    I want to build web page with "Graceful Degradation". That is, the web page functions even javascript is disabled. Now I have to make design decision on the format of AJAX response. If javascript is disabled, each HTTP request to server will generate HTML as response. The browser refreshes with the returned HTML. That's fine. If javascript is enabled, each AJAX HTTP request to server will generate ... well, JSON or HTML. If it is HTML, it is easy to implement. Just have javascript to replace part of page with the returned HTML. And, in server side, not much code change is needed. If it is JSON, then I have to implement JSON-to-html logic in javascript again which is almost duplicate of server side logic. Duplication is evil. I really don't like it. The benefit is that the bandwidth usage is better than HTML, which brings better performance. So, what's the best solution to Graceful Degradation? AJAX request better to return JSON or HTML?

    Read the article

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