Daily Archives

Articles indexed Tuesday June 15 2010

Page 13/118 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • LBA48 in Linux SCSI ATA Passthrough

    - by Ben Englert
    I am writing a custom disk monitoring/diagnostics app which, among other things, needs to do stuff to SATA disks behind a SAS PCI card under Linux. So far I am following this guide as well as the example code in sg_utils to pass ATA taskfiles through the SCSI layer. Seems to be working okay. However, in both cases, the CDB data structure (pointed to by the cmdp member of the sg_io argument to the ioctl) has only one unsigned char worth of space for the number of sectors. If you look at the ata_taskfile structure in linux\ata.h you'll see that it has an "nsect" and a "hob_nsect" field - high order bits for the sector count, to support LBA48. It turns out that in my application I need LBA48 support. So, anyone know how to set up an sg_io_hdr structure with an LBA48 sector count?

    Read the article

  • PGP Encrypt from C# using GnuPG

    - by Kishore
    Hello All, I'm trying to encrypt a incoming document in C#, and I'm using GnuPG with input redirection. I need to use -se(sign and encrypt) in a single step, which requires entering passphrase. But for some reason, input redirection is not working. Appreciate your help. Control is going to else block. I'm not sure if there is deadlock or child process(gpg.exe) waiting for the input. pgpproc = new Process(); pgpproc.StartInfo.FileName = exeFilePath; pgpproc.StartInfo.RedirectStandardOutput = false; pgpproc.StartInfo.RedirectStandardInput = true; pgpproc.StartInfo.UseShellExecute = false; pgpproc.StartInfo.Arguments = "-a -o C:\PGPStaging\output.pgp -se -r recipientID C:\PGPStaging\input.txt"; pgpproc.StartInfo.CreateNoWindow = true; pgpproc.Start(); StreamWriter myStreamWriter = pgpproc.StandardInput; myStreamWriter.Write("*****"); myStreamWriter.Close(); if (pgpproc.WaitForExit(waittime)) { //success } else { //failure pgpproc.Kill(); pgpproc.WaitForExit(); } `

    Read the article

  • List of drugs for sample data

    - by Skoder
    Where can I find a list of common medical drugs? Researching and typing 150+ drug names would be quite inefficient. In general, are there any sites which have a list of items for developers to use in applications? For example, you can download dictionaries in specific formats (e.g. XML) for use in word games.

    Read the article

  • Has anyone "learned how to program in 21 days?"

    - by Sheehan Alam
    I'm not a fan of these learn how to program in X amount of days books. Some even boast, learn how to program in 24 hours. This is a joke and an insult to me as a software engineer who went through a rigorous discipline in computer science and mathematics. So a question to the community, have you benefited from these become a programmer quick books?

    Read the article

  • Append INPUT to TEXTAREA as being types in JQuery

    - by Ricky
    I have an INPUT text box. As someone types into the INPUT text box, i need it to append/add-to a TEXTAREA value. Lets say user types '12345' into the text box. The textarea (default value="Comment: ") will automatically add: 'Comment: 12345'. Adding '12345' as they type.

    Read the article

  • Screen Resolution Problem In WPF ?

    - by Mohammad
    I'm gonna detect the resolution with the following code in WPF : double height = System.Windows.SystemParameters.PrimaryScreenHeight; double width = System.Windows.SystemParameters.PrimaryScreenWidth; Current resolution of my screen is 1920*1200, but height is 960.0 and width is 1536.0 !!! What's wrong with it ? Thanks in advance.

    Read the article

  • ASP.NET MVC - How do I implement validation when using Data Repositories? (Visual Basic)

    - by rockinthesixstring
    I've built a UserRepository interface to communicate with my LINQ to SQL Data layer, but I'm trying to figure out how to implement validation. Here is what my AddUser subroutine looks like Public Sub AddUser(ByVal about As String, ByVal birthdate As DateTime, ByVal openid As String, ByVal regionid As Integer, ByVal website As String) Implements IUserRepository.AddUser Dim user = New User user.About = about user.BirthDate = birthdate user.LastSeen = DateTime.Now user.MemberSince = DateTime.Now user.OpenID = openid user.RegionID = regionid user.UserName = String.Empty user.WebSite = website dc.Users.InsertOnSubmit(user) dc.SubmitChanges() End Sub And then my controller will simply call AddUser(...) But I haven't the foggiest idea on how to implement both client side and server side validation on this. (I think I would prefer to use jQuery AJAX and do all of the validation on the server, but I'm totally open to opinions)

    Read the article

  • How do i create multiple URLs with /controller/action/ format?

    - by Angela
    I have several controller/actions where no :id needs to be passed. what I did with the first two was make a custom route defining the controller and action. I thought that the default would allow me to create controller/action.xml by using respond_to in the controller, but that doesn't appear to be the right way. How can I create controller/action URL's (some are .xml) without creating a special route with map.connect?

    Read the article

  • dijit style claro not in Google CDN

    - by user256007
    dojo's Theme Tester is Showing theme claro as one available theme in http://archive.dojotoolkit.org/dojo-2010-04-12/dojotoolkit/dijit/themes/themeTester.html?theme=claro But claro is not accessible from Google CDN. I've also tried to use claro from the same place where the ThemeTester is pulling. But layout doesn't look the same. rather it looks broken. However my same code works with other themes

    Read the article

  • Android Add Icon to homescreen to set member variable in broadcast receiver

    - by JonF
    I would like to add some sort of icon that a user can press in order to flip a variable in a broadcast receiver my app uses. Basically I just can a icon that they can press which will flip the value of a boolean in the broadcast receiver, and change the icon to indicate something happened. I think I need to do something with a widget? Could anyone point me in the direction of some tutorial I could check out?

    Read the article

  • Windows 7 Locking up Randomly

    - by Michael Moore
    I've got a Windows 7 machine that is locking up randomly. It can be in the first thirty seconds, or it can be hours later. There is nothing specific I can find that is running when it happens. When it locks, the screen doesn't change, but nothing moves. The waiting icon stops, the mouse stops, keyboard doesn't work, etc. I've even tried the crash on ctrl-scrl registry hack, and it won't even dump the kernel. I've run hardware diagnostics on the RAM and it doesn't find any problems. I would think it is a hardware issue, but on this exact same machine, I can run 64 Bit Ubuntu and it has zero problems. I've even tried reinstalling Windows7 from scratch, and it still happens. Anyone have any ideas? Any good diagnostic tools to recommend? Thanks! Michael

    Read the article

  • tried to update hudson via dashboard and now it doesn;t work (windows)

    - by Tim
    I get the following now in the output log. I really wish I hadn't attempted to update teh version. What a hassle. Can anyone diagnose the issue here? Running from: C:\hudson\hudson.war [Winstone 2010/06/14 23:33:54] - Beginning extraction from war file hudson home directory: C:\hudson [Winstone 2010/06/14 23:33:56] - Error during HTTP listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:33:56] - HTTP Listener shutdown successfully [Winstone 2010/06/14 23:33:56] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled [Winstone 2010/06/14 23:33:56] - Error during AJP13 listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.ajp13.Ajp13Listener.run(Ajp13Listener.java:99) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:33:56] - AJP13 Listener shutdown successfully Running from: C:\hudson\hudson.war [Winstone 2010/06/14 23:38:49] - Beginning extraction from war file hudson home directory: C:\hudson [Winstone 2010/06/14 23:38:51] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled [Winstone 2010/06/14 23:38:51] - Error during AJP13 listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.ajp13.Ajp13Listener.run(Ajp13Listener.java:99) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:38:51] - AJP13 Listener shutdown successfully [Winstone 2010/06/14 23:38:51] - Error during HTTP listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:38:51] - HTTP Listener shutdown successfully

    Read the article

  • Extract dates from filename(C#3.0)

    - by Newbie
    I have a situation where I need to extract dates from the file names whose general pattern is [filename_]YYYYMMDD[.fileExtension] e.g. "xxx_20100326.xls" or x2v_20100326.csv The below program does the work //Number of charecter in the substring is set to 8 //since the length of YYYYMMDD is 8 public static string ExtractDatesFromFileNames(string fileName) { return fileName.Substring(fileName.IndexOf("_") + 1, 8); } Is there any better option of achieving the same? I am basically looking for standard practice. I am using C#3.0 and dotnet framework 3.5 Thanks

    Read the article

  • List show/add/remove View

    - by Michael
    Looking for some best practices of UI list on iPhone which has item add/modify/delete functions. Please refer to some sample codes or articles to build user friendly interface. The main application is tab bar application and one of the tabs supposed to show item management. The item itself consisting of 3 text items, first one can be label, it's short, the rest if it's not terribly complicated I would like to show below with small font or show when user taps on item entering edit mode... Not sure how to design all this and which views to use.

    Read the article

  • "The item you tried to buy is no longer available" storekit error in iphone sdk

    - by aloo
    Hi all, I'm trying to use the StoreKit API in OS3.0 for the iphone to do in app purchase. However, I'm getting the following error when trying to purchase something in the SANDBOX ENVIRONMENT. The item you tried to buy is no longer available [Environment: Sandbox] Here's the code I use to do the payments: SKPayment* payment = [SKPayment paymentWithProductIdentifier:model.productId]; [[SKPaymentQueue defaultQueue] addPayment:payment]; I've also queried storekit for the list of available products and that seems to work just fine returning the same product identifiers that I'm now using to purchase the item. I have all the products setup in iTunes Connect and created a test user. Before debugging the app I signed out of the store in the settings menu and entered my test account and password when debugging my own app. What could be going on here?

    Read the article

  • regular expression repeating subexpression

    - by Michael Z
    I have the following text <pattern name="pattern1"/> <success>success case 1</success> <failed> failure 1</failed> <failed> failure 2</failed> <unknown> unknown </unknown> <pattern name="pattern2"/> <success>success case 2</success> <otherTag>There are many other tags.</otherTag> <failed> failure 3</failed> And the regular expression <failed>[\w|\W]*?</failed> matches all the lines contains failed tag. What do I need to to if I want to include the lines contains pattern tag as well? Basically, I want the following output: <pattern name="pattern1"/> <failed> failure 1</failed> <failed> failure 2</failed> <pattern name="pattern2"/> <failed> failure 3</failed> I am doing this in javascript, I do not mind of doing some intermediate steps.

    Read the article

  • Dealing with distractions

    - by Onorio Catenacci
    How can I cut-out distractions? Are noise-canceling headphones suitable, and are any specific models recommended? I had a fellow programmer that used to use some headphones to help her shut out distractions and focus on her work. Lately I find that I am less able to focus without quiet and therefore I'm thinking of investing in some headphones. I'm sorry – I suppose this is sort of an open-ended question but I don't want to spend $50 on headphones only to find out they won't help me.

    Read the article

  • Move websites from IIS7 to IIS 7.5

    - by Adam Winter
    Can anyone suggest the best way of moving websites on server1 with IIS7 to server2 with IIS 7.5 on it? I've read some articles which suggest copying the applicationHost.config file while preserving the configProtectedData node, but I'm concerned there may be settings in the IIS 7.5 config that don't exist in the current IIS7 config which would be lost. I've also seen suggestions of moving each site individually by using a command like this: AppCmd.exe LIST SITE "My Site" /config /XML mysite.xml This method just takes too long to do this for dozens of sites. There must be a better way of moving all the sites at once to the new platform.

    Read the article

  • Build warning for distribution configuration of an iPad only application

    - by alan
    Hi, I'm getting the following warning when building an ad hoc distribution copy of a new iPad only application: [BWARN]warning: building with 'Targeted Device Family' that includes iPad ('2') requires building with the 3.2 or later SDK. These are my build settings: Architectures: Optimized (armv6 armv7) Any iPhone OS Simulator: i386 Any iPhone OS Device: Optimized (armv6 armv7) Base SDK: iPhone Device 3.2 Valid Architectures: armv6 armv7 Target Device Family: iPad iPhone OS Deployment Target: iPhone OS 3.2 With this in mind I don't understand the warning. It seems to build and run OK but I'd rather not have warnings in my build for obvious reasons. Any ideas? Thanks in advance, Alan.

    Read the article

  • Database users in the Oracle Utilities Application Framework

    - by Anthony Shorten
    I mentioned the product database users fleetingly in the last blog post and they deserve a better mention. This applies to all versions of the Oracle Utilities Application Framework. The Oracle Utilities Application Framework uses up to three users initially as part of the base operations of the product. The type of database supported (the framework supports Oracle, IBM DB2 and Microsoft SQL Server) dictates the number of users used and their permissions. For publishing brevity I will outline what is available for the Oracle database and, in summary, mention where it differs for the other database supported. For Oracle database customers we ship three distinct database users: Administration User (SPLADM or CISADM by default) - This is the database user that actually owns the schema. This user is not used by the product to do any DML (Data Manipulation Language) SQL other than that is necessary for maintenance of the database. This database user performs all the DCL (Data Control Language) and DDL (Data Definition Language) against the database. It is typically reserved for Database Administration use only. Product Read Write User (SPLUSER or CISUSER by default) - This is the database user used by the product itself to execute DML (Data Manipulation Language) statements against the schema owned by the Administration user. This user has the appropriate read and write permission to objects within the schema owned by the Administration user. For databases such as DB2 and SQL Server we may not create this user but use other DCL (Data Control Language) statements and facilities to simulate this user. Product Read User (SPLREAD or CISREAD by default) - This is the database that has read only permission to the schema owned by the Administration user. It is used for reporting or any part of the product or interface that requires read permissions to the database (for example, products that have ConfigLab and Archiving use this user for remote access). For databases such as DB2 and SQL Server we may not create this user but use other DCL (Data Control Language) statements and facilities to simulate this user. You may notice the words by default in the list above. The values supplied with the installer are the default and can be changed to what the site standard or implementation wants to use (as long as they conform to the standards supported by the underlying database). You can even create multiples of each within the same database and pointing to same schema. To manage the permissions for the users, there is a utility provided with the installation (oragensec (Oracle), db2gensec (DB2) or msqlgensec (SQL Server)) that generates the security definitions for the above users. That can be executed a number of times for each schema to give users appropriate permissions. For example, it is possible to define more than one read/write User to access the database. This is a common technique used by implementations to have a different user per access mode (to separate online and batch). In fact you can also allocate additional security (such as resource profiles in Oracle) to limit the impact of specific users at the database. To facilitate users and permissions, in Oracle for example, we create a CISREAD role (read only role) and a CISUSER role (read write role) that can be allocated to the appropriate database user. When the security permissions utility, oragensec in this case, is executed it uses the role to determine the permissions. To give you a case study, my underpowered laptop has multiple installations on it of multiple products but I have one database. I create a different schema for each product and each version (with my own naming convention to help me manage the databases). I create individual users on each schema and run oragensec to maintain the permissions for each appropriately. It works fine as long I have setup the userids appropriately. This means: Creating the users with the appropriate roles. I use the common CISUSER and CISREAD role across versions and across Oracle Utilities Application Framework products. Just remember to associate the CISUSER role with the database user you want to use for read/write operations and the CISREAD role with the user you wish to use for the read only operations. The role is treated as a tag to indicate the oragensec utility which appropriate permissions to assign to the user. The utilities for the other database types essentially do the same, obviously using the technology available within those databases. Run oragensec against the read write user and read only user against the appropriate administration user (I will abbreviate the user to ADM user). This ensures the right permissions are allocated to the right users for the right products. To help me there, I use the same prefix on the user name for the same product. For example, my Oracle Utilities Application Framework V4 environment has the administration user set to FW4ADM and the associated FW4USER and FW4READ as the users for the product to use. For my MWM environment I used MWMADM for the administration user and MWMUSER and MWMREAD for my associated users. You get the picture. When I run oragensec (once for each ADM user), I know what other users to associate with it. Remember to rerun oragensec against the users if I run upgrades, service packs or database based single fixes. This assures that the users are in synchronization with the ADM user. As a side note, for those who do not understand the difference between DML, DCL and DDL: DDL (Data Definition Language) - These are SQL statements that define the database schema and the structures within. SQL Statements such as CREATE and DROP are examples of DDL SQL statements. DCL (Data Control Language) - These are the SQL statements that define the database level permissions to DDL maintained objects within the database. SQL Statements such as GRANT and REVOKE are examples of DCL SQL statements. DML (Database Manipulation Language) - These are SQL statements that alter the data within the tables. SQL Statements such as SELECT, INSERT, UPDATE and DELETE are examples of DML SQL statements. Hope this has clarified the database user support. Remember in Oracle Utilities Application Framework V4 we enhanced this by also supporting CLIENT_IDENTIFIER to allow the database to still use the administration user for the main processing but make the database session more traceable.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >