Daily Archives

Articles indexed Wednesday May 19 2010

Page 21/122 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • asp.net FileUpload control problem: access to directory is denied

    - by citrus
    Hi, Im trying to use the fileupload control. Im using Visual Web Developer Express on my desktop. My web application is working fine except I cant use the fileUpload control. I get the following error: ERROR: Access to the path (My_Directory) is denied I searched and it appears to be a permissions problem. So I attempted to add the user ASPNET and give appropriate permissions to the directory, however, I was unable to add user "ASPNET". User "ASPNET" was not found. So then I followed the following directions to add user ASPNET via Control Panel Administration Computer management. So now I was able to add user ASPNET to the directory and give appropriate permissions but I still got the above error. http://p2p.wrox.com/net-web-services/5918-creating-aspnet-user.html Any ideas on why I cant access the directory?

    Read the article

  • What is the advantage of creating an enumerable object using to_enum in Ruby?

    - by Jason
    Hi, Why would you create a proxy reference to an object in Ruby, by using the to_enum method rather than just using the object directly? I cannot think of any practical use for this, trying to understand this concept & where someone might use it, but all the examples I have seen seem very trivial. For example, why use: "hello".enum_for(:each_char).map {|c| c.succ } instead of "hello".each_char.map {|c| c.succ } I know this is a very simple example, does anyone have any real-world examples? Thanks!

    Read the article

  • Does Visual Studio 2010 on x64 crash often? Or is it just on my PC?

    - by JK
    MY VS2010 crashes dozens of times a day. Compare that to 2008 and 2005 which were rock solid. Is 2010 known to be susceptible to crashing? Or could it be my environment? I'm using x64 as a dev box for the first time. The only plugin I has so far is Ankh. It crashes when doing different things. One I've noticed so far that always happens is if I press the key sequence alt-f-s-up (or any cursor key) it will crash every time.

    Read the article

  • Easiest way to rename a model using Django/South?

    - by vaughnkoch
    Hi everyone, I've been hunting for an answer to this on South's site, google, and SO, but couldn't find a simple way to do this. I want to rename a Django model using South. Say you have the following: class Foo(models.Model): name = models.CharField() class FooTwo(models.Model): name = models.CharField() foo = models.ForeignKey(Foo) and you want to convert Foo to Bar, namely class Bar(models.Model): name = models.CharField() class FooTwo(models.Model): name = models.CharField() foo = models.ForeignKey(Bar) To keep it simple, I'm just trying to change the name from Foo to Bar, but ignore the 'foo' member in FooTwo for now. What's the easiest way to do this using South? a) I could probably do a data migration, but that seems pretty involved. b) Write a custom migration, e.g. db.rename_table('city_citystate', 'geo_citystate'), but I'm not sure how to fix the foreign key in this case. c) An easier way that you know? Thanks!

    Read the article

  • Key combinations for a Hot key

    - by HanuAthena
    We are developing a hot key for one of our application. A key combination that is easy to remember easy to press (especially for people with small fingers) certainly not ctrl-alt-del ;) Which key combination do you suggest for a hot-key?

    Read the article

  • [Sql-Server]what data type to use for password salt and hash values and what length?

    - by Pandiya Chendur
    I am generating salt and hash values from my passwords by using, string salt = CreateSalt(TxtPassword.Text.Length); string hash = CreatePasswordHash(TxtPassword.Text, salt); private static string CreateSalt(int size) { //Generate a cryptographic random number. RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); byte[] buff = new byte[size]; rng.GetBytes(buff); // Return a Base64 string representation of the random number. return Convert.ToBase64String(buff); } private static string CreatePasswordHash(string pwd, string salt) { string saltAndPwd = String.Concat(pwd, salt); string hashedPwd = FormsAuthentication.HashPasswordForStoringInConfigFile( saltAndPwd, "sha1"); return hashedPwd; } What datatype you would suggest for storing these values in sql server? Any suggestion... Salt:9GsPWpFD Hash:E778AF0DC5F2953A00B35B35D80F6262CDBB8567

    Read the article

  • Rails Rake Error with XAMPP mysql database

    - by edu222
    I have installed XAAMP on my win7 machine and I have the apache server/mysql running on there. I set up rails to work with XAmpp as described here: XAMPP and RAILS This tutorial advises you to add this code to the XAMPP httpd.connf : Listen 3000 LoadModule rewrite_module modules/mod_rewrite.so ################################# # RUBY SETUP ################################# <virtualHost *:3000> ServerName rails DocumentRoot "c:/xampp/htdocs/FirstProject/public" <Directory "c:/xampp/htdocs/FirstProject/public/"> Options ExecCGI FollowSymLinks AllowOverride all Allow from all Order allow,deny AddHandler cgi-script .cgi AddHandler fastcgi-script .fcgi </Directory> </VirtualHost> ################################# # RUBY SETUP ################################# Xampp runs on the default localhost and mysql remains unchanged without a pw. I created a rails app with a mysql database like this: rails -d mysql C:/xampp/htdocs/FirstProject Then I started the ruby script/server from within the FirstProject location The localhost:3000/ shows the classic rails welcome I then ran a basic scaffold command: ruby script/generate scaffold FirstProject name:string email:string <br/> When I run the rake db:migrate command I get the following error: C:\xampp\htdocs\FirstProject>rake db:migrate --trace (in C:/xampp/htdocs/FirstProject) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! undefined method `init' for Mysql:Class C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/mysql_adapter.rb:70:in `mysql_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:223:in `send' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:223:in `new_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:245:in `checkout_new_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:188:in `checkout' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:184:in `loop' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:184:in `checkout' C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:183:in `checkout' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:98:in `connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_pool.rb:326:in `retrieve_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_specification.rb:123:in `retrieve_connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_a dapters/abstract/connection_specification.rb:115:in `connection' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb :435:in `initialize' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb :400:in `new' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb :400:in `up' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb :383:in `migrate' C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_c hain' C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_c hain' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exceptio n_handling' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exceptio n_handling' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/Ruby/bin/rake:19:in `load' C:/Ruby/bin/rake:19 Any idea on how to fix this? Thanks in advance

    Read the article

  • Per process I/O accounting on AIX

    - by ipozgaj
    Is there a way of getting per process I/O statistics on AIX, i.e. to get current disk I/O rate of a process? Commands like iostat, nmon, topas etc. can't display such data. Filemon also doesn't help. Actually, what I would need is something much like iotop(1) command on Linux. Update: it seems there is no builtin command(s) to do this. I will most probably make my own by using the SPMI API.

    Read the article

  • Mac OS X 10.5/6, authenticate against by NIS or LDAP when both servers have your username

    - by Wang
    We have an organization-wide LDAP server and a department-only NIS server. Many users have accounts with the same name on both servers. Is there any way to get Leopard/Snow Leopard machines to query one server, and then the other, and let the user log in if his username/password combination matches at least one record? I can get either NIS authentication or LDAP authentication. I can even enable both, with LDAP set as higher priority, and authenticate using the name and password listed on the LDAP server. However, in the last case, if I set the LDAP domain as higher-priority in Directory Utility's search path and then provide the username/password pair listed in the NIS record, then my login is rejected even though the NIS server would accept it. Is there any way to make the OS check the rest of the search path after it finds the username?

    Read the article

  • Analytics on Mobile Phones

    - by Samuh
    Tracking events and setting up Analytics for Websites seems easy. You create an account with one of the Analytics service providers like Google. They give you javascript code that you embed in your pages (whichever event you wish to track) and voila..you're done. I have written a native application for Android phones, which is actually an adaptation of the actual web site. Now, I am required to setup Analytics and tracking for this native application. Question: How to do this on Mobile phones from within a native application? We have Java Script code that works for the original web site. Is there a way to incorporate that in the native application? I know Android supports Java Script via WebViews(Webkit);my application does not have webviews and it is native. Also, I have not worked on JavaScript since school so excuse me if I sound naive. Thanks.

    Read the article

  • Oracle-AmberPoint Webcast: Learn How Your Business Can Profit from the Combination

    - by jyothi.swaroop
    With the recent acquisition of AmberPoint, Oracle now offers an enhanced end-to-end SOA solution that features runtime governance, business transaction management, and cross-platform management capabilities. Put that solution to work and your business can achieve lower costs of implementation and higher profit. Join Ed Horst, Vice President, Oracle (former CMO of AmberPoint), and Ashish Mohindroo, Senior Director, Product Marketing, Oracle, as they discuss in this live Webcast the customer advantages of the Oracle and AmberPoint combination. Learn how our SOA solutions with AmberPoint capabilities can help you: Achieve more agility and visibility into your business processes Increase control and performance of critical applications Improve performance and reduce IT costs to benefit your bottom line Register for the Live Webcast Event Date: Thursday, May 20, 2010 Time: 10 a.m. PT/1 p.m. ET

    Read the article

  • What are the different methods for injecting cross-cutting concerns?

    - by Stacy Vicknair
    What are the different methods for injecting cross-cutting concerns into a class so that I can minimize the coupling of the classes involved while keeping the code testable (TDD or otherwise)? For example, consider if I have a class that requires both logging functionality and centralized exception management. Should I use DIP and inject both required concerns via an interface into the class that requires them? Should I use a service locater that I pass to each class that will require some cross cutting functionality? Is there a different solution altogether? Am I asking the wrong question entirely?

    Read the article

  • How could i use a specific font for my web site.

    - by Mayur
    Hi All, I am Working on new Project. In this web site client used a font (Volta Regular). please tell how can i used it. This font is missing in my Computer, How could i used it. This problem would come with all machine. How could i adjust it through css ? Thanks Mayur

    Read the article

  • How can I discard 2 choices out of 4 from my Array of choice

    - by Umaid
    Actually I have four choice out of which i need to discard to choice on button click like 50/50 , then it will show only 2 choice for user to select out which one is correct and one is wrong -(IBAction)Rebind:(id)sender { if (i == [QuizArray count]) { if([sender tag] == 1) //if([sender tag] == 1) { [self.CorrectArr addObject:@"A"]; //[self.CorrectArr addObject:mydiet.varOpt1]; } else if([sender tag] == 2) { [self.CorrectArr addObject:@"B"]; //[self.CorrectArr addObject:mydiet.varOpt2]; } else if([sender tag] == 3) { [self.CorrectArr addObject:@"C"]; //[self.CorrectArr addObject:mydiet.varOpt3]; } else if([sender tag] == 4) { [self.CorrectArr addObject:@"D"]; //[self.CorrectArr addObject:mydiet.varOpt4]; } Score *myscore = [[Score alloc] initWithNibName:@"Score" bundle:nil]; myscore.SelectedArr = CorrectArr; [self.view addSubview:myscore.view]; } else { NSString *questionstring = [NSString stringWithFormat:[[QuizArray objectAtIndex:i] varQuestion]]; self.myquestion.text = questionstring; [btn1 setTitle:[[AnswerArray objectAtIndex:i] varAnswer] forState:normal]; if([sender tag] == 1) { [self.CorrectArr addObject:@"A"]; //addObject:mydiet.varOpt1]; } else if([sender tag] == 2) { [self.CorrectArr addObject:@"B"]; //addObject:mydiet.varOpt2]; } else if([sender tag] == 3) { [self.CorrectArr addObject:@"C"]; //addObject:mydiet.varOpt3]; } else if([sender tag] == 4) { [self.CorrectArr addObject:@"D"]; //addObject:mydiet.varOpt4]; } } i = i + 1; //} }

    Read the article

  • Mouse down Issue

    - by 3gwebtrain
    HI, I am making my own scroll bar. in which i made this code below i pasted. i am getting the issue from this code. i) in the first time i am pressing "#scroller" that works fine. ii) in case of second or other time when i am enter into "#scroller" itself, i am getting the alert "hi", instead of i am pressing the "#scroller", i know that i am doing some wrong this with my code, but i unable to find the mistake. Any one help me? $(function(){ var slidesWidth = ($('#show-content li').length)*($('#show-content li').width()+20); $('#show-content ul').width(slidesWidth); var scrollBarWidth = (100/slidesWidth)*1000;//presently taken by manual/ $('#scroller').width(scrollBarWidth); $('#scroller').bind('mousedown',function(){ $('#scroller').mousemove(function(){ alert('hi'); }) }) $('#scroller').bind('mouseup',function(){ $('#scroller').unbind('mousedown,mousemove'); alert('unbinded'); }) })

    Read the article

  • Multiple interfaces inhertience. Casting from one to another

    - by yossi1981
    Consider the following set of classes/Interfaces: class IFish{ public: virtual void eat() = 0; } class IFriendly{ public: virtual void protect() = 0; } class IAggresive{ public: virtual void attack(Point inDest) = 0; } class CDolphin : public IFish, IFriendly{ eat... protect.... } class CShark : public IFish, IAggresive{ eat.... attack... } Now I am having the following class void CDiver { Void shouldRunAway(IFish* fish) { //??? } } My question is , can "shouldRunAway" extract from the fish argument whether it is an IAggresive or IFreindly (if it is any of these at all...) is there some kind of casting that can help out?

    Read the article

  • Does a native php (5+) function exist that does the following in 1 line?

    - by Vinh
    function array_value_from_key($array,$key) { return !empty($array[$key]) ? $array[$key] : null; } The reason I ask is because I have a class function that returns an array. Instead of having to do $myArray = myClass::giveMeArray(); $myValue = $myArray[$myKey]; I'd like to do something along the lines of $myValue = array_value_from_key(myClass::giveMeArray(),$myKey); When an object is returned, you can chain the object such as $myValue = myClass::giveMeObject()->aValue; Voila, nice and clean.. not being able to find what seems to be a simple and trivial function is driving me crazy... PS.. one more example of how I'd like to use such a function if(arrayKeyVal(aClass::giveMeArray(),$myKey)) { do_something(); }

    Read the article

  • Remove an empty directory from a ZIP file with PHP

    - by desolat
    PHP brings a class for ZIP file manipulation. It also allows the creation of directories with addEmptyDir() and the deletion of an entry with deleteName(). But the deletion does not work on directories (empty or not). Is there any way to delete empty folders in a ZIP file (prefered is buildin PHP functionality)?

    Read the article

  • ZipArchive memory problems on iPhone for large archive

    - by Mithin
    Hi, I am trying to compress multiple files into a single zip archive and I am running into low memory warning. Since the complete zip file is loaded into the memory I guess that's the problem. Is there a way by which I can manage the compression/decompression better using ZipArchive so that not all the data is in the memory at once? Thanks!

    Read the article

  • Check if value of textbox extended with MaskedEditExtender is valid?

    - by Ismail S
    Below is my code: <asp:TextBox ID="FromDateTextBox" runat="server" /> <asp:ImageButton ID="FromDateImageButton" runat="server" ImageUrl="~/images/calander.png" /> <ajaxkit:CalendarExtender ID="FromDate" runat="server" TargetControlID="FromDateTextBox" CssClass="CalanderControl" PopupButtonID="FromDateImageButton" Enabled="True" /> <ajaxkit:MaskedEditExtender id="FromDateMaskedEditExtender" runat="server" targetcontrolid="FromDateTextBox" Mask="99/99/9999" messagevalidatortip="true" onfocuscssclass="MaskedEditFocus" oninvalidcssclass="MaskedEditError" masktype="Date" displaymoney="Left" acceptnegative="Left" errortooltipenabled="True" /> <ajaxkit:MaskedEditValidator id="FromDateMaskedEditValidator" runat="server" controlextender="FromDateMaskedEditExtender" controltovalidate="FromDateTextBox" emptyvaluemessage="Date is required" invalidvaluemessage="Date is invalid" display="Dynamic" tooltipmessage="Input a date" emptyvalueblurredtext="*" invalidvalueblurredmessage="*" validationgroup="MKE" /> I've set Culture="auto" UICulture="auto" in @Page directive and EnableScriptGlobalization="true" EnableScriptLocalization="true" in script manager to have client culture specific date format in my textbox. I also have a Go button on my page on which I will do a partial post back. So, I want to validate the FromDateTextBox in javascript when the Go button is clicked.

    Read the article

  • Finding custom printer-specific options on *nix

    - by enbuyukfener
    Hey all, I have a printer set up using CUPS (FujiXerox Document Center 1100), it is named DC1100. There are capabilities of the printer that are not shows as options of the printer as listed by: lpoptions -l -d DC1100 The output is below: PrintoutMode/Printout Mode: Draft *Normal High Photo InputSlot/Media Source: Upper Lower MultiPurpose LargeCapacity Manual *Standard PageSize/Page Size: *Letter A4 C5 C6 COM10 DL Executive Legal Monarch Statement PageRegion/PageRegion: Letter A4 C5 C6 COM10 DL Executive Legal Monarch Statement STP_Brightness/Brightness: 0.00 0.02 0.04 [snip] 2.00 STP_Contrast/Contrast: 0.00 0.05 0.10 0.15 [snip] 4.00 STP_ColorCorrection/Color Correction: Accurate Bright Density [snip] Uncorrected STP_DitherAlgorithm/Dither Algorithm: Adaptive EvenTone Fast [snip] VeryFast STP_EnableDensity/Density Enable: *Disabled Enabled STP_Density/Density Value: 0.1 0.2 0.3 0.4 [snip] 8.0 STP_EnableGamma/Composite Gamma Enable: *Disabled Enabled STP_Gamma/Composite Gamma Value: 0.10 0.15 0.20 0.25 [snip] 4.00 STP_LinearContrast/Linear Contrast Adjustment: *False True STP_Duplex/Double-Sided Printing: DuplexNoTumble DuplexTumble *None Resolution/Rendering Resolution: *FromPrintoutMode 150x150dpi 300x300dpi 600x600dpi OutputType/Output Type: *FromPrintoutMode BlackAndWhite Grayscale STP_ImageType/Image Type: *FromPrintoutMode Photo Graphics LineArt None Text TextGraphics STP_Resolution/Resolution: *FromPrintoutMode 150dpi 300dpi 600dpi I am particularly looking for options for: "secure print" (possibly by setting a mode and setting a username) stapling hole punching Perhaps I need a vendor specific driver/PPD file? If so, any pointers as I have no idea where to look for one. I haven't been able to find one on the official site or on sites such as http://www.openprinting.org

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >