How can I add a click event on the event and pass the day and event time as url variable to another page. Like when user click in the event I want to pass the date and event time to another page for processing. Any idea are welcome.
Thanks
I am involved in a project where I need to provide subset of our production data (for a date range) to one of my co-workers for trouble shooting.I would like to insert a scrubbed subset of the production data into a new database table that my co-worker can access. Please suggest best approach to achieve this.
My calendar resource is a nested resource under profile
map.resources :profiles, :has_many=>[:calendar]
I am trying to write a rspec spec for calendarcontroller
it "should use supplied date" do
get :show , :month = '09' , :year = '2010'
end
But i get an error stating
No route matches {:month="09",
:year="2010",
:controller="calendar",
:action="show"}
Any idea how i could get around this ?
Okay I use this script here to make a backup of my database:
mysqldump -u root -h localhost -pPASSWORD forums | gzip -9 > backup-$(date +%Y-%m-%d).sql.gz
This is used in a cron daily.
But I need to download this remotely or through a ftp program every day as well so I have a physical copy of it on my home hard drive, is this possible? I know it is, can anyone tell me a quick way to do it?
I mostly use Eclipse but have mentionned Netbeans on my cv. Are there any good concise and up-to-date tutorials apart from the official ones that could bring me up to speed on how to use the IDE efficiently (shortcuts, debugging, views ...)? This excludes programming tutorials as I don't really need them unless there's a special manipulation involved.
I'm developing a site which monitors user's date.
It uses the cURL over PHP.
It first gets authorized using cookie and then parses the required data.
My problem is that it needs to fire multiple requests to the server (for all registered users) and this may
Get me banned by the remote server.
I would like to know if there is something I could do to prevent being banned.
(This activity is legal - the users have provided their login information)
Thanks
I Have to calculate date time difference how to do that in PHP.
I need exact hours , mins and secs. any body have the scripts for that please give me :-P
i am building a simple PM for my personal website where a user can join and send message to the registered users on my website,
i am stuck in grouping and selecting latest user (by latest msg time) in INBOX page
my table :
id msg_from msg_to msg date in_del out_del
i want to show latest user's id each in a group
here is my SQL query :
SELECT ttalk.id, ttalk.msg_from, users.first_name, users.last_name
FROM ttalk
INNER JOIN users ON ttalk.msg_from = users.id
WHERE ttalk.msg_to = '$_SESSION[user_id]' AND ttalk.in_del='0'
GROUP BY ttalk.msg_from DESC LIMIT 500
Thanks in advance :-)
I have an query like:
SELECT id as OfferId FROM offers
WHERE concat(partycode, connectioncode) = ?
AND CURDATE() BETWEEN offer_start_date
AND offer_end_date AND id IN ("121211, 123341,151512,5145626 ");
Now I want to cache the results of this query using memcache and so my question is
How can I cache an query using memcache.
I am currently using CURDATE() which cannot be used if we want to implement caching and so how can I get current date functionality without using CURDATE() function ?
Hello.
I'm developing a Flash game in ActionScript 2, and the issue if that this game has to count the time securely.
It can't count the time from the Date class because the Flash Player takes the time from the local computer, and the user can change the local time so the time reported would be fake.
I haven't considerend to take the time from the server because there's a 3WH (3 way handshake) time and it would not be practical.
What do you sugest me??
I have to write mysql query for fetching result from my database with a specified date and code like ABH18 or ABH17 or ABH19.I write the querly like below.
select * from tbl_transaction where trans_name like 'ABH19%' or trans_name like 'ABH18%' or trans_name like 'ABH17%' or trans_name like 'ABH15%' and date_of_vazhipad='2013-11-20' and trans_status='Completed successfully.'
There are no result in the DB satisfying all above conditions.But i got result with different dates.But i want to ensure the date_of_vazhipad='2013-11-20' so that the query may work properly
Thanks in advance
Let's say I have something like 30-10-2025 12:53, how could I convert that to an NSDate? I guess there's some class that takes this plus an format string that tells it how the date looks as a string, so it can parse it... where must I look?
In my web.config I have the following:
<customErrors mode="RemoteOnly" defaultRedirect="/error.aspx"/>
When an error occurs, the user is redirected to /error.aspx?aspxerrorpath=/somepage where I can get user's name, name of the page, date, but... I can't get the error message!
I can get it via the OnException method, but then I won't be able to get the name of the page which is very important for me.
How can I get both the page and the error message?
What classes do you use to make string placeholders work?
String template = "You have %1 tickets for %d",
Brr object = new Brr(template, {new Integer(1), new Date()});
object.print();
I've a simple product installer for windows OS, which could be evaluated for a month. What are the techniques I can use so that this piece of software is not used after a month? I've seen that several s/w use system date to check it but it's very primitive and easily forge-able. I think a key based system based on registry or online verification could be an option but I don't know much about these.
Please help.
I'm cocking this up and it should be really simple but the value of sortdate is none (note im only doing this because converting a string to a date in Python is a bugger).
DateToPass = str(self.request.get('startdate'))
mybreak.startdate = DateToPass
faf = DateToPass.split('-')
sortdate = str(faf[2] + faf[1] + faf[0])
That should work? but its just being stored as null though the datetopass is being stored fine.
In my controller I have
def update_project_dates
p "It is end date....."
@user=User.find(params[:user])
@projects=Project.find_all_by_user_id(@user)
end
In the view page (only some part of the code is copied and pasted)
eventDrop: function()
{
$.ajax({
url:'/update_project_dates/',
success:function(data)
{
alert("Hello");
}
})
},
In my routes.rb I have mentioned
match '/update_project_dates' => 'users#update_project_dates', :method=> :get
get 'update_project_dates'
But When the ajax request goes, I get the routing error as
Routing Error
uninitialized constant UsersController
Where am I doing wrong here...Please help..
What I want to do is replace the "[replace]" in input string with the corresponding vaule in the replace array. The total number of values will change but there will always be the same number in the replace array as in input string. I have tried doing this with preg_replace and preg_replace_callback but I can't get the pattern right for [replace], I also tried using vsprintf but the % in <table width="100%"> was messing it up. All help is greatly appreciated!
Replace Array:
$array = array('value 1','value 2','value 3');
Input String
$string = '
<table width="100%">
<tr>
<td>Name:</td>
<td>[replace]</td>
</tr>
<tr>
<td>Date:</td>
<td>[replace]</td>
</tr>
<tr>
<td>Info:</td>
<td>[replace]</td>
</tr>
</table>
';
Desired Result
<table width="100%">
<tr>
<td>Name:</td>
<td>value 1</td>
</tr>
<tr>
<td>Date:</td>
<td>value 2</td>
</tr>
<tr>
<td>Info:</td>
<td>value 3</td>
</tr>
</table>
Sorry if SO is not the best place, but I have time-tracking enabled in JIRA and want to be able to generate a time-report for each user over a given date range. The only time-tracking report option I have is very limited and doesn't do what I want, is it possible through standard functionality or a free plugin perhaps?
hi friends,
I am working on linux enviournment and currently i am using svn's branch for developement purpose...but now i have to delete it and i have to work with main brach with today's date as a lebel like ..suppose my svn repostiory is "xyz" so now i want it to be like "xyz_production_lastproductionDate" than how to label it.Please share your opinion as i got stuck because of this...
Thanks in advance
hi,
i would like to create myRecordSet object that extends java.sql.ResultSet
and to implement a method that returns UTC date from sql statement.
how can i extend from java.sql.ResultSet, i need an example
10X
I'm trying to create a cronjob to back up my database every night before something catastrophic happens. It looks like this command should meet my needs:
pg_dump dbname | gzip > $(date +%Y-%m-%d).psql.gz
Except after running that, it expects me to type in a password. I can't do that if I run it from cron. How can I pass one in automatically?
Hi, I'm currently creating a subscription membership for my website.
I'm storing the date their subscription started in my database using time() (not extra parameters)
If not, how can i find the number of days between the current time() and the time() stored in the database?
Thanks!
I have just recently (like 2 days) started using XSLT documents with XML. I understand the basics and am able to generate a formatted document using an .XML document that references a separate .XSLT document.
My question, as in the subject, is "Is it possible to create a SINGLE, composite document that contains both the XML data and XSLT processing/formatting/styling and displays as formatted HTML?"
I am writing a desktop application in which I need to generate a formatted document on the fly from XML stored in the database. I want to do this without creating or referencing any actual physical files. I will generate a text string containing the XML/XSLT document and feed this to a WebBrowser component for formatted display.
Hopefully what I want to do doesn't totally go against the whole XML/XSLT methodology.
Any information, direction or suggestions will be greatly appreciated.