Hello,
Lets say I have a time 04:05 and the timezone is -0100 (GMT)
I want to calculate the new time which will be 03:05
Is there any function in python to do that calculcation ?
Thanks
I read an article around schema-less database which sounds cool. (http://bret.appspot.com/entry/how-friendfeed-uses-mysql)
But what isn't clear to me is how do they run search queries on this data? Since the data is in JSON format how do we look for it?
Hye Guys,
I'm busy working on a time series and am trying to find the commands that allow me to insert a quarter count variable. To keep things simple, the third quarter of 1995 (date my observations start) should be quarter -2, the fourth quarter of 1995 should be -1 etc etc uptill 2006 (should be somewhere around 45 by then). My dates are in date9 format, such as 20JUN04 etc..
Anyone who can help me with the commands I need t o let this work in SAS?
Thanks
If I were to build a newsletter emailing system, I will need to be able to generate reports on how many emails bounced, flagged as spam, unsubscribed, read vs. unread, click through rates etc....
So how do you keep track of user activity after the email has been sent? Am I right in assuming that you CAN NOT embed javascript code into emails to monitor user activity? How else do I gather data for my reports?
I have a series of points in a GraphicsPath; for our purpose lets assume its the outline of an uppercase B. I want to be able to be able to draw only the bottom portion that would resemble an uppercase L.
I'd like to be able to select a window of points from the GraphicsPath. Is there a handy way to do this without doing point interpolation?
I have a ubuntu machine I have setup. I installed apache2 and php5 on it. I can access the web server from other machines on the network via http://linux-server. I have subversion installed on it. I also have vsftpd installed on it so I can ftp to it from another computer on the network.
Myself and other users currently use dreamweaver to checkin-checkout files directly from our live site to make changes.
I want the connect to the linux server from pc. make the changes on the test server until ready and then pushed to the live site. I want to use subversion also into this workflow as well. but not sure what the best workflow is or how to set this up.
I have no experience with linux, svn, or even using a test server, the checkin/out we are currently doing is the way I have always done it.
I have hit many snags already just getting what I have setup because of my lack of knowledge in the area. Dreamweaver 5 has integration with subversion but I can't figure out how to get it to work.
I want to setup and create the best workflow possible.
I dont expect anyone to be able to give me an answer that will enlighten me enough to know everthing I need to know to do what I want to do (altough if possible that would be great) instead I am looking for maybe a knowledge path like answer. Like a general outline of what I need to do accompanied with links to learn how to do it. like read this book to learn linux, then read this article to learn svn, etc., then you should know what to do. I would be happy just getting it all setup, but I would like to know what I am actually doing while setting it up too.
So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataSource, so I added a SqlDataSource and the same thing happens. The aspx is as follows (the code-behind page is empty):
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Data Source=devsql32;Initial Catalog=Steam;Persist Security Info=True;"
ProviderName="System.Data.SqlClient"
SelectCommand="SELECT [LangID], [Code], [Name] FROM [Languages]" UpdateCommand="UPDATE [Languages] SET [Code]=@Code WHERE [LangID]=@LangId">
</asp:SqlDataSource>
<asp:GridView ID="_languageGridView" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="LangId"
DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="LangId" HeaderText="Id" ReadOnly="True" />
<asp:BoundField DataField="Code" HeaderText="Code" />
<asp:BoundField DataField="Name" HeaderText="Name" />
</Columns>
</asp:GridView>
<asp:LinqDataSource ID="_languageDataSource" ContextTypeName="GeneseeSurvey.SteamDatabaseDataContext" runat="server" TableName="Languages" EnableInsert="True" EnableUpdate="true" EnableDelete="true">
</asp:LinqDataSource>
What in the world am I missing here? This problem is driving me insane.
Hello,
Basically I have a Debian box running asterisk assigned an IP via DHCP with host-name XXX. My windows browser can resolve the host-name but if I use host-name in X-Lite or my SPA922 phone it fails to resolve. Is there any way of getting this to work without depending on the router or assigning a static IP (request is to make it portable). I was thinking zero-conf but am unsure (box has limited HDD too). Any help is most appreciated.
Is there a way a Web site can learn something about your browsing activities outside of this Web site from an HTTP request sent to the Web site by your browser?
Using simplexml_load_string() how do I get "ForgotPassword" from the following XML?
<?xml version="1.0" encoding="utf-8"?>
<ForgotPassword>
<version>1.0</version>
<authentication>
<login>username</login>
<apikey>login</apikey>
</authentication>
<parameters>
<emailAddress>[email protected]</emailAddress>
</parameters>
</ForgotPassword>
I have a table that looks like this:
Timestamp Event User
================ ===== =====
1/1/2010 1:00 PM 100 John
1/1/2010 1:00 PM 103 Mark
1/2/2010 2:00 PM 100 John
1/2/2010 2:05 PM 100 Bill
1/2/2010 2:10 PM 103 Frank
I want to write a query that shows the events for each day and a count for those events. Something like:
Date Event EventCount
======== ===== ==========
1/1/2010 100 1
1/1/2010 103 1
1/2/2010 100 2
1/2/2010 103 1
The database is SQL Server Compact, so it doesn't support all the features of the full SQL Server. The query I have written so far is
SELECT DATEADD(dd, DATEDIFF(dd, 0, Timestamp), 0) as Date, Event, Count(Event) as EventCount
FROM Log
GROUP BY Timestamp, Event
This almost works, but EventCount is always 1. How can I get SQL Server to return the correct counts? All fields are mandatory.
I'm creating a text editor for a domain specific language. I'm using the WPF RichTextBox as the basic control. I don't know how to gracefully include line numbering. Does anyone know of any examples?
I have the following ant task:
<loadfile property="proj.version" srcfile="build.py">
<filterchain>
<striplinecomments>
<comment value="#"/>
</striplinecomments>
<linecontains>
<contains value="Version" />
</linecontains>
</filterchain>
</loadfile>
<echo message="${proj.version}" />
And the output is
[echo] config ["Version"] = "v1.0.10-r4.2"
How do I then use a tokenizer to get only v1.0.10-r4.2, the equivalent of
| cut -d'"' -f4
I found a nice article:
http://911-need-code-help.blogspot.com/2012/07/youtube-iframe-embeds-video-playlist-and-html5.html
I am using the last option (Custom Playlist). But how to edit the embed code:
<iframe width="560" height="315" src="http://www.youtube.com/embed/T0Jqdjbed40?playlist=SyoA4LXQco4,6l6PPvUhR4c" frameborder="0" allowfullscreen></iframe>
in order to show my playlist name above thumbinails?
i tried to add listname="name", name="name", list="name" but it don't work
text = text.replace(/\.(?=[a-zA-Z0-9\[])/g, "<span style='background-color: #FF00FF'>.</span>");
I want to use javascript to highlight all full stops that is followed by letters, numbers and [. The above expression works for letters and numbers, but not bracket. Any idea what's wrong?
I have a bare-bone express application, exactly the one that is created with the express command.
I have installed socket.io and attached it to my server, like this:
var app = express(),
server = http.createServer(app),
io = io.listen(server);
server.listen(8000);
Now, I also have the routes files, which is called like this:
app.get('/', routes.index);
Inside this module I have the following function:
exports.index = function(req, res){
socket.emit('news', { message: "foo" });
};
This obviously leads to a 500 reference error, because the routes file is an exportable module, and obviously has no idea what the socket is, as it is located in the app.js file.
Is there a way I can access this socket object from this, or any other file? Please note that it is attached to the express generated app.
extra: what about getting/setting session data?
Thanks in advance.
I want to roll a beta test session for my iphone and ipad application with general public. Want to get some feedback before officially launching the app. Does anyone know of a a good community that I can tap into?
I found http://ibetatest.com via google but not sure how good/bad it is?
Dear friends,
I've been searching for a hosting solution for a grails application.
I've read some very good comments on slicehost, but not much about linode.
could some one with the experiences of either of them share your insights please?
thanks.
I am trying to compile a library originally written for Cocoa. Things are good until it looks for the function marg_setValue(). It says there is a syntax error before char in
marg_setValue(argumentList,argumentOffset,char,(char)lua_toboolean(state,luaArgument));
(it's talking about the third argument, not (char) )
I am trying to port LuaObjectiveCBridge to the iPhone. It has two choices, either using Runtime or Foundation. I have discovered there are some problems with foundation so I am trying runtime. But the compiler is not co-operating.
Hi :)
I'm developing a .NET app, which needs to run both on Azure and on regular Windows Servers(2003). It needs to store a few GB of data and SQL Azure is too expensive for me, so I'll use Azure tables in the cloud version. Can you recommend a storage solution, which will run on standalone servers and have an API and behavior similar to Azure tables? From what I've seen Server AppFabric does not include Tables.
TIA
When I change on proxy-server page from cnn.com (I add javascript, that call document.location), result of the document.location is some url of advertisement: http://ads.cnn.com/html.ng/site=cnn_international&cnn_intl_pagetype=mmst&cnn_intl_position=336x850_rgt&cnn_intl_rollup=asia&page.allowcompete=yes¶ms.styles=fs&tile=5656033441721&domId=894131
and not current url:http://edition.cnn.com/2010/WORLD/asiapcf/04/13/soccer.world.cup.pakistan/index.html?hpt=C1
Do you know, where can be problem?
Hi,
Is there a way in CSS or JQuery where I can dynamically change the background of li tags so they get slightly lighter for each element until it gets to white.
For example say I had a list of 10 li elements. The first would have a red (#ff0000) background, the next one would then be a lighter shade of red, and so on and so on until we got to the last one which would have a background of white (#FFFFFF)
The list can be any length and i just want the background colour to go from one colour e.g. red to another colour e.g. white. My site uses JQuery so if I have to use that I don't mind.
Thanks
All,
We are running a J2EE application on WebLogic server 9.2 MP2 with a jrockit 64-bit JVM (27.3.1) on Solaris 10.
We call use runtime.exec to call an executable called jfmerge to create PDF documents.
We have found that in Solaris, when runtime.exec is called, a duplicate JVM is temporarily spawned to kick off the jfmerge process. While this is inefficient (our JVM is 5 GB, thus the duplicated shell JVM is also 5 GB), the major problem lies in the fact that when there is heavy load on this functionality (PDF generation) in our application, sometimes the duplicated JVM never exits.
When the JVM hangs, the servers create large issues (extreme application slowness and terminated user sessions) as the entire duplicate JVM get's all of its 5 GB of process size written to disk swap.
We have noted the following hung thread correlated with a hung JVM process until the process is manually killed:
"[STUCK] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'" id=3463 idx=0x158 tid=3460 prio=1 alive, in native, daemon
at jrockit/io/FileNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BII)I(Native Method)
at jrockit/io/FileNativeIO.readBytes(FileNativeIO.java:30)
at java/io/FileInputStream.readBytes([BII)I(FileInputStream.java)
at java/io/FileInputStream.read(FileInputStream.java:194)
at java/lang/UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:227)
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
at java/io/BufferedInputStream.read(BufferedInputStream.java:235)
^-- Holding lock: java/io/BufferedInputStream@0xfffffffec6510470[thin lock]
at gov/v3/common/formgeneration/sessionbean/FormsBean.getProcessStatus(FormsBean.java:809)
at gov/v3/common/formgeneration/sessionbean/FormsBean.createPDF(FormsBean.java:750)
at gov/v3/common/formgeneration/sessionbean/FormsBean.getTemplateDetails(FormsBean.java:450)
at gov/v3/common/formgeneration/sessionbean/FormsBean.generateSinglePDF(FormsBean.java:1371)
at gov/v3/common/formgeneration/sessionbean/FormsBean.generatePDF(FormsBean.java:263)
at gov/v3/common/formgeneration/sessionbean/FormsBean.endorseDocument(FormsBean.java:2377)
at gov/v3/common/formgeneration/sessionbean/Forms_qaco28_EOImpl.endorseDocument(Forms_qaco28_EOImpl.java:214)
at gov/v3/delegates/common/FormsAndNoticesDelegate.endorseDocument(FormsAndNoticesDelegate.java:128)
at gov/v3/actions/common/EndorseDocumentAction.executeRequest(EndorseDocumentAction.java:68)
at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.dispatchToExecuteMethod(V3CommonDispatchAction.java:532)
at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.executeBaseAction(V3CommonDispatchAction.java:336)
at gov/v3/fwk/controller/struts/action/V3BaseDispatchAction.execute(V3BaseDispatchAction.java:69)
at org/apache/struts/action/RequestProcessor.processActionPerform(RequestProcessor.java:484)
at gov/v3/fwk/controller/struts/requestprocessor/V3TilesRequestProcessor.processActionPerform(V3TilesRequestProcessor.java:384)
at org/apache/struts/action/RequestProcessor.process(RequestProcessor.java:274)
at org/apache/struts/action/ActionServlet.process(ActionServlet.java:1482)
at org/apache/struts/action/ActionServlet.doGet(ActionServlet.java:507)
at gov/v3/fwk/controller/struts/servlet/V3ControllerServlet.doGet(V3ControllerServlet.java:110)
at javax/servlet/http/HttpServlet.service(HttpServlet.java:743)
at javax/servlet/http/HttpServlet.service(HttpServlet.java:856)
at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3231)
at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:121)
at weblogic/servlet/internal/WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
at weblogic/work/ExecuteThread.run(ExecuteThread.java:181)
at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
-- end of trace
We would like to do a couple of things:
1.) Prevent the spawning of a duplicate JVM, as we do not need any of it's functions when executing the simple jfmerge executable, and it creates massive overhead.
2.) In the short term at least prevent this duplicate JVM from handing indefinitely.