Search Results

Search found 391 results on 16 pages for 'dexter yy'.

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

  • convert String "11-10-10 12:00:00" into Date Object

    - by Mahendra Athneria
    Hi, I want to convert String "11-10-10 12:00:00" into Date object but i am not able to do so. can you please help me out? below is the code snippet. i have the Date obj which has the value = Mon Oct 11 00:00:00 IST 2010 DateFormat newDateFormat = new SimpleDateFormat("dd-MM-yy hh:mm:ss"); String strDate = newDateFormat.format(tempDate); //**i got strDate as strDate is : 11-10-10 12:00:00** DateFormat newDateFormat1 = new SimpleDateFormat("dd-MM-yy hh:mm:ss"); try { tempDate = newDateFormat1.parse(strDate); // **getting tempDate as - Mon Oct 11 00:00:00 IST 2010** } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } Can someone help me to solve this issue? Regards, Mahendra Athneria Mumbai, India

    Read the article

  • Perl: Compare and edit underlying structure in hash

    - by Mahfuzur Rahman Pallab
    I have a hash of complex structure and I want to perform a search and replace. The first hash is like the following: $VAR1 = { abc => { 123 => ["xx", "yy", "zy"], 456 => ["ab", "cd", "ef"] }, def => { 659 => ["wx", "yg", "kl"], 456 => ["as", "sd", "df"] }, mno => { 987 => ["lk", "dm", "sd"] }, } and I want to iteratively search for all '123'/'456' elements, and if a match is found, I need to do a comparison of the sublayer, i.e. of ['ab','cd','ef'] and ['as','sd','df'] and in this case, keep only the one with ['ab','cd','ef']. So the output will be as follows: $VAR1 = { abc => { 123 => ["xx", "yy", "zy"], 456 => ["ab", "cd", "ef"] }, def => { 659 => ["wx", "yg", "kl"] }, mno => { 987 => ["lk", "dm", "sd"] }, } So the deletion is based on the substructure, and not index. How can it be done? Thanks for the help!! Lets assume that I will declare the values to be kept, i.e. I will keep 456 = ["ab", "cd", "ef"] based on a predeclared value of ["ab", "cd", "ef"] and delete any other instance of 456 anywhere else. The search has to be for every key. so the code will go through the hash, first taking 123 = ["xx", "yy", "zy"] and compare it against itself throughout the rest of the hash, if no match is found, do nothing. If a match is found, like in the case of 456 = ["ab", "cd", "ef"], it will compare the two, and as I have said that in case of a match the one with ["ab", "cd", "ef"] would be kept, it will keep 456 = ["ab", "cd", "ef"] and discard any other instances of 456 anywhere else in the hash, i.e. it will delete 456 = ["as", "sd", "df"] in this case.

    Read the article

  • latex table reference

    - by Tim
    Hi, I wrote a long table with a label in a tex file and \input it into my main tex file. The reference in the main tex file to the table, however, does not show the numbering of the table but the one of the next table that are written directly in the main tex file. All long tables that are written directly in the main tex file have correct references. How to fix my problem? Must the label be defined in the same tex file as its reference? Thanks and regards! The label is \label{tab:yy}, and the reference is \ref{tab:yy}, and every table has a distinct label.

    Read the article

  • Drupal install on remote mysql

    - by user1448660
    I am trying to install drupal on remote mysql server. I have created the user in mysql and granted the the privileges. I am able to connect through command line from my web server like this "mysql -u xxxx -h 10.xxx.yy.zz3 -p". But when I tried to install drupal I get "SQLSTATE[28000] [1045] Access denied for user 'xxxx'@'localhost'". I have given the privileges for "xxxx"@"10.xxx.yy.zz3" but drupal appends localhost instead of IP to user name. I have changed settings.php to mysql server IP. What am I missing?

    Read the article

  • ActiveRecord date format

    - by Mongus Pong
    I've run into a spot of bother with date formats in our Rails application. I have a date field in our view which I want to be formatted as dd/mm/yy. This is how the user will expect to enter their dates, and the datepicker control uses this format. However, Active Record seems to be expecting mm/dd/yy. If I enter 01/03/2010, this gets put in as 03 January 2010. If I enter 25/03/2010, this gets put in a null. How do I get ActiveRecord to expect Her Majesties date format?

    Read the article

  • HandsOnTable - using date functions with methods

    - by briansol
    I have a function used on the datepicker to limit dates selected to the first of the month... I invoke it by setting a class and listener, such as: $( ".datepickfom" ).datepicker( { beforeShowDay: fom, showOn: "both", buttonImage: "/images/calendar.png", buttonImageOnly: true, changeMonth: true, changeYear: true, dateFormat: "m/d/yy", yearRange: "-25:+100", constrainInput: true } ); the fom call: function fom(date){ if (date.getDate() != 1) { return [false, "", "Specify 1st of Month"]; } return [true, ""]; } This works great for regular forms. I'm looking to extend this functionality to the HandsOnTable 'date' cell data types. var $container_1 = $("#datatable_1"); var handsontable_1 = $container_1.data('handsontable'); $("#datatable_1").handsontable( { columns: [ {}, {}, { type: 'date', dateFormat: 'm/d/yy' }, {}, { type: 'dropdown', source: ["","Y","N"] }, {}, {} ] }); This also works as it should, but the date lets me pick other dates besides the first. Is there a way to attach the beforeShowDay option to the HOT cell call as well?

    Read the article

  • Remove gradients from elementary theme?

    - by John
    I really don't like the gradients in the elementary theme, and I was wondering if there were a way to remove them, from applications like Nautilus-Elementary, Postler, Dexter, etc. I've tried commenting out the Apps/[Application].rc in /usr/share/themes/elementary/gtk-2.0/gtkrc but it doesn't work, still leaves the gradients in their place. I'm a big fan of the other controls in the theme; the scroll bar, the way it borders gedit and the buttons, and I'd like to keep these features, but I don't like the way it styles its windows. Thanks for any help, as always!

    Read the article

  • How can I remove gradients from Elementary theme?

    - by John
    I really don't like the gradients in the Elementary theme and I was wondering if there is a way to remove them from applications like Nautilus-Elementary, Postler, Dexter, etc. I've tried commenting out the Apps/[Application].rc in /usr/share/themes/elementary/gtk-2.0/gtkrc but it doesn't work. It still leaves the gradients in their place. I'm a big fan of the other controls in the theme: the scroll bar, the way it borders gedit and the buttons, and I'd like to keep these features, but I don't like the way it styles its windows. EDIT: The gradients I'm talking about are the ones at the top of the window. Some examples: Nautilus-Elementary: Postler: Rhythmbbox: Transmission: I'd like to create a sort of matte look, similar to this, which was done using Orta: Nautilus-Elementary: Postler: Rhythmbox: Transmission: I'd like a flat color, preferably without the line separating the top part of the application with the bottom.

    Read the article

  • SQL SERVER – Display Datetime in Specific Format – SQL in Sixty Seconds #033 – Video

    - by pinaldave
    A very common requirement of developers is to format datetime to their specific need. Every geographic location has different need of the date formats. Some countries follow the standard of mm/dd/yy and some countries as dd/mm/yy. The need of developer changes as geographic location changes. In SQL Server there are various functions to aid this requirement. There is function CAST, which developers have been using for a long time as well function CONVERT which is a more enhanced version of CAST. In the latest version of SQL Server 2012 a new function FORMAT is introduced as well. In this SQL in Sixty Seconds video we cover two different methods to display the datetime in specific format. 1) CONVERT function and 2) FORMAT function. Let me know what you think of this video. Here is the script which is used in the video: -- http://blog.SQLAuthority.com -- SQL Server 2000/2005/2008/2012 onwards -- Datetime SELECT CONVERT(VARCHAR(30),GETDATE()) AS DateConvert; SELECT CONVERT(VARCHAR(30),GETDATE(),10) AS DateConvert; SELECT CONVERT(VARCHAR(30),GETDATE(),110) AS DateConvert; SELECT CONVERT(VARCHAR(30),GETDATE(),5) AS DateConvert; SELECT CONVERT(VARCHAR(30),GETDATE(),105) AS DateConvert; SELECT CONVERT(VARCHAR(30),GETDATE(),113) AS DateConvert; SELECT CONVERT(VARCHAR(30),GETDATE(),114) AS DateConvert; GO -- SQL Server 2012 onwards -- Various format of Datetime SELECT CONVERT(VARCHAR(30),GETDATE(),113) AS DateConvert; SELECT FORMAT ( GETDATE(), 'dd mon yyyy HH:m:ss:mmm', 'en-US' ) AS DateConvert; SELECT CONVERT(VARCHAR(30),GETDATE(),114) AS DateConvert; SELECT FORMAT ( GETDATE(), 'HH:m:ss:mmm', 'en-US' ) AS DateConvert; GO -- Specific usage of Format function SELECT FORMAT(GETDATE(), N'"Current Time is "dddd MMMM dd, yyyy', 'en-US') AS CurrentTimeString; This video discusses CONVERT and FORMAT in simple manner but the subject is much deeper and there are lots of information to cover along with it. I strongly suggest that you go over related blog posts in next section as there are wealth of knowledge discussed there. Related Tips in SQL in Sixty Seconds: Get Date and Time From Current DateTime – SQL in Sixty Seconds #025 Retrieve – Select Only Date Part From DateTime – Best Practice Get Time in Hour:Minute Format from a Datetime – Get Date Part Only from Datetime DATE and TIME in SQL Server 2008 Function to Round Up Time to Nearest Minutes Interval Get Date Time in Any Format – UDF – User Defined Functions Retrieve – Select Only Date Part From DateTime – Best Practice – Part 2 Difference Between DATETIME and DATETIME2 Saturday Fun Puzzle with SQL Server DATETIME2 and CAST What would you like to see in the next SQL in Sixty Seconds video? Reference: Pinal Dave (http://blog.sqlauthority.com)   Filed under: Database, Pinal Dave, PostADay, SQL, SQL Authority, SQL in Sixty Seconds, SQL Query, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology, Video Tagged: Excel

    Read the article

  • How to replace the SharePoint date calendar control with more user friendly jQuery calendar control

    - by ybbest
    When you use the SharePoint date and time type for date of birth field, you will notice that the calendar control is extremely non-user-friendly. You can only navigate month by month as shown below. To resolve the issue, you can customize the list form page using SharePoint designer and replace the OOB calendar control with popular jQuery control. The solution works for both SharePoint 2010,2013 and office365. Here are the steps for how to achieve this. 1. Open SharePoint designer and create a New List Form called customNew and set as default form for the selected type. 2. Open style library in file explorer and copy jQuery and jQuery UI files into the style library in SharePoint site. You can download the jQuery and jQuery UI from the web and the content of the contactPersonCustomNewForm.js is as below. I use the dd/mm/yy format as my locale in Regional Settings is English(New Zealand). You need to change this if you live in another country with different date format $(document).ready(function() { $("img#ctl00_m_g_540b9a50_52dc_4400_a58d_1db99555fddf_ff41_ctl00_ctl00_DateTimeField_DateTimeFieldDateDatePickerImage").parent().hide(); $("img#ctl00_m_g_540b9a50_52dc_4400_a58d_1db99555fddf_ff41_ctl00_ctl00_DateTimeField_DateTimeFieldDateDatePickerImage").hide(); $("input#ctl00_m_g_540b9a50_52dc_4400_a58d_1db99555fddf_ff41_ctl00_ctl00_DateTimeField_DateTimeFieldDate").datepicker({ changeMonth:true, changeYear:true, showOn: "button", buttonImage: "/_layouts/images/calendar.gif", buttonImageOnly: true, defaultDate:"01/01/1970", yearRange: "c-20:c+20", dateFormat: "dd/mm/yy" }); }); In order to get the image and textbox selector above , you can open IE developer toolbar(click F12) and find the control ID as below: 3. Open SharePoint designer and edit the newly created New List Form customNew.aspx in advance mode. Then copy and paste the following links in the PlaceHolderAdditionalPageHead. <SharePoint:CssRegistration name="<%$SPUrl:~SiteCollection/Style Library/themes/ui-lightness/jquery-ui.css%>" runat="server"/> <SharePoint:ScriptLink language="javascript" name="~sitecollection/Style Library/jquery-1.10.2.js" Defer="false" runat="server"/> <SharePoint:ScriptLink language="javascript" name="~sitecollection/Style Library/jquery-ui-1.10.4.custom.min.js" Defer="false" runat="server"/> <SharePoint:ScriptLink language="javascript" name="~sitecollection/Style Library/contactPersonCustomNewForm.js" Defer="false" runat="server"/>   4. Now go to the list and click add, you will see the new calendar control as shown below

    Read the article

  • Generating tileable terrain using Perlin Noise [duplicate]

    - by terrorcell
    This question already has an answer here: How do you generate tileable Perlin noise? 9 answers I'm having trouble figuring out the solution to this particular algorithm. I'm using the Perlin Noise implementation from: https://code.google.com/p/mikeralib/source/browse/trunk/Mikera/src/main/java/mikera/math/PerlinNoise.java Here's what I have so far: for (Chunk chunk : chunks) { PerlinNoise noise = new PerlinNoise(); for (int y = 0; y < CHUNK_SIZE_HEIGHT; ++y) { for (int x = 0; x < CHUNK_SIZE_WIDTH; ++x) { int index = get1DIndex(y, CHUNK_SIZE_WIDTH, x); float val = 0; for (int i = 2; i <= 32; i *= i) { double n = noise.tileableNoise2(i * x / (float)CHUNK_SIZE_WIDTH, i * y / (float)CHUNK_SIZE_HEIGHT, CHUNK_SIZE_WIDTH, CHUNK_SIZE_HEIGHT); val += n / i; } // chunk tile at [index] gets set to the colour 'val' } } } Which produces something like this: Each chunk is made up of CHUNK_SIZE number of tiles, and each tile has a TILE_SIZE_WIDTH/HEIGHT. I think it has something to do with the inner-most for loop and the x/y co-ords given to the noise function, but I could be wrong. Solved: PerlinNoise noise = new PerlinNoise(); for (Chunk chunk : chunks) { for (int y = 0; y < CHUNK_SIZE_HEIGHT; ++y) { for (int x = 0; x < CHUNK_SIZE_WIDTH; ++x) { int index = get1DIndex(y, CHUNK_SIZE_WIDTH, x); float val = 0; float xx = x * TILE_SIZE_WIDTH + chunk.x; float yy = y * TILE_SIZE_HEIGHT + chunk.h; int w = CHUNK_SIZE_WIDTH * TILE_SIZE_WIDTH; int h = CHUNK_SIZE_HEIGHT * TILE_SIZE_HEIGHT; for (int i = 2; i <= 32; i *= i) { double n = noise.tileableNoise2(i * xx / (float)w, i * yy / (float)h, w, h); val += n / i; } // chunk tile at [index] gets set to the colour 'val' } } }

    Read the article

  • Force netsh/arp binding multicast IP addres with specific MAC address

    - by Olivier
    I would like to setup an binding from an IP address to a MAC address using netsh. Goal is to bond an IP address which is a multicast address (224.224.x.y) to a given MAC address (which is NOT the calculated one from the multicast IP address : 01:00:5e:X:Y:Z It used to work with Windows XP (was it a bug that used to be "perfect" for my needs?), but Windows 7/8/8.1 forces the MAC address to the calculated one instead of letting me put what I want! (http://nettools.aqwnet.com/ipmaccalc/ipmaccalc.php shows MAC address calculation for multicast IP address) Thus I'm doing the following. Listing existing mappings: netsh.exe interface ip show neighbors "Ethernet" Interface 12 : Ethernet Internet address Physical address Type 224.0.0.22 01-00-5e-XX-YY-ZZ static Then adding my interface mapping manually: netsh.exe interface ip add neighbors "Ethernet" "224.xxx.yyy.zzz" "00-80-EE-UU-VV-WW" Finally, listing again my mappings: netsh.exe interface ip show neighbors "Ethernet" Interface 12 : Ethernet Internet address Physical address Type 224.0.0.22 01-00-5e-XX-YY-ZZ static **224.xxx.yyy.zzz 01-00-5e-UU-VV-WW static** As you can see, the MAC Address of the second entry (the one I just made) has been dynamically replaced by the calculated MAC Address corresponding to my IP Address... Calculation is done as follow (and displayed in hexa): UU=(xxx-128) VV=yyy WW=zzz But I don't want that behavior. My IP address and MAC address cannot be changed, and I must associate them accurately. Does anybody know how to disable MAC address substitution/calculation in netsh? Thanks, Olivier.

    Read the article

  • NAS is intermittently inaccessible

    - by Natalie
    Model: QNAP TS-410 Turbo NAS Firmware version: 3.2.5 Build 0409T Issue: Each day, users connect to share folders on the NAS system and have read/write permissions for the share folders to which they need access. However, it often asks them for their log-in details and - when provided with right (or wrong) credentials for a user with read/write permissions - it denies them access. I've checked the logs and I keep seeing the following warnings: 2011-11-23 16:26:29 System 127.0.0.1 localhost Re-launch process [rpc.mountd]. 2011-11-23 16:26:16 System 127.0.0.1 localhost Re-launch process [proftpd]. 2011-11-23 16:25:30 System 127.0.0.1 localhost Re-launch process [rpc.mountd]. 2011-11-23 16:25:15 System 127.0.0.1 localhost Re-launch process [proftpd]. 2011-11-23 16:24:33 System 127.0.0.1 localhost Re-launch process [rpc.mountd]. 2011-11-23 16:24:21 System 127.0.0.1 localhost Re-launch process [proftpd]. 2011-11-23 16:23:37 System 127.0.0.1 localhost Re-launch process [rpc.mountd]. 2011-11-23 16:23:25 System 127.0.0.1 localhost Re-launch process [proftpd]. They seem to occur per minute but I am uncertain about whether or not they are relevant to this issue. The "Login failed" warning has also displayed in the system connection logs which tells me when and which user was unable to log in, as shown below: 2011-11-22 16:11:07 Administrator 192.168.0.xx computer-01 SAMBA --- Login Fail 2011-11-22 16:11:07 Administrator 192.168.0.xx computer-01 SAMBA --- Login Fail 2011-11-22 16:11:06 Administrator 192.168.0.xx computer-01 SAMBA --- Login Fail 2011-11-22 13:46:14 administrator 192.168.0.yy --- HTTP Administration Login Fail 2011-11-22 13:46:09 administrator 192.168.0.yy --- HTTP Administration Login Fail 2011-11-21 15:17:22 user 192.168.0.zz computer-02 SAMBA --- Login Fail 2011-11-21 15:17:18 user 192.168.0.zz computer-02 SAMBA --- Login Fail 2011-11-21 15:17:17 user 192.168.0.zz computer-02 SAMBA --- Login Fail I've researched this on Google and the QNAP forums and have not come up with a resolution as yet.

    Read the article

  • network routing between mac & virtual XP

    - by Kevin
    Hi - I have a max laptop running XP inside VirtualBox. The network is setup to be a "Bridged Adapter" so that the IPs for both the host & guest OS's are assigned by my wireless routed. My guest XP has Nortel VPN connecting to corporate lan. When this is connected, I want to allow my host Mac OS to access the corporate network. But I'm struggling. Without Nortel VPN running, I can change routing on the mac so all traffic is sent via the guest XP - this works. But once I activate the VPN, this no longer works. If I try to change the routing on mac to run through the IP address assigned to the Nortel adapter, I get a "Network is unreachable" error. Below is the output from ipconfig /all on the guest XP OS. I'm beginning to believe that what I want to do is not possible because of the way Nortel secure the VPN - but before I give up I thought I'd post the problem here. Thanks, Kevin z:\eclipseworkspace\RESMobileSuite\trunk>ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : zzzz-3177b42dd0 Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Unknown IP Routing Enabled. . . . . . . . : Yes WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : zzzz.zzz Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : AMD PCNET Family PCI Ethernet Adapter Physical Address. . . . . . . . . : 08-00-XX-XX-XX-XX Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.3 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 192.168.1.1 Lease Obtained. . . . . . . . . . : 30 April 2010 12:22:02 Lease Expires . . . . . . . . . . : 01 May 2010 12:22:02 Ethernet adapter {8EB7A442-9683-45FB-A602-56110A4B3434}: Connection-specific DNS Suffix . : zzzz.zz Description . . . . . . . . . . . : Nortel IPSECSHM Adapter - Packet Scheduler Miniport Physical Address. . . . . . . . . : 44-45-YY-YY-YY-YY Dhcp Enabled. . . . . . . . . . . : No IP Address. . . . . . . . . . . . : XXX.4.52.62 Subnet Mask . . . . . . . . . . . : 255.255.254.0 Default Gateway . . . . . . . . . : XXX.4.52.62 DNS Servers . . . . . . . . . . . : XXX.6.21.36 XXX.6.21.100

    Read the article

  • FLEX/BISON : Why my rule is not regonized ?

    - by Natim
    Hi, I am trying to do a little exercice in FLEX and BISON. Here is the code I wrote : calc_pol.y %{ #define YYSTYPE double #include "calc_pol.tab.h" #include <math.h> #include <stdlib.h> %} %start line %token NOMBRE %token FIN %% line: exp '\n' { printf("\t%.2lf\n", $1); }; exp: exp exp '+' { $$ = $1 + $2 ;} | exp exp '-' { $$ = $1 - $2 ;} | exp exp '*' { $$ = $1 * $2 ;} | exp exp '/' { $$ = $1 / $2 ;} | exp exp '^' { $$ = pow($1, $2) ;} | NOMBRE; %% calc_pol.l %{ #include "calc_pol.tab.h" #include <stdlib.h> #include <stdio.h> extern YYSTYPE yylval; %} blancs [ \t]+ chiffre [0-9] entier [+-]?[1-9][0-9]* | 0 reel {entier}('.'{entier})? %% {blancs} {reel} { yylval = atof(yytext); return NOMBRE; } \n { return FIN; } . { return yytext[0]; } %% Makefile all: calc_pol.tab.c lex.yy.c gcc -o calc_pol $< -ly -lfl -lm calc_pol.tab.c: calc_pol.y bison -d calc_pol.y lex.yy.c: calc_pol.l flex calc_pol.l Do you have any idea of what's wrong ? Thanks Edited: The error message is flex calc_pol.l: calc_pol.l:18: règle non reconnue Line 18 is the line beginning with {reel}, and the error message translates to English as "unrecognized rule".

    Read the article

  • Single Sign On for Web Application and Application in Virtual Directory

    - by Stefan
    To enable single sign-on for a web application and a web application in a virtual directory, I set the machinekey in both apps to the same: <machineKey validationKey="xxx" decryptionKey="yy" validation="SHA1" /> The single sign on works just fine, but existing users can't sign in any more; their passwords are rejected. The machinekey used to be this in the parent application: <machineKey validationKey="xxx,IsolateApps" decryptionKey="yy,IsolateApps" validation="SHA1" /> I tried other ways to make single sign on work, but it just won't as long as the keys contain "IsolateApps". What am I missing? I should add that the in the membership provider, passwordFormat is set to "Encrypted". So I assume the password was encrypted using the key that contained "IsolateApps" and now when it tries to validate the password it's using the key without the "IsolateApps". Still not sure how to solve that problem. Is there maybe a way that I can set the encryption keys for the password separately from the one that is used for the authentication cookie?

    Read the article

  • Jquery datepicker mindate, maxdate

    - by Cesar Lopez
    I have the two following datepicker objects: This is to restrict the dates to future dates. What I want: restrict the dates from current date to 30 years time. What I get: restrict the dates from current date to 10 years time. $(".datepickerFuture").datepicker({ showOn: "button", buttonImage: 'calendar.gif', buttonText: 'Click to select a date', duration:"fast", changeMonth: true, changeYear: true, dateFormat: 'dd/mm/yy', constrainInput: true, minDate: 0, maxDate: '+30Y', buttonImageOnly: true }); This is to restrict to select only past dates: What I want: restrict the dates from current date to 120 years ago time. What I get: restrict the dates from current date to 120 years ago time, but when I select a year the maximum year will reset to selected year (e.g. what i would get when page load from fresh is 1890-2010, but if I select 2000 the year select box reset to 1880-2000) . $(".datepickerPast").datepicker({ showOn: "button", buttonImage: 'calendar.gif', buttonText: 'Click to select a date', duration:"fast", changeMonth: true, changeYear: true, dateFormat: 'dd/mm/yy', constrainInput: true, yearRange: '-120:0', maxDate: 0, buttonImageOnly: true }); I need help with both datepicker object, any help would be very much appreciated. Thanks in advance. Cesar.

    Read the article

  • jqgrid not updating data on reload

    - by meepmeep
    I have a jqgrid with data loading from an xml stream (handled by django 1.1.1): jQuery(document).ready(function(){ jQuery("#list").jqGrid({ url:'/downtime/list_xml/', datatype: 'xml', mtype: 'GET', postData:{site:1,date_start:document.getElementById('datepicker_start').value,date_end:document.getElementById('datepicker_end').value}, colNames:[...], colModel :[...], pager: '#pager', rowNum: 25, rowList:[10,25,50], viewrecords: true, height: 500, caption: 'Click on column headers to reorder' }); $("#grid_reload").click(function(){ $("#list").trigger("reloadGrid"); }); $("#tabs").tabs(); $("#datepicker_start").datepicker({dateFormat: 'yy-mm-dd'}); $("#datepicker_end").datepicker({dateFormat: 'yy-mm-dd'}); ... And the html elements: <th>Start Date:</th> <td><input id="datepicker_start" type="text" value="2009-12-01"></input></td> <th>End Date:</th> <td><input id="datepicker_end" type="text" value="2009-12-03"></input></td> <td><input id="grid_reload" type="submit" value="load" /></td> When I click the grid_reload button, the grid reloads, but when it has done so it shows exactly the same data as before, even though the xml is tested to return different data for different timestamps. I have checked using alert(document.getElementById('datepicker_start').value) that the values in the date inputs are passed correctly when the reload event is triggered. Any ideas why the data doesn't update? A caching or browser issue perhaps?

    Read the article

  • Multiple complexFilter in Magento's api v2

    - by Alekc
    Currently I’m having some difficulties with using new Magento's soap v2 from c# interface. With php i was able to do something like this: $params["created_at"]["from"] = date("Y-m-d H:i:s",Functions::convert_time($dataDa)); $params["created_at"]["to"] = date("Y-m-d H:i:s",Functions::convert_time($dataA)); MageInterface::getSingleton()->shipmentList($params); In this mode i was able to find list of orders which were created from $dataDa to $dataA without problems. With c# however it seems that only the last one of the selectors work. My code: var cpf = new complexFilter[2]; cpf[0] = new complexFilter { key = "created_at", value = new associativeEntity { key = "to", value = uxDataA.DateTime.ToString("yy-MM-dd HH:mm:ss") } }); cpf[1] = new complexFilter { key = "created_at", value = new associativeEntity { key = "from", value = uxDataDa.DateTime.ToString("yy-MM-dd HH:mm:ss") } }); var filters = new filters(); filters.complex_filter = cpf; var risultato = mage.salesOrderList(sessionKey, filters); In this mode only created_at-from criteria is taken in consideration (it's like second complex filter override previous one with the same key). Ideas? Thanks in advance.

    Read the article

  • Yacc and Lex inclusion confusion

    - by thejohnmeister
    I am wondering how to correctly compile a program with a Makefile that has calls to yyparse in it? This is what I do: I have a Makefile that compiles all my regular files and they have no connections to y.tab.c or lex.yy.c (Am I supposed to have them?) I do this on top of my code: #include "y.tab.c" #include "lex.yy.c" #include "y.tab.h" This is what happens when I try to make the program: When I just type in "make", it gives me many warnings. Some of the examples are shown below. In function yywrap': /src/parser.y:12: multiple definition ofyywrap' server.o :/src/parser.y:12: first defined here utils.o: In function yyparse': /src/y.tab.c:1175: multiple definition ofyyparse' server.o:/src/y.tab.c:1175: first defined here utils.o I get many different errors referring to different yy_* files. I have compiled successfully with multiple calls to yyparse in the past, but this time seems to be different. It seems an awful lot like an inclusion problem somewhere but I can't tell what it is. All my header files have ifndef conditions, as well. Thanks for your help!

    Read the article

  • TCL TDom: Looping through Objects

    - by pws5068
    Using TDom, I would like to cycle through a list of objects in the following format: <object> <type>Hardware</type> <name>System Name</name> <description>Basic Description of System.</description> <attributes> <vendor>Dell</vendor> <contract>MM/DD/YY</contract> <supportExpiration>MM/DD/YY</supportExpiration> <location>Building 123</location> <serial>xxx-xxx-xxxx</serial> <mac>some-mac-address</mac> </attributes> </object> <object> <type>Software</type> <name>Second Object</name> ... Then I use TDom to make a list of objects: set dom [dom parse $xml] set doc [$dom documentElement] set nodeList [$doc selectNodes /systems/object] So far I've done this to (theoretically) select every "Object" node from the list. How can I loop through them? Is it just: foreach node $nodeList { For each object, I need to retrieve the association of each attribute. From the example, I need to remember that the "name" is "System Name", "vendor" is "Dell", etc. I'm new to TCL but in other languages I would use an object or an associative list to store these. Is this possible? Can you show me an example of the syntax to select an attribute in this manner?

    Read the article

  • vector::erase with pointer member

    - by matt
    I am manipulating vectors of objects defined as follow: class Hyp{ public: int x; int y; double wFactor; double hFactor; char shapeNum; double* visibleShape; int xmin, xmax, ymin, ymax; Hyp(int xx, int yy, double ww, double hh, char s): x(xx), y(yy), wFactor(ww), hFactor(hh), shapeNum(s) {visibleShape=0;shapeNum=-1;}; //Copy constructor necessary for support of vector::push_back() with visibleShape Hyp(const Hyp &other) { x = other.x; y = other.y; wFactor = other.wFactor; hFactor = other.hFactor; shapeNum = other.shapeNum; xmin = other.xmin; xmax = other.xmax; ymin = other.ymin; ymax = other.ymax; int visShapeSize = (xmax-xmin+1)*(ymax-ymin+1); visibleShape = new double[visShapeSize]; for (int ind=0; ind<visShapeSize; ind++) { visibleShape[ind] = other.visibleShape[ind]; } }; ~Hyp(){delete[] visibleShape;}; }; When I create a Hyp object, allocate/write memory to visibleShape and add the object to a vector with vector::push_back, everything works as expected: the data pointed by visibleShape is copied using the copy-constructor. But when I use vector::erase to remove a Hyp from the vector, the other elements are moved correctly EXCEPT the pointer members visibleShape that are now pointing to wrong addresses! How to avoid this problem? Am I missing something?

    Read the article

  • How To Compile YACC And LEX?

    - by nisha
    Actually I'm having YACC file as pos.yacc and LEX file name is pos1.lex.. while compilling I'm getting the folowing error... malathy@malathy:~$ cc lex.yy.c y.tab.c -ly -ll pos1.lex %{ #include "y.tab.h" int yylval; %} DIGIT [0-9]+ %% {DIGIT} {yylval=atoi(yytext);return DIGIT;} [\n ] {} . {return *yytext;} %% yacc file is pos.yacc %token DIGIT %% s:e {printf("%d\n",$1);} e:DIGIT {$$=$1;} |e e "+" {$$=$1+$2;} |e e "*" {$$=$1*$2;} |e e "-" {$$=$1-$2;} |e e "/" {$$=$1/$2;} ; %% main() { yyparse(); } yyerror() { printf("Error"); } so while compiling i m getting like malathy@malathy:~$ cc lex.yy.c y.tab.c -ly -ll pos.y: In function ‘yyerror’: pos.y:16: warning: incompatible implicit declaration of built-in function ‘printf’ pos.y: In function ‘yyparse’: pos.y:4: warning: incompatible implicit declaration of built-in function ‘printf’

    Read the article

  • Convert XML to TCL Object

    - by pws5068
    Greetings, I'm new to TCL scripting, and I have a very very basic xml file which I need to import information from into tcl. Example of XML Document Structure: <object> <type>Hardware</type> <name>System Name</name> <description>Basic Description of System.</description> <attributes> <vendor>Dell</vendor> <contract>MM/DD/YY</contract> <supportExpiration>MM/DD/YY</supportExpiration> <location>Building 123</location> <serial>xxx-xxx-xxxx</serial> <mac>some-mac-address</mac> </attributes> </object> Etc... I've seen something called TCLXML but I'm not sure if this is the best route or even how to create the package to use it.. Any help will be greatly appreciated.

    Read the article

  • End-date greater than start-date validation javascript not working properly

    - by ianco slovak
    I am trying to make a validation for my dates so that enddate to be greater than start date but is not working.What am i doing wrong? <head> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-ui-1.8.19.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui.unobtrusive.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui.unobtrusive-0.5.0.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/gen_validatorv4.js")" type="text/javascript"></script> </head> @using (Html.BeginForm("SearchFree", "Reservation", FormMethod.Get,new {id = "form" })) { <h7>Introduceti perioada Rezervarii</h7> <div class="editor-label"> <label id="cautare" for="StartDate">Data Intrare: </label>@(Html.JQueryUI().Datepicker("StartDate").DateFormat("mm-dd-yy").MinDate(DateTime.Today).ShowButtonPanel(true).ChangeYear(true).ChangeMonth(true).NumberOfMonths(2)) </div> <div class="editor-label"> <label id="cautare" for="EndDate">Data Iesire:</label>@(Html.JQueryUI().Datepicker("EndDate").DateFormat("mm-dd-yy").MinDate(DateTime.Today).ShowButtonPanel(true).ChangeYear(true).ChangeMonth(true).NumberOfMonths(2)) </div> <p> <input id="buton1" type="submit" value="Cauta camere libere" /> </p> } <script type="text/javascript"> $(document).ready(function () { $.validator.addMethod("EndDate", function (value, element) { var startDate = $('.StartDate').val(); return Date.parse(startDate) <= Date.parse(value); } , "* End date must be after start date"); $('.form').validate(); }); </script>

    Read the article

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