Search Results

Search found 2034 results on 82 pages for 'akhil pm'.

Page 61/82 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • What ASP.NET Web Config entries could limit certain file access by date and time?

    - by Dr. Zim
    What entries in a web.config could allow certain files to become publicly accessible after a certain date and time? Specifically, we have these files starting with AB_.jpg where the _ could be anything. We put them in a folder on April 27th for example, but they shouldn't be accessible until April 30th at 11:59:59 PM. I think the web.config in part works like Unix's FTP .htaccess file to define file security. For example, this web.config entry allows directory browsing: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <directoryBrowse enabled="true" /> </system.webServer> </configuration>

    Read the article

  • xpath help substring expression

    - by NA
    Hi i have a document from which i am trying to extract a date. But the problem is within the node along with the date their is some text too. Something like <div class="postHeader"> Posted on July 20, 2009 9:22 PM PDT </div> From this tag i just want the date item not the Posted on text. something like ./xhtml:div[@class = 'postHeader'] is getting everything. and to be precise, the document i have is basically a nodelist of this elements for eg i will get 10 nodes of these elements with different date values but to be worse the problem is sometime inside these tags some random other tags also pops us like anchors etc. Can i write a universal expath which will just get the date out of the div tag?

    Read the article

  • Where is the probem in this code (javascript)?

    - by user318068
    Hi I have a problem in my code. can anybody help me ... <html> <body> <script type="text/javascript"> <?php $conn = mysql_connect("localhost","root"); mysql_select_db("tr", $conn); $q = mysql_query("SELECT message FROM messages WHERE to_viewed = '0' "); if (mysql_num_rows($q)) { require('pm.php'); ?> var answer = confirm("you have new message "); <?php } ?> if (answer) { window.location = "http:>>>/"; } else { } //--> </script> </body> </html> Thanks .... The error that appears in my code is that the confirm is not working if I open my page (no output)

    Read the article

  • How can I decode UTF-16 data in Perl when I don't know the byte order?

    - by Geo
    If I open a file ( and specify an encoding directly ) : open(my $file,"<:encoding(UTF-16)","some.file") || die "error $!\n"; while(<$file>) { print "$_\n"; } close($file); I can read the file contents nicely. However, if I do: use Encode; open(my $file,"some.file") || die "error $!\n"; while(<$file>) { print decode("UTF-16",$_); } close($file); I get the following error: UTF-16:Unrecognised BOM d at F:/Perl/lib/Encode.pm line 174 How can I make it work with decode?

    Read the article

  • NSDateFormatter dateFromString for 24hr date gives wrong time

    - by krusty
    I want to add event to native calender.I am having problem in getting date accurate time from string. I have set locale,24 hr format. but still getting the same bug. EKEvent *event = [EKEvent eventWithEventStore:self.eventStore]; event.title=txtTitle.text; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; NSLocale *locale =[[[NSLocalealloc]initWithLocaleIdentifier:@"en_US_POSIX"]autorelease]; [dateFormatter setLocale:locale]; [dateFormatter setDateFormat:@"dd/MM/yyyy HH:mm"]; event.startDate=[dateFormatter dateFromString:lblStartDate.text]; My lblStartDate.text is:-10/02/2011 12:12 PM And event.startDate is getting set as:-2011-02-10 06:42:00 GMT Can anyone help???

    Read the article

  • Asp.net Date Binding Issue with Nulls

    - by Matthew Kruskamp
    I have a nullable date in my database. I am connecting to it with a LinqDataSource, and binding with a FormView. It allows you to place dates fine, but if you remove the date I need it to insert the null value to the db. It is instead throwing an exception. <asp:TextBox ID="TxtStartDate" runat="server" Text='<%# Bind("StartDate", "{0:MM/dd/yyyy}") %>' /> Works fine if you place a date in it, but if you delete the date out of it and save, you get System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. How do I make it send null?

    Read the article

  • Perl CGI script to not wait for a subprocess to complete

    - by Tyug
    Is it possible to continue displaying a CGI script's HTML without waiting for a child process to complete, yet the child process should stay alive when the CGI script is complete. Here's what I have, -- Display HTML page # html page set up... so header/other stuff #the -c, -h are params are just params system("perl subprocess.pm -c params -h 1 &"); #actually print the html page setup ... For some weird reason, it waits for the subprocess to finish before it outputs the html page even though I included the asynchronous system call for linux. It doesn't render the page immediately. Is it possible to print the html page without waiting for the subprocess to finish?

    Read the article

  • Conversion failed when converting the varchar value xxx to data type int error

    - by zurna
    I need to take data between certain dates. But I get the following error. AdsDateStarted : 03/18/2010 01:51:38.000 AM AdsDateENded : 09/13/2010 05:00:00.000 PM formatdate function converts today's date to 3/22/2010 format. SQL = "SELECT * FROM Ads" SQL = SQL & " WHERE AdsActive = 1 AND AdsAreasID = "& rtt &" AND CONVERT(VARCHAR(10), AdsDateStarted, 101) <= "& formatdate(Date()) &" AND CONVERT(VARCHAR(10), AdsDateEnded, 101) >= "& formatdate(Date()) &"" Set kdFonksiyon = objConn.Execute(SQL)

    Read the article

  • Modifying annotation attribute value at runtime in java

    - by Lici
    Hi folks: some methods in our model pojos have been annotated like this: @Column(name="cli_clipping_id", updatable=false, columnDefinition = "varchar(" + ModelUtils.ID_LENGTH + ") COLLATE utf8_bin") columnDefinition attribute is database vendor dependant, so when trying to drop schema in HSQLDB using Hibernate it fails: [ERROR] 16 jun 12:58:42.480 PM main [org.hibernate.tool.hbm2ddl.SchemaExport] Unexpected token: COLLATE in statement [create table cms.edi_editorial_obj (edi_uuid varchar(23) COLLATE ] To fix this, i'm thinking on this solution (but don't want to spend time if it isn't possible) , at runtime, for each method column annotated: Get @Column annotation Create a copy of the column annotation, setting columnDefinition null using javaassist. set column method annotation to the copy column annotation object overriding the old one (i don't know it this is possible) Is it possible to "hack" these methods this way? Any help would be much appreciated ...

    Read the article

  • Insertion failed error in MySQL.

    - by theband
    while($row=mysql_fetch_array($result2)){ //return $row['ProjectID']; $sql="INSERT INTO `tycodashboard` (ProjectID,DesignationID,ReqcompID,IntOrgID,FinishedTimeID,ProjectStatusID,PhaseID ) VALUES('{$row['ProjectID']}','$pm,'$req','$initiating,'$initiating','$ftime,'$ProjectStatus,'$Phase)"; $result=mysql_query($sql); if(!$result){ if(mysql_errno() == ER_DUP_ENTRY){ throw new Exception("INSERT FAILED.\n\nThe database already contains a Project with the Project Name \"$ldesc\", please pick another."); }else{ throw new Exception("INSERT FAILED.\n\n".mysql_error()); } } }//exits INSERT FAILED. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '3','2,'2','2,'2,'3)' at line 2

    Read the article

  • Android date/time displaying 0 instead of 12

    - by bEtTy Barnes
    I wonder what's wrong with my code below: // Assign hour set in the picker c.set( Calendar.HOUR, selectedHour ); c.set( Calendar.MINUTE, selectedMinute ); // For alternative times c.add( Calendar.HOUR, SUB_SIX_HOUR ); c.add( Calendar.MINUTE, SUB_FLAT_MINUTE ); hour = c.get( Calendar.HOUR ); minute = c.get( Calendar.MINUTE ); hour = c.get( Calendar.HOUR_OF_DAY ); StringBuilder sb4 = new StringBuilder(); if(hour>=12){ sb4.append(hour-12).append( ":" ).append(minute).append(" PM"); }else if(hour == 0){ sb4.append( "12" ).append( ":" ).append(minute).append( "AM" ); }else{ sb4.append(hour).append( ":" ).append(minute).append(" AM"); } alternative.setText( "Alternative times: " + sb3 + " (9 hours)" + sb4 + " (6 hours)" ); Please help me figure out how to display 12 instead of 0 when the calculated time is 12:00 midnight. Thanks!

    Read the article

  • DateTime.Parse with the "+" symbol

    - by Blah_Blah
    So I have a piece of code which parses and validates user input: DateTime myDateTime = DateTime.Parse(userInput,currentCulture); Current culture is being set (to en-ca or en-fr) and the user Input is always in ISO 8601 format "yyyy-MM-dd". If the user enters 1900-01-01 the date is created as expected. If the input is "1900-01+01" the date time created is 1899-12-31 6:00:00 PM No exception is thrown, the DateTime.Parse happily converts this to the wrong date. To make this work I am using DateTime.ParseExact(userInput,"yyyy-MM-dd",currentCulture). So my question is: whats up with the +01 or any + value? Am I missing something in ISO standard?

    Read the article

  • Why does Net::Twitter complain "HTTP::Message content not bytes"?

    - by Russell C.
    We have been using Perl's Net:Twitter CPAN module (version 3.12) and basic authentication (not OAuth) for almost a year now to syndicate updates from our site to our Twitter account. We just migrated to a new server last week and since the move our updates to Twitter have stopped and the following error is being reported whenever we try to post an update: HTTP::Message content not bytes at /usr/lib/perl5/site_perl/5.8.8/HTTP/Request/Common.pm line 90 Here is the code we're using the update our Twitter account: use Net::Twitter; my $twitter = Net::Twitter->new( traits => [qw/API::REST/], username => $username, password => $password, source => 'twitterfeed' ); my $result = $twitter->update($status); I have no idea what the issue is and was hoping that someone else has run into this issue and can provide a quick solution. Thanks in advance for your help!

    Read the article

  • How to: get Date, Time and Time zone from single DateTimePicker Control

    - by Vijay
    Hi All, I am developing an application in which I am trying to fetch Date, Time and Time Zone from single DateTimePicker control. Can anybody help to resolve this? Thanks in advance. EditV1: I am using .net framework 2.0. Now I am able to fetch Date and Time with Single DateTimepicker by setting its CustomFormat property as; dtpicker2.CustomFormat = "MM/dd/yyyy,hh:mm:ss" Now my problem is to fetch TimeZone. EditV2: Now here is one more issue, if I set DateTimePicker's format property to Time, it shows me something like 2:30:00 PM. I am storing this in a file and reasigning it to the DateTimePicker control. Can anybody help me out, how to achieve this?

    Read the article

  • unable to retract Sharepoint solutions

    - by BeraCim
    Hi all: I am having trouble retracting solutions in SharePoint 2007. I used both the retract solution button and the stsadm command in command line. The timer job was created in both instances, but it never gets run... it just sits in the timer job definition. The Status of the target just said "Retracting (scheduled at m/dd/yyyy MM:SS AM/PM)". I've waited for a long time and nothing happens. Has anyone experienced this before, and does anyone have a solution to this problem? Thanks.

    Read the article

  • Hibernate without primary keys generated by db?

    - by Michael Jones
    I'm building a data warehouse and want to use InfiniDB as the storage engine. However, it doesn't allow primary keys or foreign key constraints (or any constraints for that matter). Hibernate complains "The database returned no natively generated identity value" when I perform an insert. Each table is relational, and contains a unique integer column that was previously used as the primary key - I want to keep that, but just not have the constraint in the db that the column is the primary key. I'm assuming the problem is that Hibernate expects the db to return a generated key. Is it possible to override this behaviour so I can set the primary key field's value myself and keep Hibernate happy? -- edit -- Two of the mappings are as follows: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated Jun 1, 2010 2:49:51 PM by Hibernate Tools 3.2.1.GA --> <hibernate-mapping> <class name="com.example.project.Visitor" table="visitor" catalog="orwell"> <id name="id" type="java.lang.Long"> <column name="id" /> <generator class="identity" /> </id> <property name="firstSeen" type="timestamp"> <column name="first_seen" length="19" /> </property> <property name="lastSeen" type="timestamp"> <column name="last_seen" length="19" /> </property> <property name="sessionId" type="string"> <column name="session_id" length="26" unique="true" /> </property> <property name="userId" type="java.lang.Long"> <column name="user_id" /> </property> <set name="visits" inverse="true"> <key> <column name="visitor_id" /> </key> <one-to-many class="com.example.project.Visit" /> </set> </class> </hibernate-mapping> and: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated Jun 1, 2010 2:49:51 PM by Hibernate Tools 3.2.1.GA --> <hibernate-mapping> <class name="com.example.project.Visit" table="visit" catalog="orwell"> <id name="id" type="java.lang.Long"> <column name="id" /> <generator class="identity" /> </id> <many-to-one name="visitor" class="com.example.project.Visitor" fetch="join" cascade="all"> <column name="visitor_id" /> </many-to-one> <property name="visitId" type="string"> <column name="visit_id" length="20" unique="true" /> </property> <property name="startTime" type="timestamp"> <column name="start_time" length="19" /> </property> <property name="endTime" type="timestamp"> <column name="end_time" length="19" /> </property> <property name="userAgent" type="string"> <column name="user_agent" length="65535" /> </property> <set name="pageViews" inverse="true"> <key> <column name="visit_id" /> </key> <one-to-many class="com.example.project.PageView" /> </set> </class> </hibernate-mapping>

    Read the article

  • XSLT 1.0: Sorting by concating portions of date string

    - by dscl
    I'm trying to take XML data and sort elements by their data attribute. Unfortunately the dates come over in mm/dd/yyyy format and are not static lengths. (Jan = 1 instead of 01) So I believe the string will have to be parsed into three components and the month padded. The newly concated value (yyyymmdd) then sorted descending. Problem is I have no idea how to do this. Here is an example of the data <content date="1/13/2011 1:21:00 PM"> <collection vo="promotion"> <data vo="promotion" promotionid="64526" code="101P031" startdate="1/7/2011 12:00:00 AM"/> <data vo="promotion" promotionid="64646" code="101P026" startdate="2/19/2011 12:00:00 AM"/> <data vo="promotion" promotionid="64636" code="101P046" startdate="1/9/2011 12:00:00 AM"/> </collection> </content> Also can anyone please recommend a good book on learning XSLT? Thanks!

    Read the article

  • Decoding utf16 in Perl?

    - by Geo
    If I open a file ( and specify an encoding directly ) : open(my $file,"<:encoding(UTF-16)","some.file") || die "error $!\n"; while(<$file>) { print "$_\n"; } close($file); I can read the file contents nicely. However, if I do: use Encode; open(my $file,"some.file") || die "error $!\n"; while(<$file>) { print decode("UTF-16",$_); } close($file); I get the following error: UTF-16:Unrecognised BOM d at F:/Perl/lib/Encode.pm line 174 How can I make it work with decode?

    Read the article

  • How to set datetimepicker value to only date in (.NET)

    - by salhzmzm
    Hi I have DateTimePicker on my form and I set a value to the custom format property to "dd/MM/yyyy" ant when I run this code: MessageBox.Show(dateTimePicker1.Value.ToString()); I get this value : "3/26/2010 1:26 PM". How I can remove the time part from value. I know we can use this method dateTimePicker1.Value.ToShortDateString(); but I want to set the value property to this format "dd/MM/yyyy" so the output will be like this "26/3/2010", because I want to store the value in my DB (SQL) How I can do that?

    Read the article

  • JDOQL Any way to avoid multiple .contains() calls in the query when searching for the presence of on

    - by Finbarr
    The question pretty much says it all. If I have a class Class A public class A { ... private List<String> keys; ... } And I want to select all A instances from the DataStore that have atleast one of a List of keys, is there a better way of doing it than this: query = pm.newQuery(A.class); query.setFilter("keys.contains(:key1) || keys.contains(:key2) || keys.contains(:key3)"); List<A> results = (List<A>)query.execute(key1, key2, key3); This has not yet been implemented, so I am open to radical suggestions.

    Read the article

  • Perl - How to save an handler as an attribute in order to use in outside a module

    - by Zwik
    Ultimately, what I want to do is to start a process in a module and parse the output in real time in another script. What I want to do : Open a process Handler (IPC) Use this attribute outside of the Module How I'm trying to do it and fail : Open the process handler Save the handler in a module's attribute Use the attribute outside the module. Code example : #module.pm self->{PROCESS_HANDLER}; sub doSomething{ ... open( self->{PROCESS_HANDLER}, "run a .jar 2>&1 |" ); ... } #perlScript.pl my $module = new module(...); ... $module->doSomething(); ... while( $module->{PROCESS_HANDLER} ){ ... }

    Read the article

  • Problem of import DBI module - Complication Failed in require

    - by Winnie
    Hi All, I have a problem when I use the DBI module in scritp .pm. please help thanks you package CC; use DBI; use strict; use Alias; my $dbFile = 'XXXXXXXX.db'; my $db = DBI-connect("dbi:SQLite:$dbFile","","", {RaiseError =1, AutoCommit = 1})or "Unable to connect: $DBI::errstr\n"; use Alias qw(attr); our ($CURRENTOFFSET,@LANGUAGE); sub new { my $that = shift; my $class = ref($that)|| $that; my $self = { CURRENTOFFSET= undef, LANGUAGE = [] }; bless($self, $class); return $self; }

    Read the article

  • strtotime fails for valid date

    - by Funky Dude
    i am doing a project where i need to output date of orders. and i do the following inside a for loop <?php echo date('M d, Y g:i A',strtotime($order['Order']['created']));?> for some strange reason, sttotime returns false. (Dec 31, 1969 7:00 PM appears instead.) i made sure $order['Order']['created'] is not empty and is valid. even stranger, that exact same piece of code works fine on the other page, only different is that, that one is not in a loop. but that cant be the reason right? i set timezone to America/New_York and $order['Order']['created'] is mysql timestamp. var_dump on said variable string(27) "2010-06-16 20:12:51"

    Read the article

  • How do I find the current virtual terminal

    - by camh
    I am working around a problem in Ubuntu 10.04 where after resume, the mouse cursor disappears. This can be "fixed" by running chvt 1; chvt 7 in a script in /etc/pm/sleep.d, such that those commands run on thaw and resume. However, the X console is not always vt #7, so chvt 7 is wrong in those cases. What I would like to do is find out the current vt in the fix-up script and make sure I change back to that vt. How can I find the current vt? (tty(1) just reports "not a tty")

    Read the article

  • Why does Perl complain "Can't modify constant item in scalar assignment"?

    - by joe
    I have this Perl subroutine that is causing a problem: sub new { my $class = shift; my $ldap_obj = Net::LDAP->new( 'test.company.com' ) or die "$@"; my $self = { _ldap = $ldap_obj, _dn ='dc=users,dc=ldap,dc=company,dc=com', _dn_login = 'dc=login,dc=ldap,dc=company,dc=com', _description ='company', }; # Print all the values just for clarification. bless $self, $class; return $self; } what is wrong on this code : i got this error Can't modify constant item in scalar assignment at Core.pm line 12, near "$ldap_obj,"

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >