Daily Archives

Articles indexed Friday May 21 2010

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

  • How do I configure SQL Server to allow other users to access a database?

    - by Zian Choy
    Environment: Windows 7 Ultimate SQL Server 2005 Express 2 users on the computer I tried making the 2nd user a user in SQL Server (THINKPAD\2ndUser) and adding him to the database ("2ndUser"). Then, I logged in as 2ndUser and started Visual Studio 2008. When I tried to connect to the database, I got the following error message: The database '<bleep>' does not exist or you do not have permission to see it.

    Read the article

  • "A copy of Firefox is already open. Only one copy of Firefox can be open at a time."

    - by Isaac Waller
    I cannot start Firefox on my Mac. It just says "A copy of Firefox is already open. Only one copy of Firefox can be open at a time." I have tried restarting the computer. Any fixes? You have suggested deleting the lock files in my profile, but, I don't have a profile. I was trying to fix the problem in question http://superuser.com/questions/3275/firefox-on-mac-slow-slow-slow by deleting my profile, so I deleted it, and this came up. So I cannot delete the lock files because they don't exist.

    Read the article

  • Fixing mac user file permissions, not the system

    - by Cawas
    Usually those files get wrong permission when coming from the network, even when I copy them from it, but mostly through "file sharing". So, definitely not talking about Disk Utility repair here, please. But regardless of how the file got wrong permission, I know of two bad ways to fix them. One is CMD+I and the other is chown / chmod. The command line isn't all bad but isn't practical either. Some times it's just 1 file I need to repair, sometimes it's a bunch of them. By "repair" I mean 644 for files, 755 for folders, and current user:group for all of them. Isn't there any app / script / automator out there to do that?

    Read the article

  • What SEO Can Do For You

    The main purpose of SEO is to drive free traffic from Google, Yahoo, and Bing to your websites. Traffic is needed to sell products or services, to reach the goal of every website--a lot of visits. But how SEO works?

    Read the article

  • Purpose of SEO

    SEO is known as Search Engine Optimization. This process is carried to increase the traffic to a website which in turn means that the quality of the website and contents are good.

    Read the article

  • how measure complexity of program

    - by gcc
    how does compiler determine there is run-time error ? is it run the code and then decide whether code executable or not are there any program which are capable to determine complexity of my executable code? are there any code which is for measuring the time when code start to execute up to finish

    Read the article

  • json for iphone, download image

    - by alecnash
    I am using json touch to get some data from my server database and everything works fine but I've got a little problem. I have some images stored as longblob in the db and I can't download them to my iphone app. All I get is a 'null' array. Does anyone know why this is happening???

    Read the article

  • Clearly defined Rails routing problem - undefined method for Nil:NilClass

    - by sscirrus
    Guys and girls, I have been working on this problem for a while but still no joy. This is my second question within this general area, because the last question was getting too long and this is now more well-defined. Summary of the Problem: I am loading a page for my customers and I get error: undefined method 'name' for Nil:NilClass My Code #Link on views/users/show.html.erb: <%= link_to "Customer Account", :action => "home", :controller => "customers", :id => @user.user_type_id %> #Regular Route: map.connect 'customers/home/:id', :controller => 'customers', :action => 'home' #Rake Routes, first entry: /customers/home/:id :controller=>:"customers", :action=>"home" #Customers Controller: def home render :layout => 'home' @customer = Customer.find(params[:id]) @user = @current_user_session.user flash[:error] = "Customer not found" and return unless @customer @jobs = @customer.jobs end #views/customers/home.html.erb: <%= @customer.name %> I have absolutely no idea why this seemingly clear sequence of events is resulting in a NilClass. Search the console for Customer.find(2) returns the correct customer. What is this noob missing? Thank you very much.

    Read the article

  • #Error showing up in multiple LEFT JOIN statement Access query when value should be NULL

    - by lar
    I'm trying to return an ID's last 4 years of data, if existing. The table (call it A_TABLE) looks like this: ID, Year, Val The idea behind the query is this: for each ID/Year in the table, LEFT JOIN with Year-1, Year-2, and Year-3 (to get 4 years of data) and then return Val for each year. Here's the SQL: SELECT a.ID, a.year AS [Year], a.Val AS VAL, a1.year AS [Year-1], a1.Val AS [VAL-1], a2.year AS [Year-2], a2.Val AS [VAL-2], a3.year AS [Year-3], a3.Val AS [VAL-3] FROM ( ([A_TABLE] AS a LEFT JOIN [A_TABLE] AS a1 ON (a.ID = a1.ID) AND (a.year = a1.year+1)) LEFT JOIN [A_TABLE] AS a2 ON (a.ID = a2.ID) AND (a.year = a2.year+2)) LEFT JOIN [A_TABLE] AS a3 ON (a.ID = a3.ID) AND (a.year = a3.year+3) The problem is that, for past years where there is no data (eg, Year-1), I see "#Error" in the appropriate VAL column (eg, [VAL-1]). The weird thing is, I see the expected "null" in the Year column (eg, [YEAR-1]). Some sample data: ID YEAR VAL Dave 2004 1 Dave 2006 2 Dave 2007 3 Dave 2008 5 Dave 2009 0 outputs like this: ID YEAR VAL YEAR-1 VAL-1 YEAR-2 VAL-2 YEAR-3 VAL-3 Dave 2004 1 #Error #Error #Error Dave 2006 2 #Error 2004 1 #Error Dave 2007 3 2006 2 #Error 2004 1 Dave 2008 5 2007 3 2006 2 #Error Dave 2009 0 2008 5 2007 3 2006 2 Does that make sense? Why am I getting the appropriate NULL val for the non-existent YEARs, but an #Error for the non-existent VALs? (This is Access 2000. Conditional statements like "IIf(a1.val is null, -999, a1.val)" do not seem to do anything.) EDIT: It turns out that the errors are somehow caused by the fact that A_TABLE is actually a query. When I put all the data into an actual table and run the same query, everything shows up as it should. Thanks for the help, everyone.

    Read the article

  • Is it possible for a Perl subroutine to force its caller to return?

    - by Kinopiko
    If I have Perl module like package X; and an object like my $x = X->new (); Inside X.pm, I write an error handler for $x called handle_error, and I call it sub check_size { if ($x->{size} > 1000) { $x->handle_error (); return; } } Is there any way to make handle_error force the return from its caller routine? In other words, in this example, can I make handle_error do return in check_size without actually writing return there?

    Read the article

  • Why doesn't Perl's Try::Tiny's try/catch give me the same results as eval?

    - by sid_com
    Why doesn't the subroutine with try/catch give me the same results as the eval-version does? #!/usr/bin/env perl use warnings; use strict; use 5.012; use Try::Tiny; sub shell_command_1 { my $command = shift; my $timeout_alarm = shift; my @array; eval { local $SIG{ALRM} = sub { die "timeout '$command'\n" }; alarm $timeout_alarm; @array = qx( $command ); alarm 0; }; die $@ if $@ && $@ ne "timeout '$command'\n"; warn $@ if $@ && $@ eq "timeout '$command'\n"; return @array; } shell_command_1( 'sleep 4', 3 ); say "Test_1"; sub shell_command_2 { my $command = shift; my $timeout_alarm = shift; my @array; try { local $SIG{ALRM} = sub { die "timeout '$command'\n" }; alarm $timeout_alarm; @array = qx( $command ); alarm 0; } catch { die $_ if $_ ne "timeout '$command'\n"; warn $_ if $_ eq "timeout '$command'\n"; } return @array; } shell_command_2( 'sleep 4', 3 ); say "Test_2"

    Read the article

  • "No architectures" error when compiling objective flickr for iphone device

    - by user176723
    I'm getting the following error when I attempt to compile my XCode project to debug on my device. No architectures to compile for (ARCHS=x86_64, VALID_ARCHS=armv6 armv7). I've included ObjectiveFlickr in my project just as the readme describes. I've gone through the process several times and redownloaded objectiveFlickr a few times to start over. I've gotten objectiveFlickr to work on devices in the past. I don't know why I am suddenly having trouble. Can anybody point me to something that might hold the clue I need? Any other info I need to provide? I made only changes to my project that are specified by the OF documentation. I also get this error when compiling the included snap-n-run example project provided with OF. So I must be missing something beneath my project. Thanks, Charlie

    Read the article

  • Magento frontend and backend page looks different

    - by itsandy
    Hi All, I am a newb in magento and recently started looking at it to create a store for my client. I am not sure but i tried installing firephp extension and soon after that I’m having my screen looks like the screenshot. ** please check the link provided! Do I have to make any installations to get everything working as normal or what am I suppose to do to go to the normal screen. I have also changed the inline translation option to NO if thats what it requires. Any help would be appreciated. Cheers I have also posted this question on the magento forum http://www.magentocommerce.com/boards/viewthread/193499/

    Read the article

  • Is this a valid XPath expression?

    - by sid_com
    Is this xpath a valid XPath expression? (It does what it should ). #!/usr/bin/env perl use strict; use warnings; use 5.012; use XML::LibXML; my $string =<<EOS; <result> <cd> <artists> <artist class="1">Pumkinsingers</artist> <artist class="2">Max and Moritz</artist> </artists> <title>Hello, Hello</title> </cd> <cd> <artists> <artist class="3">Green Trees</artist> <artist class="4">The Leons</artist> </artists> <title>The Shield</title> </cd> </result> EOS #/ my $parser = XML::LibXML->new(); my $doc = $parser->load_xml( string => $string ); my $root = $doc->documentElement; my $xpath = '/result/cd[artists[artist[@class="2"]]]/title'; my @nodes = $root->findnodes( $xpath ); for my $node ( @nodes ) { say $node->textContent; }

    Read the article

  • Need some code modification in jquery slider plugin

    - by Mirage
    I am using JCarousel plugin for sliders. It is working fine. But i wan this effect in another plugin called moving boxes I have 3 List items in Jcarousel. i want that the middle should expand like in moving boxes. There are two functions in moving boxes JS file called slider.js returnToNormal("#panel_"+curPanel); growBigger("#panel_"+next); But i don't know how i can insert those in Jcarousel

    Read the article

  • Mac-native text editor that can syntax-highlight diff files?

    - by strawtarget
    I do something like "svn diff /mystuff/current.diff". I want to view this .diff file with syntax highlighting. jEdit does it, but it's a huge beast and it takes a while to start up. I want something lightweight/native. Smultron/Fraise, TextWrangler, TextEdit, Dashcode don't seem to highlight .diff files. FileMerge seems to want to generate diff files, not show you existing ones. TextMate does the trick, but it's not free. I'd feel happier dropping $50 US if I was going to take advantage of it for anything more than a diff viewer. Are there any alternatives to jEdit or TextMate that I should consider?

    Read the article

  • How to JSON serialize math vector type in F#?

    - by The_Ghost
    Hello! I'm trying to serialize "vector" (Microsoft.FSharp.Math) type. And I get that error: Exception Details: System.Runtime.Serialization.SerializationException: Type 'Microsoft.FSharp.Math.Instances+FloatNumerics@115' with data contract name 'Instances.FloatNumerics_x0040_115:http://schemas.datacontract.org/2004/07/Microsoft.FSharp.Math' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer. I have tried to put KnownType attribute and some other stuff, but nothing helps! Could someone know the answer? This is the code I use: // [< KnownType( typeof<vector> ) >] type MyType = vector let public writeTest = let aaa = vector [1.1;2.2] let serializer = new DataContractJsonSerializer( typeof<MyType> ) let writer = new StreamWriter( @"c:\test.txt" ) serializer.WriteObject(writer.BaseStream, aaa) writer.Close()

    Read the article

  • Trouble when changing pixel data with alpha on png on iphone --okay on simulator

    - by Ted
    I'm trying to change the color of the pixels (lighten or darken) without changing the value of the alpha channel using CGDataProviderCopyData. I leave every 4th databyte untouched. It work fine of the iphone simulator, however on the real thing the alpha goes white as I increase the values of the other pixels. I've tried changing just the first byte, or the second, or the third. Does anybody have any idea what is going on? The basic code is borrowed from Jorge. I like this simple approach --I'm new to this. But I want to make it work with png images with some transparency. here is most of the code by Jorge : CFDataRef CopyImagePixels(CGImageRef inImage){ return CGDataProviderCopyData(CGImageGetDataProvider(inImage)); } CGImageRef img=originalImage.CGImage; CFDataRef dataref=CopyImagePixels(img); UInt8 *data=(UInt8 *)CFDataGetBytePtr(dataref); int length=CFDataGetLength(dataref); for(int index=0;index255){ data[index+i]=255; }else{ data[index+i]+=value; } } } } size_t width=CGImageGetWidth(img); size_t height=CGImageGetHeight(img); size_t bitsPerComponent=CGImageGetBitsPerComponent(img); size_t bitsPerPixel=CGImageGetBitsPerPixel(img); size_t bytesPerRow=CGImageGetBytesPerRow(img); CGColorSpaceRef colorspace=CGImageGetColorSpace(img); CGBitmapInfo bitmapInfo=CGImageGetBitmapInfo(img); CGImageAlphaInfo alphaInfo = kCGBitmapAlphaInfoMask(img); NSLog(@"bitmapinfo: %d",bitmapInfo); CFDataRef newData=CFDataCreate(NULL,data,length); CGDataProviderRef provider=CGDataProviderCreateWithCFData(newData); CGImageRef newImg=CGImageCreate(width,height,bitsPerComponent,bitsPerPixel,bytesPerRow,colorspace,bitmapInfo,provider,NULL,true,kCGRenderingIntentDefault); [iv setImage:[UIImage imageWithCGImage:newImg]]; CGImageRelease(newImg); CGDataProviderRelease(provider);

    Read the article

  • "Computer Locked" dialog does not appear

    - by Gooch
    When I lock my computer, instead of seeing the "Computer Locked" dialog, I only see the "Unlock Computer" dialog with my user name populated and my password box has focus. I am not prompted to Ctrl+Alt+Del to first get to the "Unlock Computer" dialog. This concerns, as nearly all of my other Windows XP machines do display the "Computer Locked" dialog and force a Ctrl+Alt+Del sequence to get to the "Unlock Computer" dialog. I cannot find a setting, registry or otherwise, that addresses this. I am running Windows XP Pro (version 2002) SP3

    Read the article

  • Switching languajes on a website with PHP

    - by jnkrois
    Hello everybody, I'm just looking for some advice. I'm creating a website that offers (at least) 2 languages. The way I'm setting it up is by using XML files for the language, PHP to retrieve the values in the XML nodes. Say you have any XML file, being loaded as follows: <?php $lang = "en"; $xmlFile = simplexml_load_file("$lang/main.xml"); ?> Once the file contents are available, I just output each node into an HTML tag like so: <li><?php echo $xmlFile->navigation->home; ?></li> which in turn is equal to : <li><a href="#">Home</a></li> as a nav bar link. Now, the way in which I'm switching languages is by changing the value of the "$lang" variable, through a "$_POST", like so: if(isset($_POST['es'])){ $lang = "es"; }elseif(isset($_POST['en'])){ $lang = "en"; } The value of the "$lang" variable is reset and the new file is loaded, loading as well all the new nodes from the new XML file, hence changing the language. I'm just wondering if there is another way to reset the "$lang" variable using something else, other than "$_POST" or "$_GET". I don't want to use query string either. I know I could use JavaScript or jQuery to achieve this, but I'd like to make the site not too dependable on JavaScript. I'd appreciate any ideas or advice. Thanks

    Read the article

  • Transform Search String into FullText Compatible Search String?

    - by Alex
    I'm working with the fulltext search engine of MSSQL 2008 which expects a search string like this: ("keyword1" AND "keyword2*" OR "keyword3") My users are entering things like this: engine 2009 "san francisco" hotel december xyz stuff* "in miami" 1234 something or "something else" I'm trying to transform these into fulltext engine compatible strings like these: ("engine" AND "2009") ("san francisco" AND "hotel" AND "december" AND "xyz") ("stuff*" "in miami" "1234") ("something" OR "something else") I have a really difficult time with this, tried doing it using counting quotation marks, spaces and inserting etc. but my code looks like horrible for-and-if vomit. Can someone help?

    Read the article

  • Hide *.inc.php from website visitors

    - by Ghostrider
    I have a script myscript.inc.php which handles all urls that look like /script-blah I accomplish this by using following .htaccess RewriteEngine On RewriteRule ^script-(.*)$ myscript.inc.php?s=$1 [QSA,L] However users could also access it this way by typing /myscript.inc.php?s=blah I would like to prevent that. I tried <Files ~ "\.inc\.php$"> Order deny,allow Deny from all </Files> and RewriteCond %{REQUEST_URI} \.inc\.php RewriteRule .* - [F,L,NS] They both prevent users from viewing /myscript.inc.php?s=blah but they also cause /script-blah to return 403... Is there a way to do this correctly?

    Read the article

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