Daily Archives

Articles indexed Tuesday July 10 2012

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

  • Getting a Specified Cast is not valid while importing data from Excel using Linq to SQL

    - by niceoneishere
    This is my second post. After learning from my first post how fantastic is to use Linq to SQL, I wanted to try to import data from a Excel sheet into my SQL database. First My Excel Sheet: it contains 4 columns namely ItemNo ItemSize ItemPrice UnitsSold I have a created a database table with the following fields table name ProductsSold Id int not null identity --with auto increment set to true ItemNo VarChar(10) not null ItemSize VarChar(4) not null ItemPrice Decimal(18,2) not null UnitsSold int not null Now I created a dal.dbml file based on my database and I am trying to import the data from excel sheet to db table using the code below. Everything is happening on click of a button. private const string forecast_query = "SELECT ItemNo, ItemSize, ItemPrice, UnitsSold FROM [Sheet1$]"; protected void btnUpload_Click(object sender, EventArgs e) { var importer = new LinqSqlModelImporter(); if (fileUpload.HasFile) { var uploadFile = new UploadFile(fileUpload.FileName); try { fileUpload.SaveAs(uploadFile.SavePath); if(File.Exists(uploadFile.SavePath)) { importer.SourceConnectionString = uploadFile.GetOleDbConnectionString(); importer.Import(forecast_query); gvDisplay.DataBind(); pnDisplay.Visible = true; } } catch (Exception ex) { Response.Write(ex.Source.ToString()); lblInfo.Text = ex.Message; } finally { uploadFile.DeleteFileNoException(); } } } // Now here is the code for LinqSqlModelImporter public class LinqSqlModelImporter : SqlImporter { public override void Import(string query) { // importing data using oledb command and inserting into db using LINQ to SQL using (var context = new WSDALDataContext()) { using (var myConnection = new OleDbConnection(base.SourceConnectionString)) using (var myCommand = new OleDbCommand(query, myConnection)) { myConnection.Open(); var myReader = myCommand.ExecuteReader(); while (myReader.Read()) { context.ProductsSolds.InsertOnSubmit(new ProductsSold() { ItemNo = myReader.GetString(0), ItemSize = myReader.GetString(1), ItemPrice = myReader.GetDecimal(2), UnitsSold = myReader.GetInt32(3) }); } } context.SubmitChanges(); } } } can someone please tell me where am I making the error or if I am missing something, but this is driving me nuts. When I debugged I am getting this error when casting from a number the value must be a number less than infinity I really appreciate it

    Read the article

  • pandas: complex filter on rows of DataFrame

    - by duckworthd
    I would like to filter rows by a function of each row, e.g. def f(row): return sin(row['velocity'])/np.prod(['masses']) > 5 df = pandas.DataFrame(...) filtered = df[apply_to_all_rows(df, f)] Or for another more complex, contrived example, def g(row): if row['col1'].method1() == 1: val = row['col1'].method2() / row['col1'].method3(row['col3'], row['col4']) else: val = row['col2'].method5(row['col6']) return np.sin(val) df = pandas.DataFrame(...) filtered = df[apply_to_all_rows(df, g)] How can I do so?

    Read the article

  • How can I change the Python that my Django project is using?

    - by Burak
    I have 2 versions installed in my server. I used virtualenv to install Python 2.7. I am using WSGI to deploy my project. WSGIPythonPath /home/ENV/lib/python2.7/site-packages WSGIScriptAlias / /var/www/html/my_project/wsgi.py My http.conf is like that. python -V gives Python 2.7.3 But in my projects Debug window, it says Django is using 2.6.8. Where am I wrong? UPDATE: Here is my wsgi file import os import sys sys.path.append('/var/www/html') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application() Python Version: 2.6.8 Python Path: ['/home/ENV/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/home/ENV/lib/python2.7/site-packages/pip-1.1-py2.7.egg', '/home/ENV/lib/python2.7/site-packages/Django-1.4-py2.7.egg', '/home/ENV/lib/python2.7/site-packages', '/usr/lib/python2.6/site-packages/pip-1.1-py2.6.egg', '/usr/lib/python2.6/site-packages/django_transmeta-0.6.7-py2.6.egg', '/usr/lib/python2.6/site-packages/ipython-0.13-py2.6.egg', '/usr/lib/python2.6/site-packages/virtualenv-1.7.2-py2.6.egg', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info', '/var/www/html'] In my error_log of httpd: [Tue Jul 10 20:51:29 2012] [error] python_init: Python version mismatch, expected '2.6.7', found '2.6.8'. [Tue Jul 10 20:51:29 2012] [error] python_init: Python executable found '/usr/bin/python'. [Tue Jul 10 20:51:29 2012] [error] python_init: Python path being used '/usr/lib64/python26.zip:/usr/lib64/python2.6/:/usr/lib64/python2.6/plat-linux2:/usr/lib64/python2.6/lib-tk:/usr/lib64/python2.6/lib-old:/usr/lib64/python2.6/lib-dynload'.

    Read the article

  • StructureMap Open Generic Types

    - by Shane Fulmer
    I have the following classes: public interface IRenderer<T> { string Render(T obj); } public class Generic<T> { } public class SampleGenericRenderer<T> : IRenderer<Generic<T>> { public string Render(Generic<T> obj) { throw new NotImplementedException(); } } I would like to be able to call StructureMap with ObjectFactory.GetInstance<IRenderer<Generic<string>>>(); and receive SampleGenericRenderer<string>. I'm currently using the following registration and receiving this error when I call GetInstance. "Unable to cast object of type 'ConsoleApplication1.SampleGenericRenderer'1[ConsoleApplication1.Generic'1[System.String]]' to type 'ConsoleApplication1.IRenderer'1[ConsoleApplication1.Generic'1[System.String]]'." public class CoreRegistry : Registry { public CoreRegistry() { Scan(assemblyScanner => { assemblyScanner.AssemblyContainingType(typeof(IRenderer<>)); assemblyScanner.AddAllTypesOf(typeof(IRenderer<>)); assemblyScanner.ConnectImplementationsToTypesClosing(typeof(IRenderer<>)); }); } } Is there any way to configure StructureMap so that it creates SampleGenericRenderer<string> instead of SampleGenericRenderer<Generic<string>>?

    Read the article

  • magento category tree menu query being called on every page

    - by user1173309
    I have this query being called on every page in Magento CE 1.6.2, to find out where is it being called from, I have disabled all modules, removed the customizations done but it's still being called, this query is slowing up the page loading time and am at my wit's end trying to find out how can I stop it from being executed. The query is given below, for simplcitiy, I have removed lot of category id' to keep the sql short, it would be great if I could get solutions or hints to stop this query being called. SELECT e.*, IF(at_is_active.value_id 0, at_is_active.value, at_is_active_default.value) AS is_active, IF(at_include_in_menu.value_id 0, at_include_in_menu.value, at_include_in_menu_default.value) AS include_in_menu, core_url_rewrite.request_path FROM catalog_category_entity AS e INNER JOIN catalog_category_entity_int AS at_is_active_default ON (at_is_active_default.entity_id = e.entity_id) AND (at_is_active_default.attribute_id = '119') AND at_is_active_default.store_id = 0 LEFT JOIN catalog_category_entity_int AS at_is_active ON (at_is_active.entity_id = e.entity_id) AND (at_is_active.attribute_id = '119') AND (at_is_active.store_id = 1) INNER JOIN catalog_category_entity_int AS at_include_in_menu_default ON (at_include_in_menu_default.entity_id = e.entity_id) AND (at_include_in_menu_default.attribute_id = '934') AND at_include_in_menu_default.store_id = 0 LEFT JOIN catalog_category_entity_int AS at_include_in_menu ON (at_include_in_menu.entity_id = e.entity_id) AND (at_include_in_menu.attribute_id = '934') AND (at_include_in_menu.store_id = 1) LEFT JOIN core_url_rewrite ON (core_url_rewrite.category_id=e.entity_id) AND (core_url_rewrite.is_system=1 AND core_url_rewrite.product_id IS NULL AND core_url_rewrite.store_id='1' AND id_path LIKE 'category/%') WHERE (e.entity_type_id = '9') AND (e.entity_id IN('105', '125', '284', '285', '286', '288', '289', '185', '463', '464', '465', '625')) AND (e.entity_id NOT IN('140', '145', '530', '531', '775')) AND (IF(at_is_active.value_id 0, at_is_active.value, at_is_active_default.value) = '1') AND (IF(at_include_in_menu.value_id 0, at_include_in_menu.value, at_include_in_menu_default.value) = '1') Cheers Arjun

    Read the article

  • Hard Drive POV clock

    - by SkinnyMAN
    I am building a hard drive POV clock. (google it, they are pretty cool) I am working on the code for it, right now all i want to do is get the hang of making it do simple patterns with the RGB leds. I am wondering if anyone has any ideas on how to do something simple like make a red line rotate around the platter. right now what i have is an interrupt that triggers a function. int gLED = 8; // pins for RGB led strip int rLED = 9; int bLED = 10; attachInterrupt(0, ledPattern, FALLING); void ledPattern(){ digitalWrite(gLED, HIGH); // This will make a stable image of slice of the delayMicroseconds(500); // platter, but it does not move. digitalWrite(gLED, LOW); } That is the main part of the code (obviously I cut some stuff out that arduino requires) What I am trying to figure out is how can make that slice rotate around the platter. Eventually I will make the pattern more interesting by adding in other colors. Any Ideas?

    Read the article

  • Compiling PAR for Perl under Windows

    - by lngo
    I've downloaded PAR from http://par.perl.org/wiki/Main_Page and compiled it after reading the README file. I've used dmake-4.12-20090907 instead of nmake ('cause 1.5 does not work) from http://search.cpan.org/dist/dmake/. No problems during the installing proccess (repeating the install proccess doesn't help farther, no warnings, just less text output), but there is no pp.exe or something similar. I'm using Windows XP, all compilations were done on the c drive. perl -v "This is perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x86-multi-thread"

    Read the article

  • Google Maps API Office Hours

    Google Maps API Office Hours Interested in knowing more about the Google Maps API announcements that were made at I/O? During this week's Google Maps API Office Hours, +Josh Livni and +Paul Saxman will give an overview of the Google Maps API features that were announced at I/O, and will talk about the I/O session content that is now available online. The next Office Hours will be this Tuesday at 11am, Pacific Time. Bring your questions, and join us there! From: GoogleDevelopers Views: 167 9 ratings Time: 21:25 More in Science & Technology

    Read the article

  • Google I/O 2012 - Beyond Paper: Google Cloud Print and the Future of Printing

    Google I/O 2012 - Beyond Paper: Google Cloud Print and the Future of Printing Akshay Kannan Use Google Cloud Print's API to send documents to a printer (or anywhere else) quickly and easily. We're currently integrated with Chrome, ChromeOS, mobile Gmail/Docs, and most new printers, and that's just the start. We provide a configurable JavaScript API, an Android Intent, as well as HTTP and XMPP interfaces for sending documents and receiving them in virtually any format. Come learn how to enable printing from your web and mobile apps on any device to any printer in the world, with just a few lines of code! For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 41 1 ratings Time: 01:06:43 More in Science & Technology

    Read the article

  • Google I/O 2012 - Writing Secure Web Apps and Chrome Extensions

    Google I/O 2012 - Writing Secure Web Apps and Chrome Extensions Jorge Lucangeli Obes Today, a carefully developed web app can boast a high level of security, by taking advantage of several technologies: HTML5, CSP, NaCl, and the Chrome extension framework. The objective of this session is to show how these technologies allow a developer to create a web app that rivals or exceeds a desktop app in features, while remaining more secure than its desktop counterpart. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 46 1 ratings Time: 56:16 More in Science & Technology

    Read the article

  • Google I/O 2012 - Knowledge-Based Application Design Patterns

    Google I/O 2012 - Knowledge-Based Application Design Patterns Shawn Simister In this talk we'll look at emerging design patterns for building web applications that take advantage of large-scale, structured data. We'll look at open datasets like Wikipedia and Freebase as well as structured markup like Schema.org and RDFa to see what new types of applications these technologies open up for developers. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1 0 ratings Time: 56:55 More in Science & Technology

    Read the article

  • Google I/O 2012 - Big Data: Turning Your Data Problem Into a Competitive Advantage

    Google I/O 2012 - Big Data: Turning Your Data Problem Into a Competitive Advantage Ju-kay Kwek, Navneet Joneja Can businesses get practical value from web-scale data without building proprietary web-scale infrastructure? This session will explore how new Google data services can be used to solve key data storage, transformation and analysis challenges. We will look at concrete case studies demonstrating how real life businesses have successfully used these solutions to turn data into a competitive business asset. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1 0 ratings Time: 52:39 More in Science & Technology

    Read the article

  • Google I/O 2012 - High Performance HTML5

    Google I/O 2012 - High Performance HTML5 For years we built web apps that far outpaced the capabilities of the browsers they ran in. Just as the browsers were catching up HTML5 came on the scene - video and audio, canvas, SVG, app cache, localStorage, @font-face, and more. Now the browsers are racing to stay ahead of the wave that's building as developers adopt these new capabilities. Is your HTML5 app going to ride the wave or be dashed on the rocks leaving users stranded? Learn which HTML5 features to seek out and which to avoid when it comes to building fast HTML5 web apps. This session will be live captioned. From: GoogleDevelopers Views: 91 1 ratings Time: 01:02:07 More in Science & Technology

    Read the article

  • Google I/O 2012 - Gaming in the Cloud

    Google I/O 2012 - Gaming in the Cloud "Fred Sauer Many games developers are finding the easy development and deployment experience of Google App Engine ideal for building cloud based state-storage, matching making services and collaborations services. When you have a hit game, the last thing you want to do is worry about your server provisioning. App Engine has an always-free tier to get you started and then scales seamlessly to any size of usage. Game developers also use Google Cloud Storage to easily store and quickly deliver media files to clients around the world. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1 0 ratings Time: 01:02:17 More in Science & Technology

    Read the article

  • Google I/O 2012 - Making Google Product Search Work for You Using the Content API for Shopping

    Google I/O 2012 - Making Google Product Search Work for You Using the Content API for Shopping Mayuresh Saoji, Danny Hermes To get the best out of product search, merchants need to provide complete and accurate product information, as well as fresh price and availability data for all products. This session will provide merchants with concrete steps they can take to improve their data quality using the Content API for Shopping. We will provide details on when it makes sense to use the Content API to submit data (as opposed to Feeds), and how to use the API. We will also go into details on how to debug API requests and errors, and talk about general best practices to follow in order to use the API optimally and efficiently. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 35 1 ratings Time: 43:50 More in Science & Technology

    Read the article

  • Google I/O 2012 - It's a Startup World

    Google I/O 2012 - It's a Startup World Erik Hersman, Eden Shochat, Jon Bradford, Jeffery Paine, Jehan Ara Tech innovators and entrepreneurs across the world are building technologies that delight users, solve problems, and result in scaled local and global businesses. The web is a global platform, and as a developer or entrepreneur your audience is tool. Hear the unique perspectives from a panel of entrepreneurs and VCs around the world who have succeeded in creating, launching, and scaling unique endeavors from Israel, the UK, Kenya, Singapore to Pakistan. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 54 2 ratings Time: 59:54 More in Science & Technology

    Read the article

  • Google I/O 2012 - Ten Things Game Developers Should Know

    Google I/O 2012 - Ten Things Game Developers Should Know Dan Galpin, Ian Lewis This session reveals the things experienced game developers do to get good Google Play reviews, create a strong Android user experience, and be considered for featuring in Google Play Apps. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1 0 ratings Time: 56:54 More in Science & Technology

    Read the article

  • Google I/O 2012 - Playing with Patterns

    Google I/O 2012 - Playing with Patterns "Marco Paglia Best-in-class application designers and developers will talk about their experience in developing for Android, showing screenshots from their app, exploring the challenges they faced, and offering creative solutions congruent with the Android Design guide. Guests will be invited to show examples of visual and interaction patterns in their application that manage to keep it simultaneously consistent and personal. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1 0 ratings Time: 02:13:20 More in Science & Technology

    Read the article

  • Google I/O 2012 - Android WebView

    Google I/O 2012 - Android WebView Nicolas Roard Hundred of thousands of Android applications use WebView to display HTML content. In Android 4.0 it's hardware-accelerated, which allows support for HTML5 features such as inline video, CSS 3d, CSS animations, and overflow elements. This talk will give an overview of the underlying implementation in ICS, explain how to best take advantage of WebView in your application, and cover best practices for high-performance HTML code. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 83 3 ratings Time: 52:04 More in Science & Technology

    Read the article

  • Pluralsight Meet the Author Podcast on HTML5 Canvas Programming

    - by dwahlin
      In the latest installment of Pluralsight’s Meet the Author podcast series, Fritz Onion and I talk about my new course, HTML5 Canvas Fundamentals.  In the interview I describe different canvas technologies covered throughout the course and a sample application at the end of the course that covers how to build a custom business chart from start to finish. Meet the Author:  Dan Wahlin on HTML5 Canvas Fundamentals   Transcript [Fritz] Hi. This is Fritz Onion. I’m here today with Dan Wahlin to talk about his new course HTML5 Canvas Fundamentals. Dan founded the Wahlin Group, which you can find at thewahlingroup.com, which specializes in ASP.NET, jQuery, Silverlight, and SharePoint consulting. He’s a Microsoft Regional Director and has been awarded Microsoft’s MVP for ASP.NET, Connected Systems, and Silverlight. Dan is on the INETA Bureau’s — Speaker’s Bureau, speaks at conferences and user groups around the world, and has written several books on .NET. Thanks for talking to me today, Dan. [Dan] Always good to talk with you, Fritz. [Fritz] So this new course of yours, HTML5 Canvas Fundamentals, I have to say that most of the really snazzy demos I’ve seen with HTML5 have involved Canvas, so I thought it would be a good starting point to chat with you about why we decided to create a course dedicated just to Canvas. If you want to kind of give us that perspective. [Dan] Sure. So, you know, there’s quite a bit of material out there on HTML5 in general, and as people that have done a lot with HTML5 are probably aware, a lot of HTML5 is actually JavaScript centric. You know, a lot of people when they first learn it, think it’s tags, but most of it’s actually JavaScript, and it just so happens that the HTML5 Canvas is one of those things. And so it’s not just, you know, a tag you add and it just magically draws all these things. You mentioned there’s a lot of cool things you can do from games to there’s some really cool multimedia applications out there where they integrate video and audio and all kinds of things into the Canvas, to more business scenarios such as charting and things along those lines. So the reason we made a course specifically on it is, a lot of the material out there touches on it but the Canvas is actually a pretty deep topic. You can do some pretty advanced stuff or easy stuff depending on what your application requirements are, and the API itself, you know, there’s over 30 functions just in the Canvas API and then a whole set of properties that actually go with that as well. So it’s a pretty big topic, and that’s why we created a course specifically tailored towards just the Canvas. [Fritz] Right. And let’s — let me just review the outline briefly here for everyone. So you start off with an introduction to getting started with Canvas, drawing with the HTML5 Canvas, then you talk about manipulating pixels, and you finish up with building a custom data chart. So I really like your example flow here. I think it will appeal to even business developers, right. Even if you’re not into HTML5 for the games or the media capabilities, there’s still something here for everyone I think working with the Canvas. Which leads me to another question, which is, where do you see the Canvas fitting in to kind of your day-to-day developer, people that are working business applications and maybe vanilla websites that aren’t doing kind of cutting edge stuff with interactivity with users? Is there a still a place for the Canvas in those scenarios? [Dan] Yeah, definitely. I think a lot of us — and I include myself here — over the last few years, the focus has generally been, especially if you’re, let’s say, a PHP or ASP.NET or Java type of developer, we’re kind of accustomed to working on the server side, and, you know, we kind of relied on Flash or Silverlight or these other plug-ins for the client side stuff when it was kind of fancy, like charts and graphs and things along those lines. With the what I call massive shift of applications, you know, mainly because of mobile, to more of client side, one of the big benefits I think from a maybe corporate standard way of thinking of things, since we do a lot of work with different corporations, is that, number one, rather than having to have the plug-in, which of course isn’t going to work on iPad and some of these other devices out there that are pretty popular, you can now use a built-in technology that all the modern browsers support, and that includes things like Safari on the iPad and iPhone and the Android tablets and things like that with their browsers, and actually render some really sophisticated charts. Whether you do it by scratch or from scratch or, you know, get a third party type of library involved, it’s just JavaScript. So it downloads fast so it’s good from a performance perspective; and when it comes to what you can render, it’s extremely robust. You can do everything from, you know, your basic circles to polygons or polylines to really advanced gradients as well and even provide some interactivity and animations, and that’s some of the stuff I touch upon in the class. In fact, you mentioned the last part of the outline there is building a custom data chart and that’s kind of gears towards more of the, what I’d call enterprise or corporate type developer. [Fritz] Yeah, that makes sense. And it’s, you know, a lot of the demos I’ve seen with HTML5 focus on more the interactivity and kind of game side of things, but the Canvas is such a diverse element within HTML5 that I can see it being applicable pretty much anywhere. So why don’t we talk a little bit about some of the specifics of what you cover? You talk about drawing and then manipulating pixels. You want to kind of give us the different ways of working with the Canvas and what some of those APIs provide for you? [Dan] Sure. So going all the way back to the start of the outline, we actually started off by showing different demonstrations of the Canvas in action, and we show some fun stuff — multimedia apps and games and things like that — and then also some more business scenarios; and then once you see that, hopefully it kinds of piques your interest and you go, oh, wow, this is actually pretty phenomenal what you can do. So then we start you off with, so how to you actually draw things. Now, there are some libraries out there that will draw things like graphs, but if you want to customize those or just build something you have from scratch, you need to know the basics, such as, you know, how do you draw circles and lines and arcs and Bezier curves and all those fancy types of shapes that a given chart may have on it or that a game may have in it for that matter. So we start off by covering what I call the core API functions; how do you, for instance, fill a rectangle or convert that to a square by setting the height and the width; how do you draw arcs or different types of curves and there’s different types supported such as I mentioned Bezier curves or quadratic curves; and then we also talk about how do you integrate text into it. You might have some images already that are just regular bitmap type images that you want to integrate, you can do that with a Canvas. And you can even sync video into the Canvas, which actually opens up some pretty interesting possibilities for both business and I think just general multimedia apps. Once you kind of get those core functions down for the basic shapes that you need to be able to draw on any type of Canvas, then we go a little deeper into what are the pixels that are there to manipulate. And that’s one of the important things to understand about the HTML5 Canvas, scalable vector graphics is another thing you can use now in the modern browsers; it’s vector based. Canvas is pixel based. And so we talk about how to do gradients, how can you do transforms, you know, how do you scale things or rotate things, which is extremely useful for charts ’cause you might have text that, you know, flips up on its side for a y-axis or something like that. And you can even do direct pixel manipulation. So it’s really, really powerful. If you want to get down to the RGBA level, you can do that, and I show how to do that in the course, and then kind of wrap that section up with some animation fundamentals. [Fritz] Great. Yeah, that’s really powerful stuff for programmatically rendering data to clients and responding to user inputs. Look forward to seeing what everyone’s going to come up with building this stuff. So great. That’s — that’s HTML5 Canvas Fundamentals with Dan Wahlin. Thanks very much, Dan. [Dan] Thanks again. I appreciate it.

    Read the article

  • Disk is apparently in use by the system

    - by Shaun
    I've just fitted two disks to my home server. I'm trying to format and then raid them but I'm getting a problem that hours of Googling hasn't resolved this. The error that I'm getting is: # mkfs.ext3 /dev/sdb1 mke2fs 1.39 (29-May-2006) /dev/sdb1 is apparently in use by the system; will not make a filesystem here! # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 4.0G 1.9G 2.0G 49% / none 380M 0 380M 0% /dev/shm /opt/xensource/packages/iso/XenCenter.iso 51M 51M 0 100% /var/xen/xc-install # mount -t ext3 /dev/sdb1 /mnt/b mount: /dev/sdb1 already mounted or /mnt/b busy I'm new to this and it's got me beat. I wouldn't ask if I hadn't done my research first. Thanks.

    Read the article

  • Windows authentication to SQL Server via IIS and PHP

    - by Jeff
    We're running a PHP 5.4 application on Server 2008 R2. We would like to connect to a SQL Server 2008 database, on a separate server, using Windows authentication (must be Windows authentication--the DB admins won't let us connect any other way). I have downloaded the SQL Server drivers for PHP and installed them. IIS is configured for Windows authentication, and anonymous authentication has been disabled. $_SERVER['AUTH_USER'] reports our currently logged on Windows account. In php.ini, we have set fastcgi.impersonate = 1. When we setup a connection using the following code from Microsoft: $serverName = "sqlserver\sqlserver"; $connectionInfo = array( "Database"=>"some_db"); /* Connect using Windows Authentication. */ $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn === false ) { echo "Unable to connect.</br>"; die( print_r( sqlsrv_errors(), true)); } We are presented with the following error message: Unable to connect. Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [message] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. ) Is it possible to connect to SQL Server 2008 via PHP using Windows authentication? Are there any additional required settings we need to make on IIS, SQL Server, or any other component (like a domain controller)?

    Read the article

  • Ubuntu - executable file - variable assignment throwing error on script run

    - by newcoder
    I am trying to run a small script - test - on ubuntu box. It is as follows: var1 = bash var2 = /home/test/directory ... ... <some more variable assignments and then program operations here> ... ... Now every time I run it, then it throws errors: root@localhost#/opt/test /opt/test: line 1: var1: command not found /opt/test: line 3: var2: command not found ... ... more similar errors ... Can someone help me understand what is wrong in this script? Many thanks.

    Read the article

  • Large OSX 10.6 to Windows 7 smb transfers fail?

    - by user41724
    I'm connecting to a windows 7 box from a OSX 10.6 box via smb: smb://ftp1 Connection works fine, I can transfer individual files one at a time, but as soon as I try and move an entier folder I get the following error: The Finder can’t complete the operation because some data in “test” can’t be read or written. (Error code -36) This error happens on all our OSX boxes when trying to push the entier folder to the Win7 box. The folder TEST in the above error message has -R 777 permissions. I can move every image file to the windows box one by one with no errors. But if I try an move the entier folder. bam error out. This error seems to kill the smb client on the Windows box as well. There's an FTP server on the windows box and I can FTP in from the OSX box and move everything just fine. Not sure what is going on here?

    Read the article

  • I/O Error with PHP5-FPM, ptrace(PEEKDATA) failed

    - by MultiformeIngegno
    I got a lot of these: [NOTICE] child 19214 stopped for tracing [NOTICE] about to trace 19214 [ERROR] ptrace(PEEKDATA) failed: Input/output error (5) [NOTICE] finished trace of 19214 [WARNING] [pool www] child 19208, script 'blahblah.php' executing too slow (30.041419 sec), logging [NOTICE] child 19208 stopped for tracing [NOTICE] about to trace 19208 [ERROR] ptrace(PEEKDATA) failed: Input/output error (5) [NOTICE] finished trace of 19208 [WARNING] [pool www] child 19218, script 'blahblah.php' executing too slow (30.035029 sec), logging And when php reaches max children (at least I presume that's the case) it stops "working"... now I know I can increase max_children (currently set to 9) but there's a way to stop php from "dying"? I'm on a VPS with 1 core and 512 MB of RAM (PHP5-FPM 5.4.4 + APC 3.1.10).

    Read the article

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