Daily Archives

Articles indexed Saturday December 25 2010

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

  • Django : looking for a good LDAP manipulation library

    - by sebpiq
    Hi ! I am looking for a good ldap library on Django, that would allow me to manage my ldap server : adding, modifying, deleting entries for groups, users, and all kind of objects The library django-ldapdb looked promising, it offers a Model base class that can be used to declare ldap objects in a Django fashion (which is what we ideally want), however we've had some bugs with it, and furthermore it seems like it is not maintained any more. Does somebody know a good library that could do the trick ? Otherwise I guess I'll just try to improve and debug django-ldapdb ... Thanks !

    Read the article

  • Need advice with a model - should I choose has_many through

    - by Martin Petrov
    I have something like a blog with posts and tags. I want to add email notification functionality - users can subscribe to one or more tags and receive email notifications when new posts are added. Currently I have a Tag model. There will be a Subscriber model (containing the user's email) Do you think I also need a Subscription table where Subscriber and Tag are joined? .. or I can skip it and directly link Subscriber with Tag?

    Read the article

  • [FreeBSD kernel ]How to maintain a linked list on kernel lever?

    - by Andy Leman
    The situation is: I will implement sets of new system calls. Each of them need to access (read or write) a linked list. So, that means I will have several C programs. So, how can I maintain a linked list in memory and let several programs access it? Or,this is wrong....I should save it as a file? (but I hardly think this is a good idea).. A lot of confused questions here...Need help. Thank you indeed!

    Read the article

  • how to implement color search with sphinx?

    - by harald
    hello, searching a photo by dominant colors using mysql is quite simple. assuming that the r,g,b values of the most dominant colors of the photo is already stored in the database, this could be achieved for example by something like: SELECT * FROM colors WHERE ABS(dominant_r - :r) < :threshold AND ABS(dominant_g - :g) < :threshold AND ABS(dominant_b - :b) < :threshold i wonder, if it's anyhow possible to store the colors in sphinx and perform the querying using the sphinx search engine? thanks!

    Read the article

  • Zend AMF throwing InvocationTargetException

    - by Roopesh Shenoy
    Hi, I am trying to make a service call to a php function from flex, through Zend AMF. Most of the functions get called fine, but for one particular function, it throws the following exception: InvocationTargetException:There was an error while invoking the operation. Check your operation inputs or server code and try invoking the operation again. Reason: Fatal error: Call to a member function getInvokeArguments() on a non-object in D:\wamp\www\ZendFramework\library\Zend\Amf\Server.php on line 328 I am not able to debug through this - has anyone faced any issue like this before, or have any ideas how this can be debugged?

    Read the article

  • Bypassing Windows Copy design

    - by Scott S
    I have been trying to figure out a way to streamline copying files from one drive (network or external in my case) to my main system drives. Short of creating a program that I will have to activate each time then choosing all the info in it, I have no really good design to bypass it. I have been wondering if there was a way to intercept a straight-forward windows copy with a program to do it my way. The basic design would be that upon grabbing the copy (actually for this to be efficient, a group of different copies), the program would organize all the separate copies into a single stream of copies. I've been wanting to do this as recently I have been needing to make backups of a lot of data and move it a lot as all my drives seem to be failing the past few months.

    Read the article

  • Does anyone know how to appropriately deal with user timezones in rails 2.3?

    - by Amazing Jay
    We're building a rails app that needs to display dates (and more importantly, calculate them) in multiple timezones. Can anyone point me towards how to work with user timezones in rails 2.3(.5 or .8) The most inclusive article I've seen detailing how user time zones are supposed to work is here: http://wiki.rubyonrails.org/howtos/time-zones... although it is unclear when this was written or for what version of rails. Specifically it states that: "Time.zone - The time zone that is actually used for display purposes. This may be set manually to override config.time_zone on a per-request basis." Keys terms being "display purposes" and "per-request basis". Locally on my machine, this is true. However on production, neither are true. Setting Time.zone persists past the end of the request (to all subsequent requests) and also affects the way AR saves to the DB (basically treating any date as if it were already in UTC even when its not), thus saving completely inappropriate values. We run Ruby Enterprise Edition on production with passenger. If this is my problem, do we need to switch to JRuby or something else? To illustrate the problem I put the following actions in my ApplicationController right now: def test p_time = Time.now.utc s_time = Time.utc(p_time.year, p_time.month, p_time.day, p_time.hour) logger.error "TIME.ZONE" + Time.zone.inspect logger.error ENV['TZ'].inspect logger.error p_time.inspect logger.error s_time.inspect jl = JunkLead.create! jl.date_at = s_time logger.error s_time.inspect logger.error jl.date_at.inspect jl.save! logger.error s_time.inspect logger.error jl.date_at.inspect render :nothing => true, :status => 200 end def test2 Time.zone = 'Mountain Time (US & Canada)' logger.error "TIME.ZONE" + Time.zone.inspect logger.error ENV['TZ'].inspect render :nothing => true, :status => 200 end def test3 Time.zone = 'UTC' logger.error "TIME.ZONE" + Time.zone.inspect logger.error ENV['TZ'].inspect render :nothing => true, :status => 200 end and they yield the following: Processing ApplicationController#test (for 98.202.196.203 at 2010-12-24 22:15:50) [GET] TIME.ZONE#<ActiveSupport::TimeZone:0x2c57a68 @tzinfo=#<TZInfo::DataTimezone: Etc/UTC>, @name="UTC", @utc_offset=0> nil Fri Dec 24 22:15:50 UTC 2010 Fri Dec 24 22:00:00 UTC 2010 Fri Dec 24 22:00:00 UTC 2010 Fri, 24 Dec 2010 22:00:00 UTC +00:00 Fri Dec 24 22:00:00 UTC 2010 Fri, 24 Dec 2010 22:00:00 UTC +00:00 Completed in 21ms (View: 0, DB: 4) | 200 OK [http://www.dealsthatmatter.com/test] Processing ApplicationController#test2 (for 98.202.196.203 at 2010-12-24 22:15:53) [GET] TIME.ZONE#<ActiveSupport::TimeZone:0x2c580a8 @tzinfo=#<TZInfo::DataTimezone: America/Denver>, @name="Mountain Time (US & Canada)", @utc_offset=-25200> nil Completed in 143ms (View: 1, DB: 3) | 200 OK [http://www.dealsthatmatter.com/test2] Processing ApplicationController#test (for 98.202.196.203 at 2010-12-24 22:15:59) [GET] TIME.ZONE#<ActiveSupport::TimeZone:0x2c580a8 @tzinfo=#<TZInfo::DataTimezone: America/Denver>, @name="Mountain Time (US & Canada)", @utc_offset=-25200> nil Fri Dec 24 22:15:59 UTC 2010 Fri Dec 24 22:00:00 UTC 2010 Fri Dec 24 22:00:00 UTC 2010 Fri, 24 Dec 2010 15:00:00 MST -07:00 Fri Dec 24 22:00:00 UTC 2010 Fri, 24 Dec 2010 15:00:00 MST -07:00 Completed in 20ms (View: 0, DB: 4) | 200 OK [http://www.dealsthatmatter.com/test] Processing ApplicationController#test3 (for 98.202.196.203 at 2010-12-24 22:16:03) [GET] TIME.ZONE#<ActiveSupport::TimeZone:0x2c57a68 @tzinfo=#<TZInfo::DataTimezone: Etc/UTC>, @name="UTC", @utc_offset=0> nil Completed in 17ms (View: 0, DB: 2) | 200 OK [http://www.dealsthatmatter.com/test3] Processing ApplicationController#test (for 98.202.196.203 at 2010-12-24 22:16:04) [GET] TIME.ZONE#<ActiveSupport::TimeZone:0x2c57a68 @tzinfo=#<TZInfo::DataTimezone: Etc/UTC>, @name="UTC", @utc_offset=0> nil Fri Dec 24 22:16:05 UTC 2010 Fri Dec 24 22:00:00 UTC 2010 Fri Dec 24 22:00:00 UTC 2010 Fri, 24 Dec 2010 22:00:00 UTC +00:00 Fri Dec 24 22:00:00 UTC 2010 Fri, 24 Dec 2010 22:00:00 UTC +00:00 Completed in 151ms (View: 0, DB: 4) | 200 OK [http://www.dealsthatmatter.com/test] It should be clear above that the 2nd call to /test shows Time.zone set to Mountain, even though it shouldn't. Additionally, checking the database reveals that the test action when run after test2 saved a JunkLead record with a date of 2010-12-22 15:00:00, which is clearly wrong.

    Read the article

  • Notepad Tutorial: deleteDatabase() function

    - by FelixA
    Hello I have a short question to the notepad tutorial on the android website. I wrote a simple function in the tutorial code to delete the whole database. It looks like this: DataHelper.java public void deleteDatabase() { this.mDb.delete(DATABASE_NAME, null, null); } Notepadv1.java @Override public boolean onCreateOptionsMenu(Menu menu) { boolean result = super.onCreateOptionsMenu(menu); menu.add(0, DELETE_ID, 0, "Delete whole Database"); return result; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case DELETE_ID: mDbHelper.deleteDatabase(); return true; } return super.onOptionsItemSelected(item); } But when I run the app and try to delete the database I will get this error in LogCat: sqlite returned: error code = 1, msg= no such table: data Can you help how to fix this problem. It seems that the function deleteDatabase can not reach the database. Thank you very much. Felix

    Read the article

  • Why MySQL multiple-column index is overpopulated?

    - by actual
    Consider following MySQL table: CREATE TABLE `log` ( `what` enum('add', 'edit', 'remove') CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `with` int(10) unsigned NOT NULL, KEY `with_what` (`with`,`what`) ) ENGINE=InnoDB; INSERT INTO `log` (`what`, `with`) VALUES ('add', 1), ('edit', 1), ('add', 2), ('remove', 2); As I understand, with_what index must have 2 unique entries on its first with level and 3 unique entries in what "subindex". But MySQL reports 4 unique entries for each level. In other words, number of unique elements for each level is always equal to number of rows in log table. Is that a bug, a feature or my misunderstanding?

    Read the article

  • Building a ctypes-"based" C library with distutils

    - by Robie Basak
    Following this recommendation, I have written a native C extension library to optimise part of a Python module via ctypes. I chose ctypes over writing a CPython-native library because it was quicker and easier (just a few functions with all tight loops inside). I've now hit a snag. If I want my work to be easily installable using distutils using python setup.py install, then distutils needs to be able to build my shared library and install it (presumably into /usr/lib/myproject). However, this not a Python extension module, and so as far as I can tell, distutils cannot do this. I've found a few references to people other people with this problem: Someone on numpy-discussion with a hack back in 2006. Somebody asking on distutils-sig and not getting an answer. Somebody asking on the main python list and being pointed to the innards of an existing project. I am aware that I can do something native and not use distutils for the shared library, or indeed use my distribution's packaging system. My concern is that this will limit usability as not everyone will be able to install it easily. So my question is: what is the current best way of distributing a shared library with distutils that will be used by ctypes but otherwise is OS-native and not a Python extension module? Feel free to answer with one of the hacks linked to above if you can expand on it and justify why that is the best way. If there is nothing better, at least all the information will be in one place.

    Read the article

  • Android ANR keyDispatchingTimedOut Error while continuous tapping on screen.

    - by user519846
    Hi All, I am getting Application Not Responding (ANR) dialog while continuous tapping on the screen. There is no view on the screen where i am tapping. Frequency of this issue is less but still i am not able to remove it completely. Here i am attaching the log what i caught during this error. ERROR/ActivityManager(1322): ANR in com.test.mj.and.ui (com.test.mj.and.ui/.TermsAndCondActivity) ERROR/ActivityManager(1322): Reason: keyDispatchingTimedOut ERROR/ActivityManager(1322): Parent: com.test.mj.and.ui/.SplashActivity ERROR/ActivityManager(1322): Load: 6.59 / 6.37 / 5.21 ERROR/ActivityManager(1322): CPU usage from 11430ms to 2196ms ago: ERROR/ActivityManager(1322): rtal.mj.and.ui: 9% = 7% user + 1% kernel / faults: 649 minor ERROR/ActivityManager(1322): system_server: 4% = 2% user + 2% kernel / faults: 10 minor ERROR/ActivityManager(1322): logcat: 3% = 1% user + 1% kernel / faults: 675 minor 1 major ERROR/ActivityManager(1322): synaptics_wq: 1% = 0% user + 1% kernel ERROR/ActivityManager(1322): ami304d: 1% = 0% user + 0% kernel ERROR/ActivityManager(1322): .process.lghome: 1% = 0% user + 0% kernel / faults: 47 minor ERROR/ActivityManager(1322): sync_supers: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): droid.DunServer: 0% = 0% user + 0% kernel / faults: 6 minor ERROR/ActivityManager(1322): events/0: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): oid.inputmethod: 0% = 0% user + 0% kernel / faults: 2 minor ERROR/ActivityManager(1322): m.android.phone: 0% = 0% user + 0% kernel / faults: 2 minor ERROR/ActivityManager(1322): ndroid.settings: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): sh: 0% = 0% user + 0% kernel / faults: 110 minor ERROR/ActivityManager(1322): -flush-179:0: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): TOTAL: 19% = 13% user + 6% kernel WARN/WindowManager(1322): Continuing to wait for key to be dispatched WARN/WindowManager(1322): No window to dispatch pointer action 1 Can anyone please help me to solve this issue? Thanks in advance.

    Read the article

  • how to force ejb3 to reload value from data base and not use those of the context

    - by Kohan95
    Hello here I have a big problem that I hope to find help here I have two entities @Entity @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="Role", discriminatorType=DiscriminatorType.STRING) public class Utilisateur implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="id") private Long id; @Column(name="nom",nullable=false) private String nom; @Column(name="Role",nullable=false, insertable=false) private String Role ; //... } @Entity @Table(name="ResCom") @DiscriminatorValue("ResCom") public class ResCom extends Utilisateur { /... } the first thing I do ResCom rsCom= new ResCom(nom,prenom, email,civilite, SysQl.crypePasse(pass)); gr.create(rsCom); I check my database I see that property is ResCom insert but when I check the value of role I get null Utilisateur tets= gr.findByEmail(email); message=tets.getEmail()+" and Role :"+tets.getRole()+""; but in my bass it ResCom !!!!! the problem disappears when I deploy the project again I hope you have a solution And thank you in advance sorry for my English

    Read the article

  • Setting background text colour of radio button

    - by Night Walker
    Hello all I want to set up the Background color of the text in my radio button . I have tried Background="Chocolate" , but it sets the color of the circle dot there . Any idea how i do that ? This is my current code <RadioButton Content=" MSSQL" TextBlock.Foreground="Black" HorizontalAlignment="Left" Height="Auto" Padding="0" Margin="15,15,0,0" Name="radioButton_MSSQL" VerticalAlignment="Top" Width="66" GroupName="DataBases" BorderBrush="DarkOrchid" IsChecked="True" />

    Read the article

  • db optimization - have a total field or query table?

    - by Dorian Fife
    I have an app where users get points for actions they perform - either 1 point for an easy action or 2 for a difficult one. I wish to display to the user the total number of points he got in my app and the points obtained this week (since Monday at midnight). I have a table that records all actions, along with their time and number of points. I have two alternatives and I'm not sure which is better: Every time the user sees the report perform a query and sum the points the user got Add two fields to each user that records the number of points obtained so far (total and weekly). The weekly points value will be set to 0 every Monday at midnight. The first option is easier, but I'm afraid that as I'll get many users and actions queries will take a long time. The second option bares the risk of inconsistency between the table of actions and the summary values. I'm very interested in what you think is the best alternative here. Thanks, Dorian

    Read the article

  • How to retrieve column total when rows are paginated?

    - by Rick
    Hey guys I have a column "price" in a table and I used a pagination script to generate the data displayed. Now the pagination is working perfectly however I am trying to have a final row in my HTML table to show the total of all the price. So I wrote a script to do just that with a foreach loop and it sort of works where it does give me the total of all the price summed up together however it is the sum of all the rows, even the ones that are on following pages. How can I retrieve just the sum of the rows displayed within the pagination? Thank you! Here is the query.. SELECT purchase_log.id, purchase_log.date_purchased, purchase_log.total_cost, purchase_log.payment_status, cart_contents.product_name, members.first_name, members.last_name, members.email FROM purchase_log LEFT JOIN cart_contents ON purchase_log.id = cart_contents.purchase_id LEFT JOIN members ON purchase_log.member_id = members.id GROUP BY id ORDER BY id DESC LIMIT 0,30";

    Read the article

  • Default update detailViewController, HELP.

    - by DrBeak1
    I've created an app that allows users to add information (from an addViewController), which is then displayed in a UITableView on the rootViewController. When the user taps the tableViewCell the detailViewController then displays, you guessed it, more details regarding the inputted user information. What I'm trying to accomplish is to setup an editViewController that will allow users to edit information they've already submitted. Currently, I'm trying to auto-populate the editViewController with the information that was previously submitted by the user (after which they can press save and update the info). However, I'm getting stuck trying to perform this auto-populating and I'm not sure this is even the best route to accomplish this. Here is the edit method that is called to load the editViewController from the detailViewController. -(IBAction)editDetails:(id)sender { editViewController *evc = [[editViewController alloc] initWithNibName:@"editViewController" bundle:nil]; rootViewController *rvc = [[rootViewController alloc] init]; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:evc]; [[self navigationController] presentModalViewController:navigationController animated:YES]; ///For Style NSInteger styleCount = [[rvc scoreTypeArray] count]; NSInteger styleRows = [rvc.scoreTypeArray objectAtIndex:indexPath.row]; ///HERE I GET AN ERROR MESSAGE SAYING THAT indexPath IS NOT DEFINED ///For Date NSInteger count = [[rvc dateArray] count]; NSInteger rows = [[rvc indexPath] row]; ///AND HERE I GET A WARNING MESSAGE SAYING rootViewController MAY NOT RESPOND TO INDEX PATH, AND OF COURSE IT DOESN'T WORK [[evc dateField] setText:[NSString stringWithFormat:@"%@", [[evc dateArray] objectAtIndex:(count-1-rows)]]]; [[evc styleField] setText:[NSString stringWithFormat:@"%@", [[rvc scoresArray] objectAtIndex:(styleCount-1-styleRows)]]]; [navigationController release]; [evc release]; [rvc release];} So here I'm trying to load the information from a saved array that is declared in my rootViewController. Any thoughts any body? Please and thank you : )

    Read the article

  • Change the order of DNS lookup when connected in the VPN

    - by qwerty2010
    Hi, Using Windows 7 Pro here. I have my LAN network adapter with DNS server 8.8.8.8 (Google's DNS). I also have OpenVPN client to connect to my company's network. If I type "nslookup" while disconnected from the VPN, I get 8.8.8.8 (from my LAN network adapter). If I type "nslookup" while connected in the VPN, I get the DNS IP from my company's network. That makes me think that when connected to the VPN all DNS's resolution are routed first to my company's DNS. How can I change this order, and make the DNS resolution be routed to 8.8.8.8 first, when I'm connected to the VPN? Thank you

    Read the article

  • Centralized backup method recommendation for SMEs with various OSes

    - by Akinator
    Hi I was wondering what in your opinion is the "best" method for having "everything" backed-up in the following situation. We are a SMEs with 10 computers in total. Three of those computers are MACs The rest are windows (1 vista, 4 win7 and 2 XPs) I'm very open to what the method should be but you should also consider the follwing: Very limited resources Quite "small" bandwidth (4 MBs for all (download) 0.4 MBs (upload, yep, thats it)- though this might get, a little bit better) One of the main thing to back up would be the mails, considerations: All windows computers use outlook, mainly 2003 There is one mac that uses outlook too (for mac of course - not 2011 yet) We also have to backup the files: Not a huge amount Very few very big files Very organizes (by machine) What I would like is to hear your opinions as to which would be the best method (or combination of methods - preferably one of course) considering. We are not sure what do we need and I'm open to suggestions, though an online (cloud based applications) would be great, remember the the bandwidth is unbearable. Last think to consider, it that we would like to do weekly updates (unless the method is very easy of course). Thanks in advance!! I tried to be as specific as possible, but if anything is needed I'll gladly update, please ask for any clarification needed! Please avoid any answers like upgrade all to windows 7 and throw away your macs :) our's may not be an ideal situation, but it is what it is, and right now, it would be impossible for us to change it for a lot of circumstances.

    Read the article

  • Windows Vista Help, OS Installation

    - by Darknight1366
    I've brought Vista Ultimate DVD from my friend, there was a .iso file. I extracted them and found two files(there was some boot files too) : boot.wim install.wim I extracted the boot.wim with WinMount. But I can't extracting the install.wim Should I Burn the whole files(extracted and past files) into a DVD Or, Should I try to extract the install.wim ???? I searched Google, some forums and websites said that the setup.exe can extract the install.wim before starting the Installation.(I found the setup.exe after extracting the boot.wim)

    Read the article

  • Odd SVN Checkout failures occur frequenctly on VMWare virtual machines

    - by snowballhg
    We've recently been experiencing seemingly random SVN checkout failures on our Hudson build system. Google search has failed me; I'm hoping the super user community can help me out :-) We are occasionally receiving the following SVN error when our Hudson build jobs checkout source via the Hudson Subversion plug-in (which uses svn kit): ERROR: Failed to check out http://server/svnroot/trunk org.tmatesoft.svn.core.SVNException: svn: Processing REPORT request response failed: XML document structures must start and end within the same entity. (/svnroot/!svn/vcc/default) svn: REPORT request failed on '/svnroot/!svn/vcc/default' This issue seems to only occur when checking out from our Virtual Machines (Windows XP, Fedora 9, Fedora 12) using Hudson's SVN Plug-in. Systems that use the traditional SVN client seem to work. SVN Server version: 1.6.6 Hudson version: 1.377 Hudson SVN Plugin Version: 1.17 Has anyone dealt with this issue, or have any suggestions? Thanks

    Read the article

  • Squeeze and no sound

    - by user114
    hello i installed debian squeeze in my pc but i dont have any sound , my sound device is Ac97 and i installed these package in my system alsa-base alsa-oss alsa-tools alsa-utils alsamixergui gstreamer0.10-alsa libao-common libao4 libasound2 linux-sound-base oss-compat when i want to run alsamixer io got this message cannot open mixer: No such file or directory anyone know why i got this message ? and i cant hear any sound in my pc?

    Read the article

  • PHP Missing Function In Older Version

    - by Umair Ashraf
    My this PHP function converts a datetime string into more readable way to represent passed date and time. This is working perfect in PHP version 5.3.0 but on the server side it is PHP version 5.2.17 which lacks this function. Is there a way I can fix this efficiently? This is not only a function which needs this "diff" function but there are many more. public function ago($dt1) { $interval = date_create('now')->diff(date_create($dt1)); $suffix = ($interval->invert ? ' ago' : '-'); if ($v = $interval->y >= 1) return $this->pluralize($interval->y, 'year') . $suffix; if ($v = $interval->m >= 1) return $this->pluralize($interval->m, 'month') . $suffix; if ($v = $interval->d >= 1) return $this->pluralize($interval->d, 'day') . $suffix; if ($v = $interval->h >= 1) return $this->pluralize($interval->h, 'hour') . $suffix; if ($v = $interval->i >= 1) return $this->pluralize($interval->i, 'minute') . $suffix; return $this->pluralize($interval->s, 'second') . $suffix; }

    Read the article

  • Open an attachment for editing and save changes made to it

    - by Seitaridis
    My Lotus Notes document has a rich text item that stores an attachment. I want to edit the attachment and after this to save the attachment back to the Lotus Notes document. This is the script that launches the attachment: @Command([EditGotoField];"Attachment"); @Command([EditSelectAll]); @Command([AttachmentLaunch]); @Command([EditDeselectAll]) This script opens the attachment, but the changes made are not reflected to the Lotus Document. One way of solving this is to add AttachmentActionDefault=2 as an entry to the notes.ini. This enables to edit the attachment when double clicking on attachment. Also using the right click on the attachment, and then choosing edit action, produces the same result. In both cases, after saving, the changes are reflected back to the Lotus Notes document. The problem is that I want to use a button for opening the attachment.

    Read the article

  • Post Method Not giving Alerts like planned?

    - by Charles
    <form action="" method="post"> <div align="center"><legend>Add a Code</legend> <label for="code"></label> <input type="text" name="code" id="code" maxlength="10" /> <input type='button' onclick= "isAlphanumeric(document.getElementById('code'),'Your Submission Contained Invalid Characters'); isBadPhrase(document.getElementById('code'), 'Please Enter A Correct Friend Code!');" value='Check Field' /> function isAlphanumeric(elem, helperMsg){ var alphaExp = /^[0-9a-zA-Z]+$/; if(elem.value.match(alphaExp)){ return true; }else{ alert(helperMsg); elem.focus(); return false; } } function isBadPhrase(elem,helperMsg){ var badPhrase=/EPW|ESW|\s/; if (elem.value.match(badPhrase)){ alert(helperMsg); elem.focus(); return false; }else{ return true; } } What is wrong here?

    Read the article

  • how to get current date and time in command line

    - by Ieyasu Sawada
    I am using mysqldump to backup mysql database. Now I just need to use the current date and time as file name for the generated sql file. How do I do that if my current code looks like this: mysqldump -u root -p --add-drop-table --create-options --password= onstor >c:\sql.sql I also found this code from this site, but I do not know how to incorporate it in my current code: @echo off For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b) echo %mydate%_%mytime% Please help, thanks:)

    Read the article

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