Daily Archives

Articles indexed Saturday December 15 2012

Page 5/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • SQL Server 2008 R2 - Cannot create database snapshot

    - by Chris Diver
    Server: Windows Server 2008 R2 X64 Enterprise SQL: SQL Server 2008 R2 Enterprise X64 I have a default SQL Server instance, the SQL Server service account is running as a domain user. I am trying to create a database snapshot in the directory where the mdf files are stored. The T-SQL syntax is correct. The file system is NTFS. The error message I get is: Msg 1823, Level 16, State 2, Line 1 A database snapshot cannot be created because it failed to start. Msg 5119, Level 16, State 1, Line 1 Cannot make the file "e:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\TestDB.ss" a sparse file. Make sure the file system supports sparse files. The local SQLServerMSSQLUser$db$MSSQLSERVER group has Full Control permission on the folder where I am trying to create the snapshot. I can fix the problem in two ways, neither of which are suitable. Add the SQL Server service (domain) account to the local Administrators group and restart the SQL service. Grant the local SQLServerMSSQLUser$db$MSSQLSERVER group Full control on E:\ I have tried to change the owner of the DATA directory to SQLServerMSSQLUser$db$MSSQLSERVER to no avail. I have no issue creating a new database Why can I not create a snapshot by giving permission only on the DATA folder? Update 23/09/2010: I have tried mrdenny's suggestion with no luck (but learned something new in the process), I suspect the problem may be due to the fact that the domain is a windows 2000 domain running in mixed mode. I had to install hotfix KB976494 for Server 2008 R2, as the SQL Server 2008 R2 installer would not verify the service account correctly with the domain. I noticed that Server 2000 isn't a supported operating system for SQL 2008 R2 but cannot find anything that would suggest it shouldn't work in a 2000 domain. I dis-joined the test server from the domain and changed the service accounts to the local service account and I still have the same issue. I will try to re-install the server without joining the domain and without the hotfix and see if the issue persists.

    Read the article

  • How to add/update lotus notes signature 8.5 from C# using API

    - by faris
    I want build a third party tool to make our employees fill the Contact Form information , and then make him able to add his information as a signature image to the Lotus notes .. so if the customer want to send a new email , the signature will be added automatically to the email .. I use lotus notes V. 8.5 .. But how I can do it ,, is there any API available to make this happens ? I appreciates any help ...

    Read the article

  • Read ahead buffering while playing video file from optical disc

    - by Saxtus
    I was wondering if there is a program for Windows 7 (64-bit), that reads ahead the file to be played back (usually MKV files in my case) to the RAM, so the disc that the video file resides in, won't spin for the entire duration of the playback, but only every time the cache is almost empty (with big enough cache so it won't need the drive for long periods). A program that I've used in the past (called DVDIdle), was doing that universally for every video player I wanted, but they've stopped updating it 6 years ago and now it doesn't seem to work with Windows 7 (tried using compatibility mode too). The method I am using now, is to either have the drive wearing down and buzzing all the time or manually copy the entire file to HDD, SSD or RamDisk and play it from there. The closest thing I've found, is a software that slows down the drive's spin speed, but I was looking for something more convenient, automated, without waiting for an entire file to be copied before starting playback or needing any HDD space, like I've used to in the past. Thanks in advance.

    Read the article

  • alias gcc='gcc -fpermissive' or modifying ./configure script

    - by robo
    I am compiling quite big project from source. The compilation always ends with: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] I have already compiled this project one year ago. So I know a solution to this. Actualy I found more solutions: Adding a typecast to appropriate line of cpp code (It went to endless number of changes in each file. So I found next solution.) Modifying a makefile to compile that file with -fpermissive option. (I had to modify a lot of lines in each makefile. So I find even better solution.) "g++" or "gcc" was stored in a variable so I added -fpermissive to these variables. This is the best solution I have. It is sufficient to add this option to each makefile once. Unfortunately this software has big number of subdirectories. So I need to modify more than 100 makefiles. It took me whole day one year ago. Is there a way how to do this faster. What about this? alias gcc='gcc -fpermissive' I am not familiar with aliases. But it should be easy to try this. Is the syntax correct? And is this one correct? alias g++='g++ -fpermissive' ? And do I need to export the alias somehow? Will the make program respect the alias? Should I maybe change ./configure script? Or the ./configure.in? Or other file?

    Read the article

  • Convert a gray PNG with alpha to a 1-bit black rectanble with 8-bit alpha

    - by jcayzac
    I use a tool to render LaTeX equations as PNG. The resulting images are in RGBA8888 format. I would like to extract the luminance (grayscale from RGB channels, multiplied by the A channel) as my new alpha channel, set the picture fully black, and save the result in Gray1Alpha8 (G1A8) format. So far I've only managed to get G1A4 or G8A8 but not G1A8. Also, the resulting picture looks like it's not multiplied correctly… convert original.png \ \( -clone 0 -alpha extract \) \ \( -clone 0 -clone 1 -compose multiply -composite \) \ -delete 0 +swap -alpha off -compose copy_opacity -composite -colorspace Gray -depth 4 result.png What am I missing?

    Read the article

  • Setting font size of Closed Captions on iPhone using ffmpeg or mencoder

    - by forthrin
    Does anyone know how to either: Make ffmpeg set subtitle font size in the output video file Make mencoder produce an iPhone-compatible video file (with subtitles) I finally found out how to get Closed Captions video on iPhone, with mkv and srt files as source material. The secret was using the mov_text subtitle codec in ffmpeg (and turning on Closed Captions in the iPhone settings of course): ffmpeg -y -i in.mkv -i in.srt -map 0:0 -map 0:1 -map 1:0 -vcodec copy -acodec aac -ab 256k -scodec mov_text -strict -2 -metadata title="Title" -metadata:s:s:0 language=eng out.mp4 However, the font size appears very small on the iPhone, and I can't find out how to set it with ffmpeg (the iPhone has no option for this). I found out that mencoder has a -subfont-text-scale option, but I don't have a lot of experience with this program. The following, my best attempt so far, produces an output file which is not playable on the iPhone. sudo port install mplayer +mencoder_extras +osd mencoder in.mkv -sub in.srt -o out.mp4 -ovc copy -oac faac -faacopts br=256:mpeg=4:object=2 -channels 2 -srate 48000 -subfont-text-scale 10 -of lavf -lavfopts format=mp4 PS! As requested, here is the output from mencoder: 192 audio & 400 video codecs success: format: 0 data: 0x0 - 0xb64b9d2f libavformat version 54.6.101 (internal) libavformat file format detected. [matroska,webm @ 0x1015c9a50]Unknown entry 0x80 [lavf] stream 0: video (h264), -vid 0 [lavf] stream 1: audio (ac3), -aid 0, -alang eng VIDEO: [H264] 1280x544 0bpp 49.894 fps 0.0 kbps ( 0.0 kbyte/s) [V] filefmt:44 fourcc:0x34363248 size:1280x544 fps:49.894 ftime:=0.0200 ========================================================================== Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders libavcodec version 54.23.100 (internal) AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000) Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3) ========================================================================== ** MUXER_LAVF ***************************************************************** REMEMBER: MEncoder's libavformat muxing is presently broken and can generate INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer will play these INCORRECT files as if nothing were wrong! ******************************************************************************* OK, exit. videocodec: framecopy (1280x544 0bpp fourcc=34363248) VIDEO CODEC ID: 28 AUDIO CODEC ID: 15002, TAG: 0 Writing header... [mp4 @ 0x1015c9a50]Codec for stream 0 does not use global headers but container format requires global headers [mp4 @ 0x1015c9a50]Codec for stream 1 does not use global headers but container format requires global headers Then the following repeats itself for every frame: Pos: 0.0s 1f ( 2%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] [mp4 @ 0x1015c9a50]malformated aac bitstream, use -absf aac_adtstoasc Error while writing frame. I recognize -absf aac_adtstoasc as an ffmpeg option (does mencoder spawn ffmpeg?), but I don't know how to pass this option on (my hunch is this is not even the origin of the problem).

    Read the article

  • Can there be multiple monitors with these video cards and setup

    - by z_Zelman
    I have a Acer Aspire TimelineX 4830TG-6808 laptop running windows 7 Ultimate with one VGA port and one HDMI port. It has one Intel HD Graphics family card and one NVIDIA GeForce GT 540M. Right now I have one monitor running via the VGA port, and also the basic laptop monitor. When I look at the monitor setup, I see one unused video card available. Can I have another monitor via the HDMI port? If I cannot run three monitors, is there some way I could make a large "single" desktop that extends over two monitors? For the sake of celerity, maybe something like having a virtual machine window that extends over two monitors. Could this maybe come from third party software?

    Read the article

  • Cannot find /Users/user/tomcat/bin/setclasspath.sh

    - by Ankit
    This file is needed to run this program. I am new to Mac OS X and its terminal. I am installing Apache Tomcat, using steps provided through this URL http://www.editrocket.com/articles/tomcat_mac.html, but when I run sh startup.sh I get the following error: Cannot find /Users/user/tomcat/bin/setclasspath.sh This file is needed to run this program. Whereas setclasspath.sh already exists at this location.

    Read the article

  • macport selfupdate not working

    - by eistrati
    macbookpro:~ eistrati$ port -v MacPorts 2.1.2 macbookpro:~ eistrati$ xcodebuild -version Xcode 4.5.2 Build version 4G2008a macbookpro:~ eistrati$ sudo port -d selfupdate DEBUG: Copying /Users/eistrati/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs ---> Updating MacPorts base sources using rsync rsync: failed to connect to rsync.macports.org: Connection refused (61) rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9] Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs Exit code: 10 DEBUG: Error synchronizing MacPorts sources: command execution failed while executing "macports::selfupdate [array get global_options] base_updated" Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed Ideas? Please help!

    Read the article

  • Bash: Created a ~ (Tilde) in a directory by accident

    - by user1500360
    I'm a beginner to using bash on OSX, and I somehow created a ~ dir in a project subfolder. (It appears as a directory, rather than a symlink.) Is there a safe way to get rid of this ~ directory instance without bash expanding the tilde wiping my local user directory? This is a really goofy question, but it would be a huge help to figure out how to deal with this. Solution: I ended up using rm -rfi ./\~, which worked safely. Thanks, everyone!

    Read the article

  • Do these 3 crashes have something in common?

    - by David U
    I'm running OS X 10.6.8 on a Mac Mini. I tried to install 3 applications today and all 3 installations failed. I am wondering if the failures have something in common. First I installed GraphViz. The installation succeeded, but when I try to open any .dot file, I get a dialog that says GraphViz has quit unexpectedly. Next I installed Doxygen. It installed, but when I try to launch it I get a dialog that tells me Doxywizard quit unexpectedly. After some googling I thought perhaps my system lacked QT, and that was the problem. I downloaded the Qt 4.8.4 packages and installed them. But when I try to launch qtdemo.app, or any of the other apps that came with the qt installation, I get a dialog that says I can't open the app because it's not supported on this type of Mac. I have crash logs from GraphViz and Doxygen. They're long and I think it unnecessary to post them unless they would help someone determine my problem. Thanks Excerpt from System Log, added later: 12/13/12 5:26:21 PM [0x0-0x4f04f].com.apple.DiskImageMounter[1322] 2012-12-13 17:26:21.927 DiskImages UI Agent[1333:903] *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection or ports are invalid 12/13/12 5:30:31 PM [0x0-0x1a01a].org.mozilla.firefox[824] [ConvConfHandler] isPreferred contentType: application/x-apple-diskimage 12/13/12 5:35:32 PM DiskImages UI Agent[1384] *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection or ports are invalid 12/13/12 5:35:32 PM [0x0-0x5a05a].com.apple.DiskImageMounter[1376] 2012-12-13 17:35:32.988 DiskImages UI Agent[1384:903] *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection or ports are invalid 12/13/12 6:07:33 PM DisplayLinkUserAgent[772] (00116500.405)-[DLDistributedNotificationCenter stream:handleEvent:] reconnected. 12/13/12 6:07:33 PM [0x0-0x6c06c].backupd-helper[1446] Not starting Time Machine backup after wake - less than 60 minutes since last backup completed. 12/13/12 6:08:43 PM Installer[1403] PackageKit: *** Missing bundle identifier: /Library/Receipts/BrotherPPD.pkg 12/13/12 6:08:48 PM Installer[1403] PackageKit: *** Missing bundle identifier: /Library/Receipts/NeoOffice-2.2.3-Intel.pkg 12/13/12 6:08:48 PM Installer[1403] PackageKit: *** Missing bundle identifier: /Library/Receipts/NeoOffice-2.2.3-Patch-2-Intel.pkg 12/13/12 6:08:48 PM Installer[1403] PackageKit: *** Missing bundle identifier: /Library/Receipts/NeoOffice-2.2.5-Intel.pkg 12/13/12 6:08:48 PM Installer[1403] PackageKit: *** Missing bundle identifier: /Library/Receipts/NeoOffice.pkg 12/13/12 6:08:48 PM Installer[1403] PackageKit: *** Missing bundle identifier: /Library/Receipts/PIXMA iP6000D 290.pkg 12/13/12 6:14:39 PM com.apple.launchd.peruser.501[359] ([0x0-0x70070].com.att.graphviz[2047]) Job appears to have crashed: Bus error 12/13/12 6:14:41 PM ReportCrash[2056] Saved crash report for Graphviz[2047] version 2.28 (2.28.0) to /Users/duzzell/Library/Logs/DiagnosticReports/Graphviz_2012-12-13-181441_Amun.crash 12/13/12 6:15:19 PM com.apple.launchd.peruser.501[359] ([0x0-0x74074].org.doxygen[2070]) Job appears to have crashed: Bus error 12/13/12 6:15:19 PM ReportCrash[2056] Saved crash report for Doxywizard[2070] version 1.8.2 (???) to /Users/duzzell/Library/Logs/DiagnosticReports/Doxywizard_2012-12-13-181519_Amun.crash

    Read the article

  • Chrome tabs showing wrong page

    - by Jeff
    I have a problem with Google Chrome where occasionally when switching to a newly created tab (usually one made from opening a link into a new tab), the wrong page shows. The correct page is functional, links and other functions are present, but I cannot see them because Chrome seems to be reading the page I want but showing another. Sometimes it is identical to the tab I just left, sometimes it shows the content of a previously closed tab. The problem sorts out when I switch to another tab and back, and then the correct page shows. This happens fairly often and is rather annoying. Some of my friends have also experienced this, and have stopped using Chrome because of it. If anybody else has seen this problem and happens to know a fix, I'd really appreciate it.

    Read the article

  • How do I disable administrator prompt in Windows 8?

    - by Arnold Zokas
    I am using Windows 8 Enterprise on my development machine. Most of the time, I need full administrator for debugging, changing system files, etc. In Windows 7, setting UAC to "never notify" would disable any administrator prompts. In Windows 8 this is no longer the case. Even with UAC disabled I get prompted to grant programs elevated privileges. Is there a way disable this behaviour? Note: I am fully aware of the repercussions. I have antivirus, firewall, etc and am generally quite careful about what I download or install on my machine.

    Read the article

  • How to clone a HDD and then use the clone with VMware (so that Windows works!)?

    - by Ahmad
    I have a system on which Windows 7 is installed, and I am trying to make a clone of its HDD image, which I then want to use in my main PC with VMware, so that I can boot Windows 7 off the cloned HDD. I used Ultimate Boot CD v5.1.1 with the system whose HDD I wanted to clone, and I cloned it using EaseUs Disk Copy, which comes with Ultimate Boot CD. The source HDD was 250 GB in size which had 3 partitions, while the USB HDD I attached to the system, which was supposed to be the destination/clone HDD, was 320 GB in size. I chose to create an exact replica, and so 250 GB worth of data (partitions, etc.) was copied exactly, and the rest of the space was un-allocated. I now connected this USB HDD to my main PC, fired up VMware Workstation 8 and defined a new Virtual Machine, and chose to boot off the USB HDD. Result is that when Windows is booting (from the cloned HDD inside VMware), I get the blue screen error before I reach the login screen. How can I change my methodology so that Windows even boots from the clone? I can change any tools I use, etc.

    Read the article

  • Auth failed running command from shell script

    - by CSchulz
    I try to run following command from shell script: svn checkout http://url/ --username user --password password --non-interactive --no-auth-cache . It fails always with following error: svn: OPTIONS of 'http://url/': authorization failed: Could not authenticate to server: rejected Basic challenge (http://url) Here the call out of my script: $(svn $command $url $auth --non-interactive --no-auth-cache .) Running the same command from the terminal works fine. What is the difference between running from shell script and terminal? EDIT: Here some version information: OS: Porteus 1.0 based on Slackware 13.3 Subversion: subversion-1.6.16-i486-1

    Read the article

  • How can I minimize the amount my router slows down my Internet connection speed?

    - by Lord Torgamus
    Background I'm working with what I assume is a pretty common Internet setup: a cable modem, a wireless router and a few Internet-connected devices. Lately, I've started being more demanding on my Internet connection, and noticed that using my router slows down my download speeds considerably. I just kind of dealt with it until Zune Marketplace on the Xbox 360 told me that a movie was going to take well over ten hours to download, and I just didn't want to wait that long. Good little scientist that I am, I tried to reduce the problem down to one variable. The test As a control, I turned off all the devices in the house that use wireless Internet, and unplugged all the wired devices except for the Xbox. I also power-cycled both the modem and the router. I then tried to download the movie again, and was told that it would still take over ten hours. Next, I unplugged the router, and connected the Xbox directly to the modem. The movie downloaded in just over one hour. As far as I can tell, this means that my ISP, other cable users near me, the remote servers, anything wireless-related and my machines' disk speeds can't be at fault. A similar experiment that replaced the Xbox with a wired laptop produced similar results. To me, this says "the router is responsible for things taking around ten times longer to download." My question I'd still prefer to use the router for a few reasons: it's a pain to connect and disconnect everything every time there's a big file to download direct connection to the modem isn't good for security only one machine can be connected directly to the modem at a time What can I do to have fast connection speeds while still using the router? I don't mind turning other machines off, as long as I don't have to mess with power and ethernet cables. EDIT : After asking this followup question and then this one, I installed dd-wrt on my router, and I seem to be getting higher and more consistent speeds. Perhaps more importantly, my memory use is fairly constant. I know this isn't an answer — which is why I'm not posting it as an answer — but it is how I resolved the situation, and hopefully it'll be helpful for someone.

    Read the article

  • Converting gzip files to bzip2 efficiently

    - by sundar
    I have a bunch of gzip files that I have to convert to bzip2 every now and then. Currently, I'm using a shell script that simply 'gunzip's each file and then 'bzip2's it. Though this works, it takes a lot of time to complete. Is it possible to make this process more efficient? I'm ready to take a dive and look into gunzip and bzip2's source codes if necessary, but I just want to be sure of the payoff. Is there any hope of improving the efficiency of the process?

    Read the article

  • How Scan any File or Folder Using Windows 8’s Built-in Anti-Virus

    - by Taylor Gibb
    Windows 8 includes a built-in antivirus solution that runs in the background. You might, however, be surprised that there is no obvious way to scan an item on demand. Here’s how to launch the Windows Defender GUI as well as add a scan option to the context menu. Manually Opening Windows Defender The first way to scan your files is to use the Windows Defender GUI, to do so navigate to: C:\Program Files\Windows Defender Then launch: MSASCui.exe When the GUI opens, choose to do a custom scan, then click the Scan now button. Now choose the folder you want to scan, and then click OK. That’s all there it to it. Scan Using the Context Menu If you don’t fancy opening the GUI, you could always add an option to the context menu. To do so, press the Windows + R keyboard combination to open a run box and type: shell:sendto Then press enter. Now go ahead and download this batch file we wrote, then unzip its contents into the SendTo folder. Now when you right click on a file or folder, you will be able to scan items using the “Send to” menu. Unfortunately it does use the command line scanner, nevertheless it gets the job done. That’s all there is to it. Secure Yourself by Using Two-Step Verification on These 16 Web Services How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot

    Read the article

  • Create Adjustable Depth of Field Photos with a DSLR

    - by Jason Fitzpatrick
    If you’re fascinating by the Lytro camera–a camera that let’s you change the focus after you’ve taken the photo–this DSLR hack provides a similar post-photo focus processing without the $400 price tag. Photography tinkers at The Chaos Collective came up with a clever way of mimicking the adjustable depth-of-field adjustment effect from the Lytro camera. The secret sauce in their technique is setting the camera to manual focus and capturing a short 2-3 second video clip while they rotate the focus through the entire focal range. From there, they use a simple applet to separate out each frame of the video. Check out the interactive demo below: Anywhere you click in the photo shifts the focus to that point, just like the post processing in the Lytro camera. It’s a different approach to the problem but it yields roughly the same output. Hit up the link below for the full run down on their technique and how you can get started using it with your own video-enabled DLSR. Camera HACK: DOF-Changeable Photos with an SLR [via Hack A Day] Secure Yourself by Using Two-Step Verification on These 16 Web Services How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot

    Read the article

  • Departures from Origins and Arrivals at Destinations

    A suggested design for creating flight schedules makes querying easy. Includes basic airport and airlines data. Get started now with this tricky query problem. Make working with SQL a breezeSQL Prompt 5.3 is the effortless way to write, edit, and explore SQL. It's packed with features such as code completion, script summaries, and SQL reformatting, that make working with SQL a breeze. Try it now.

    Read the article

  • the requested resource is not available [closed]

    - by James Pj
    I have written a Java servlet program and run it through local Tomcat 7, But it was showing following error : HTTP Status 404 - /skypark/registration type Status report message /skypark/registration description The requested resource is not available. Apache Tomcat/7.0.33 I don't know what was the reason for it my Html page is <html> <head> <title> User registration </title> </head> <body> <form action="registration" method="post"> <center> <h2><b>Skypark User Registration</b></h2> <table border="0"> <tr><td> First Name </td><td> <input type="text" name="fname"/></br> </td></tr><tr><td> Last Name </td><td> <input type="text" name="lname"/></br> </td></tr><tr><td> UserName </td><td> <input type="text" name="uname"></br> </td></tr><tr><td> Enter Password </td><td> <input type="password" name="pass"></br> </td></tr><tr><td> Re-Type Password </td><td> <input type="password" name="pass1"></br> </td></tr><tr><td> Enter Email ID </td><td> <input type="email" name="email1"></br> </td></tr><tr><td> Phone Number </td><td> <input type="number" name="phone"> </td></tr><tr><td> Gender<br> </td></tr><tr><td> <input type="radio" name="gender" value="Male">Male</input></br> </td></tr><tr><td> <input type="radio" name="gender" value="Female">Female</input></br> </td></tr><tr><td> Enter Your Date of Birth<br> </td><td> <Table Border=0> <tr> <td> Date </td> <td>Month</td> <td>Year</td> </tr><tr> <td> <select name="date"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> . . . have some code . . . </table> <input type="submit" value="Submit"></br> </center> </form> </body> </html> My servlet is : package skypark; import skypark.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class Registration extends HttpServlet { public static Connection prepareConnection()throws ClassNotFoundException,SQLException { String dcn="oracle.jdbc.driver.OracleDriver"; String url="jdbc:oracle:thin:@JamesPJ-PC:1521:skypark"; String usname="system"; String pass="tiger"; Class.forName(dcn); return DriverManager.getConnection(url,usname,pass); } public void doPost(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { resp.setContentType("text/html"); PrintWriter out=resp.getWriter(); try { String phone1,uname,fname,lname,dob,address,city,state,country,pin,email,password,gender,lang,qual,relegion,privacy,hobbies,fav; uname=req.getParameter("uname"); fname=req.getParameter("fname"); lname=req.getParameter("lname"); dob=req.getParameter("date"); address=req.getParameter("address"); city=req.getParameter("city"); state=req.getParameter("state"); country=req.getParameter("country"); pin=req.getParameter("pin"); email=req.getParameter("email1"); password=req.getParameter("password"); gender=req.getParameter("gender"); phone1=req.getParameter("phone"); lang=""; qual=""; relegion=""; privacy=""; hobbies=""; fav=""; int phone=Integer.parseInt(phone1); Connection con=prepareConnection(); String Query="Insert into regdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; PreparedStatement ps=con.prepareStatement(Query); ps.setString(1,uname); ps.setString(2,fname); ps.setString(3,lname); ps.setString(4,dob); ps.setString(5,address); ps.setString(6,city); ps.setString(7,state); ps.setString(8,country); ps.setString(9,pin); ps.setString(10,lang); ps.setString(11,qual); ps.setString(12,relegion); ps.setString(13,privacy); ps.setString(14,hobbies); ps.setString(15,fav); ps.setString(16,gender); int c=ps.executeUpdate(); String query="insert into passmanager values(?,?,?,?)"; PreparedStatement ps1=con.prepareStatement(query); ps1.setString(1,uname); ps1.setString(2,password); ps1.setString(3,email); ps1.setInt(4,phone); int i=ps1.executeUpdate(); if(c==1||c==Statement.SUCCESS_NO_INFO && i==1||i==Statement.SUCCESS_NO_INFO) { out.println("<html><head><title>Login</title></head><body>"); out.println("<center><h2>Skypark.com</h2>"); out.println("<table border=0><tr>"); out.println("<td>UserName/E-Mail</td>"); out.println("<form action=login method=post"); out.println("<td><input type=text name=uname></td>"); out.println("</tr><tr><td>Password</td>"); out.println("<td><input type=password name=pass></td></tr></table>"); out.println("<input type=submit value=Login>"); out.println("</form></body></html>"); } else { out.println("<html><head><title>Error!</title></head><body>"); out.println("<center><b>Given details are incorrect</b>"); out.println(" Please try again</center></body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } } catch(Exception e) { out.println("<html><head><title>Error!</title><body>"); out.println("<b><i>Unable to process try after some time</i></b>"); out.println("</body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } out.flush(); out.close(); } } And the web.xml file is <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <servlet> <servlet-name>reg</servlet-name> <servlet-class>skypark.Registration</servlet-class> </servlet> <servlet-mapping> <servlet-name>reg</servlet-name> <url-pattern>/registration</url-pattern> </servlet-mapping> This i kept in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\web.xml and servlet class in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\classes\skypark and registration.html in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\ if any mistake in this makes above error means please help me.Thanks in advance....

    Read the article

  • Pattern for loading and handling resources

    - by Enoon
    Many times there is the need to load external resources into the program, may they be graphics, audio samples or text strings. Is there a patten for handling the loading and the handling of such resources? For example: should I have a class that loads all the data and then call it everytime I need the data? As in: GraphicsHandler.instance().loadAllData() ...//and then later: draw(x,y, GraphicsHandler.instance().getData(WATER_IMAGE)) //or maybe draw(x,y, GraphicsHandler.instance().WATER_IMAGE) Or should I assign each resource to the class where it belongs? As in (for example, in a game): Graphics g = GraphicsLoader.load(CHAR01); Character c = new Character(..., g); ... c.draw(); Generally speaking which of these two is the more robust solution? GraphicsHandler.instance().getData(WATER_IMAGE) //or GraphicsHandler.instance().WATER_IMAGE //a constant reference

    Read the article

  • What is a business problem?

    - by Juha Untinen
    Can you give an example or two of what a business problem is? I hear this word thrown around a lot, but even after searching, I cannot find a clear answer. Especially when it comes to software development. Are any of these classified as a business problem? Convert invoice from format A to format B Send data from Company A database to Company B database Create a program for time reporting Make the financial software retrieve data faster Generate a weekly data transfer volume statistic Or is a business problem something else?

    Read the article

  • Which are the fundamental stack manipulation operations?

    - by Aadit M Shah
    I'm creating a stack oriented virtual machine, and so I started learning Forth for a general understanding about how it would work. Then I shortlisted the essential stack manipulation operations I would need to implement in my virtual machine: drop ( a -- ) dup ( a -- a a ) swap ( a b -- b a ) rot ( a b c -- b c a ) I believe that the following four stack manipulation operations can be used to simulate any other stack manipulation operation. For example: nip ( a b -- b ) swap drop -rot ( a b c -- c a b ) rot rot tuck ( a b -- b a b ) dup -rot over ( a b -- a b a ) swap tuck That being said however I wanted to know whether I have listed all the fundamental stack manipulation operations necessary to manipulate the stack in any possible way. Are there any more fundamental stack manipulation operations I would need to implement, without which my virtual machine wouldn't be Turing complete?

    Read the article

  • Is Agile the new micromanagement?

    - by Smith James
    This question has been cooking in my head for a while so I wanted to ask those who are following agile/scrum practices in their development environments. My company has finally ventured into incorporating agile practices and has started out with a team of 4 developers in an agile group on a trial basis. It has been 4 months with 3 iterations and they continue to do it without going fully agile for the rest of us. This is due to the fact that management's trust to meet business requirements with a quite a bit of ad hoc type request from high above. Recently, I talked to the developers who are part of this initiative; they tell me that it's not fun. They are not allowed to talk to other developers by their Scrum master and are not allowed to take any phone calls in the work area (which maybe fine to an extent). For example, if I want to talk to my friend for kicks who is in the agile team, I am not allowed without the approval of the Scrum master; who is sitting right next to the agile team. The idea of all this or the agile is to provide a complete vacuum for agile developers from any interruptions and to have them put in good 6+ productive hours. Well, guys, I am no agile guru but what I have read Yahoo agile rollout document and similar for other organizations, it gives me a feeling that agile is not cheap. It require resources and budget to instill agile into the teams and correct issue as they arrive to put them back on track. For starters, it requires training for developers and coaching for managers and etc, etc... The current Scrum master was a manager who took a couple days agile training class paid by the management is now leading this agile team. I have also heard in the meeting that agile manifesto doesn't dictate that agile is not set in stones and is customized differently for each company. Well, it all sounds good and reason. In conclusion, I always thought the agile was supposed to bring harmony in the development teams which results in happy developers. However, I am getting a very opposite feeling when talking to the developers in the agile team. They are unhappy that they cannot talk anything but work, sitting quietly all day just working, and they feel it's just another way for management to make them work more. Tell me please, if this is one of the examples of good practices used for the purpose of selfish advantage for more dollars? Or maybe, it's just us the developers like me and this agile team feels that they don't like to work in an environment where they only breathe work because they are at work. Thanks. Edit: It's a company in healthcare domain that has offices across US. It definitely feels like a cowboy style agile which makes me really not wanting to go for agile at all, esp at my current company. All of it has to do with the management being completely cheap. Cutting out expensive coffee for cheaper version, emphasis on savings and being productive while staying as lean as possible. My feeling is that someone in the management behind the door threw out this idea, that agile makes you produce more so we can show our bosses we're producing more with the same headcount. Or, maybe, it will allow us to reduce headcount if that's the case. EDITED: They are having their 5 min daily meeting. But not allowed to chat or talk with someone outside of their team. All focus is on work.

    Read the article

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