Daily Archives

Articles indexed Thursday October 25 2012

Page 8/17 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Insert data into table effeciently, postgresql

    - by Rowan_Gaffney
    I am new to postgresql (and databases in general) and was hoping to get some pointers on improving the efficiency of the following statement. I am inserting data from one table to another, and do not want to insert duplicate values. I have a rid (unique identifier in each table) that are indexed and are Primary Keys. I am currently using the following statement: Insert INTO table1 SELECT * FROM table2 WHERE rid NOT IN (SELECT rid FROM table1). As of now the table one is 200,000 records, table2 is 20,000 records. Table1 is going to keep growing (probably to around 2,000,000) and table2 will stay around 20,000 records. As of now the statement takes about 15 minutes to run. I am concerned that as Table1 grows this is going to take way to long. Any suggestions?

    Read the article

  • Magento - createBlock() in controller, can I access this in layout.xml?

    - by pspahn
    I have an index controller with a view action that does the following: echo $this->getLayout() ->createBlock('core/template','builder') ->setTemplate('pages/builder/view.phtml') ->setHeaderText($extra->getHeaderText()) ->setFooterText($extra->getFooterText()) ->setProducts($collection) ->toHtml(); Based on this, I am trying to perform layout updates in builder.xml (which is being set in the module's config.xml). However, I am not sure if you can target blocks instantiated in this manner. Based on the above block creation, am I able to perform the following: <layout version="0.1.0"> <builder_index_view> <!-- shouldn't this reference the createBlock() name argument? --> <reference name="builder"> <block type="page/html_header" name="builder.header" as="builder.header" template="pages/builder/header.phtml"/> </reference> </builder_index_view> </layout>

    Read the article

  • HTML table ignoring element-style width

    - by sangil
    HTML table ignoring element-style width I have an HTML table where certain cells have very long text contents. I want to specify a width (in pixels) for these cells using jQuery, but the rendered table just ignores the given width. Is there any way to force the table to respect this width? Thanks! JSFiddle: http://jsfiddle.net/sangil/6hejy/35/ (If you inspect the cell you can see the the computed width is different than the element-style width) HTML: <div id="tblcont" class="tblcont"> <table id="pivot_table"> <tbody> <tr> <th id="h0" >product</th> <th id="h1" >price</th> <th id="h2" >change</th> </tr> <tr> <!-- this is the cell causing trouble --> <td id="c00" >Acer 2400 aaaaaaaaaaaaaaaaaaaaaaaaaa</td> <td id="c01" >3212</td> <td id="c02" >219</td> </tr> <tr> <td id="c10" >Acer</td> <td id="c11" >3821</td> <td id="c12" >206</td> </tr> </tbody> </table> </div> CSS: .tblcont { overflow: hidden; width: 500px; } table { table-layout: fixed; border-collapse: collapse; overflow-x: scroll; border-spacing:0; width: 100%; } th, td { overflow: hidden; text-overflow: ellipsis; word-wrap: break-word; } th { height: 50px; } ?Javascript: $(document).ready(function() { // THIS LINE HAS NO EFFECT! $('#c00').width(30); });

    Read the article

  • SASS mixin for swapping images / floats on site language (change)

    - by DBUK
    Currently using SASS on a website build. It is my first project using it, tried a little LESS before and liked it. I made a few basic mixins and variables with LESS, super useful stuff! I am trying to get my head around SASS mixins, and syntax, specifically for swapping images when the page changes to a different language, be that with body ID changing or <html lang="en">. And, swapping floats around if, for example, a website changed to chinese. So a mixin where float left is float left unless language is AR and then it becomes float right. With LESS I think it would be something like: .headerBg() when (@lang = en) {background-image:url(../img/hello.png);} .headerBg() when (@lang = it) {background-image:url(../img/ciao.png);} .header {.headerBg(); width: 200px; height:100px} .floatleft() when (@lang = en) { float: left;} .floatleft() when (@lang = ar) { float: right;} .logo {.floatleft();} Its the syntax I am having problems with combined with a brain melting day.

    Read the article

  • How to inline compressed CSS in Rails with assets pipeline

    - by haimg
    I'm trying to inline CSS into my layout. I'm currently using = Rails.application.assets.find_asset('embedded.css').body.html_safe However, the CSS returned is not compressed. I verified what .digest_path asset file exists, and is properly compressed. I can, of course, write a helper that will check if current on-disk compressed asset file exists for a given asset, and use it. However, I think find_asset actually compiles a CSS asset each time it is called -- not good in production. I hope a cleaner solution exists for this issue.

    Read the article

  • Parsing names with pyparsing

    - by johnthexiii
    I have a file of names and ages, john 25 bob 30 john bob 35 Here is what I have so far from pyparsing import * data = ''' john 25 bob 30 john bob 35 ''' name = Word(alphas + Optional(' ') + alphas) rowData = Group(name + Suppress(White(" ")) + Word(nums)) table = ZeroOrMore(rowData) print table.parseString(data) the output I am expecting is [['john', 25], ['bob', 30], ['john bob', 35]] Here is the stacktrace Traceback (most recent call last): File "C:\Users\mccauley\Desktop\client.py", line 11, in <module> eventType = Word(alphas + Optional(' ') + alphas) File "C:\Python27\lib\site-packages\pyparsing.py", line 1657, in __init__ self.name = _ustr(self) File "C:\Python27\lib\site-packages\pyparsing.py", line 122, in _ustr return str(obj) File "C:\Python27\lib\site-packages\pyparsing.py", line 1743, in __str__ self.strRepr = "W:(%s)" % charsAsStr(self.initCharsOrig) File "C:\Python27\lib\site-packages\pyparsing.py", line 1735, in charsAsStr if len(s)>4: TypeError: object of type 'And' has no len()

    Read the article

  • What is the best way to log a user in programatically in ExpressionEngine

    - by bjohnb
    I'm building an app that allows the app to hit an ACT url which then triggers a module method to create a new entry using the ExpressionEngine API. However, as there is no user logged in / loggin in, it is not allowed to submit an entry to a channel. What is the best way to do this. Bypass the EE api and submit the entry manually, or log a user in progamatically..but then how would that work with sessions etc etc? If the answer is to "log a user in" it would be great to see a code sample if possible. Thanks!

    Read the article

  • Webview shouldoverrideurlloading doesn't work

    - by Zak
    I have this code in my app: public class Home extends Activity{ @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.home); final ProgressDialog progressBar; if(isOnline()){ WebView webView = (WebView) findViewById(R.id.home_web); webView.setBackgroundColor(Color.parseColor(getString(R.color.colore_bg))); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setPluginsEnabled(true); webView.setWebViewClient(new MyWebViewClient()); progressBar = ProgressDialog.show(this,getString(R.string.caricamento),getString(R.string.attendere)); webView.setWebViewClient(new WebViewClient(){ public void onPageFinished(WebView view, String url) { if (progressBar.isShowing()) { progressBar.dismiss(); } } }); webView.loadUrl("http://www.mysite.com/android.php"); }else{ Toast.makeText(this,getString(R.string.no_connessione),Toast.LENGTH_LONG).show(); } } private class MyWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { System.out.println("here"); if (Uri.parse(url).getHost().equals("mysite.com")) { // This is my web site, so do not override; let my WebView load the page return false; } // Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent); return true; } } public boolean isOnline(){ ConnectivityManager cm=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo ni = cm.getActiveNetworkInfo(); if(ni==null){ return false; } return ni.isConnected(); } } The shouldOverrideUrlLoading doesn't work, neither print the system.out, it seems to be never called. How can I repair this? I need to open all the link (except the main page www.mysite.com/iphone.php) in the default browser

    Read the article

  • SQL Server PIVOT with multiple X-axis columns

    - by HeavenCore
    Take the following example data: Payroll Forname Surname Month Year Amount 0000001 James Bond 3 2011 144.00 0000001 James Bond 6 2012 672.00 0000001 James Bond 7 2012 240.00 0000001 James Bond 8 2012 1744.50 0000002 Elvis Presley 3 2011 1491.00 0000002 Elvis Presley 6 2012 189.00 0000002 Elvis Presley 7 2012 1816.50 0000002 Elvis Presley 8 2012 1383.00 How would i PIVOT this on the Year + Month (eg: 201210) but preserve Payroll, Forename & Surname as seperate columns, for example, the above would become: Payroll Forename Surname 201103 201206 201207 201208 0000001 James Bond 144.00 672.00 240.00 1744.50 0000002 Elvis Presley 1491.00 189.00 1816.50 1383.00 I'm assuming that because the Year + Month names can change then i will need to employ dynamic SQL + PIVOT - i had a go but couldnt even get the code to parse, nevermind run - any help would be most appreciated! Edit: What i have so far: INSERT INTO #tbl_RawDateBuffer ( PayrollNumber , Surname , Forename , [Month] , [Year] , AmountPayable ) SELECT PayrollNumber , Surname , Forename , [Month] , [Year] , AmountPayable FROM RawData WHERE [Max] > 1500 DECLARE @Columns AS NVARCHAR(MAX) DECLARE @StrSQL AS NVARCHAR(MAX) SET @Columns = STUFF((SELECT DISTINCT ',' + QUOTENAME(CONVERT(VARCHAR(4), c.[Year]) + RIGHT('00' + CONVERT(VARCHAR(2), c.[Month]), 2)) FROM #tbl_RawDateBuffer c FOR XML PATH('') , TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 1, '') SET @StrSQL = 'SELECT PayrollNumber, ' + @Columns + ' from ( select PayrollNumber , CONVERT(VARCHAR(4), [Year]) + RIGHT(''00'' + CONVERT(VARCHAR(2), [Month]), 2) dt from #tbl_RawDateBuffer ) x pivot ( sum(AmountPayable) for dt in (' + @Columns + ') ) p ' EXECUTE(@StrSQL) DROP TABLE #tbl_RawDateBuffer

    Read the article

  • C++ segmentation error when first parameter is null in comparison operator overload

    - by user1774515
    I am writing a class called Word, that handles a c string and overloads the <, , <=, = operators. word.h: friend bool operator<(const Word &a, const Word &b); word.cc: bool operator<(const Word &a, const Word &b) { if(a == NULL && b == NULL) return false; if(a == NULL) return true; if(b == NULL) return false; return a.wd < b.wd; //wd is a valid c string } main: char* temp = NULL; //EDIT: i was mistaken, temp is a char pointer Word a("blah"); //a.wd = [b,l,a,h] cout << (temp<a); i get a segmentation error before the first line of the operator< method after the last line in the main. I can correct the problem by writing cout << (a>temp); where the operator> is similarly defined and i get no errors. but my assignment requires (temp < a) to work so this is where i ask for help. EDIT: i made a mistake the first time and i said temp was of type Word, but it is actually of type char*. so i assume that the compiler converts temp to a Word using one of my constructors. i dont know which one it would use and why this would work since the first parameter is not Word. here is the constructor i think is being used to make the Word using temp: Word::Word(char* c, char* delimeters=NULL) { char *temporary = "\0"; if(c == NULL) c = temporary; check(stoppers!=NULL, "(Word(char*,char*))NULL pointer"); //exits the program if the expression is false if(strlen(c) == 0) size = DEFAULT_SIZE; //10 else size = strlen(c) + 1 + DEFAULT_SIZE; wd = new char[size]; check(wd!=NULL, "Word(char*,char*))heap overflow"); delimiters = new char[strlen(stoppers) + 1]; //EDIT: changed to [] check(delimiters!=NULL,"Word(char*,char*))heap overflow"); strcpy(wd,c); strcpy(delimiters,stoppers); count = strlen(wd); } wd is of type char* thanks for looking at this big question and trying to help. let me know if you need more code to look at

    Read the article

  • compile ICS/JB camera application - native library jni-mosaic error

    - by liorry
    I would like to use the Panorama mode that the ICS/JB camera application has. I've downloaded the source code (with resources) and managed to solve all code compilation errors but as soon as I start the application on my device (running JB), I get this error: 10-25 14:42:53.617: E/AndroidRuntime(23147): FATAL EXCEPTION: GLThread 2586 10-25 14:42:53.617: E/AndroidRuntime(23147): java.lang.UnsatisfiedLinkError: Native method not found: com.app.camera.panorama.MosaicRenderer.reset:(IIZ)V 10-25 14:42:53.617: E/AndroidRuntime(23147): at com.app.camera.panorama.MosaicRenderer.reset(Native Method) 10-25 14:42:53.617: E/AndroidRuntime(23147): at com.app.camera.panorama.MosaicRendererSurfaceViewRenderer.onSurfaceChanged(MosaicRendererSurfaceViewRenderer.java:49) 10-25 14:42:53.617: E/AndroidRuntime(23147): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1505) 10-25 14:42:53.617: E/AndroidRuntime(23147): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240) I do have a libjni-mosaic lib, located in armeabi-v7a/armeabi/x86 and it seems to load it fine but it probably doesn't contain the methods the MosaicRenderer implements. I also tried compiling the CyanogenMod camera app https://github.com/CyanogenMod/android_packages_apps_Camera/tree/ics but I get the same error... The camera itself works, for stills and video recording but as soon as I change to panorama mode, it crashes. Can anyone maybe point me to the right jni-mosaic lib or maybe to what I'm doing wrong? Do I need to do something in order to make my app use the JNI/SO files?

    Read the article

  • How to handle "Remember me" in the Asp.Net Membership Provider

    - by RemotecUk
    Ive written a custom membership provider for my ASP.Net website. Im using the default Forms.Authentication redirect where you simply pass true to the method to tell it to "Remember me" for the current user. I presume that this function simply writes a cookie to the local machine containing some login credential of the user. What does ASP.Net put in this cookie? Is it possible if the format of my usernames was known (e.g. sequential numbering) someone could easily copy this cookie and by putting it on their own machine be able to access the site as another user? Additionally I need to be able to inercept the authentication of the user who has the cookie. Since the last time they logged in their account may have been cancelled, they may need to change their password etc so I need the option to intercept the authentication and if everything is still ok allow them to continue or to redirect them to the proper login page. I would be greatful for guidance on both of these two points. I gather for the second I can possibly put something in global.asax to intercept the authentication? Thanks in advance.

    Read the article

  • Apps Script Office Hours - October 25, 2012

    Apps Script Office Hours - October 25, 2012 - Arun announces an election sample app - soon! Look for the blog post on googleappsdeveloper.blogspot.com - LAX hackathon googleappsdeveloper.blogspot.com - Bill (Google Hangout) asks about ScriptDb. Ikai makes a long analogy about libraries and datastores and offers possible explanations for why certain issues occur, as well as some of the difficulties in working with distributed datastores. From: GoogleDevelopers Views: 48 6 ratings Time: 29:34 More in Science & Technology

    Read the article

  • Review: Logitech t620 Touch Mouse and Windows 8

    - by Tim Murphy
    It isn’t very often that I worry much about hardware, but since I heard some others talking about “touch” mice for their Windows 8 machines I figured I would try one out and see what the experience was.  The only Windows 8 compatible touch mouse that they had in the store was the Logitech t630 Touch Mouse.  At $69 it isn’t exactly a cheap purchase. So how does it work with Windows 8.  First it works well as a normal mouse with touch scroll capabilities.  Scrolling works both horizontally and vertically.  Then you get into to the Win8 features, all of which are associated with the back 2/3 of the mouse.  If you double-touch-tap (not depressing the internal button) it acts as a Windows home screen button.  The next feature is switching applications.  This is accomplished by dragging a finger from the left edge of the mouse in.  Bringing up the Windows 8 open apps list is the same movement as on the table where you drag in from the left and then move back to the right.  The last gesture available is to bring up the charms.  This is performed by dragging in from the right side of the mouse. There is a certain amount of configurability.  You can switch dominant hand configuration as well as turn on and off gestures as shown in the screenshot below. It is nice that they kept the gestures similar to the table gestures.  Hopefully future updates to the drivers will bring other gestures, but this is definitely a good start.  It would be interesting to also compare this to the Microsoft Touch Mouse and see if there are additional gestures such as app close and for the app bar. del.icio.us Tags: Logitech,Windows 8,Win8,t620,Logitech t620 Touch Mouse,Gesture

    Read the article

  • Windows 8 App Downloads Increasing + Over 5,000 Apps Available

    - by David Paquette
    Windows 8 will be unleashed on the general public tomorrow and I thought it would be a good time to review some of the numbers I have been tracking over the last month. Downloads of Windows 8 Apps have been steadily increasing over the last month.  Below is screenshot from the App Summary page for my Windows 8 app.  The blue line is my app, while the orange line is average for the top 5 apps in that subcategory.  Considering the large gap between the 2, I think it is safe to assume that my app is NOT in the top 5 in the subcategory. The spike in the last couple of days is fairly dramatic and I am a little surprised by that.  I would have expected that kind of spike on the days following the official release as opposed to the days leading up to the release.   Finally, the all important App count.  There have been some stories floating around that the Window 8 Store is a ghost town and that there are no apps available.  I think these might be exaggerating the situation a little.  As of this morning, in the US store there are over 5000 apps available for download.  Obviously a far cry from the hundreds of thousands available in other app stores, but we are seeing solid growth in this number. Less than a month ago, that number was 2000. That means the store more than doubled in less than a month. If the growth continues, it won’t be long before the Widows 8 Store is filled with all the apps you need (and a whole lot you don’t need).

    Read the article

  • How to use DoDirect/Paypal Pro in asp.net?

    - by ptahiliani
    using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Net;using System.IO;using System.Collections;public partial class Default2 : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {    }    protected void Button1_Click(object sender, EventArgs e)    {        //API Credentials (3-token)        string strUsername = "<<enter your sandbox username here>>";        string strPassword = "<<enter your sandbox password here>>";        string strSignature = "<<enter your signature here>>";        string strCredentials = "USER=" + strUsername + "&PWD=" + strPassword + "&SIGNATURE=" + strSignature;        string strNVPSandboxServer = "https://api-3t.sandbox.paypal.com/nvp";        string strAPIVersion = "2.3";        string strNVP = strCredentials + "&METHOD=DoDirectPayment" +        "&CREDITCARDTYPE=" + "Visa" +        "&ACCT=" + "4710496235600346" +        "&EXPDATE=" + "10" + "2017" +        "&CVV2=" + "123" +        "&AMT=" + "12.34" +        "&FIRSTNAME=" + "Demo" +        "&LASTNAME=" + "User" +        "&IPADDRESS=192.168.2.236" +        "&STREET=" + "Lorem-1" +        "&CITY=" + "Lipsum-1" +        "&STATE=" + "Lorem" +        "&COUNTRY=" + "INDIA" +        "&ZIP=" + "302004" +        "&COUNTRYCODE=IN" +        "&PAYMENTACTION=Sale" +        "&VERSION=" + strAPIVersion;        try        {            //Create web request and web response objects, make sure you using the correct server (sandbox/live)            HttpWebRequest wrWebRequest = (HttpWebRequest)WebRequest.Create(strNVPSandboxServer);            wrWebRequest.Method = "POST";            StreamWriter requestWriter = new StreamWriter(wrWebRequest.GetRequestStream());            requestWriter.Write(strNVP);            requestWriter.Close();            // Get the response.            HttpWebResponse hwrWebResponse = (HttpWebResponse)wrWebRequest.GetResponse();            StreamReader responseReader = new StreamReader(wrWebRequest.GetResponse().GetResponseStream());            //and read the response            string responseData = responseReader.ReadToEnd();            responseReader.Close();            string result = Server.UrlDecode(responseData);            string[] arrResult = result.Split('&');            Hashtable htResponse = new Hashtable();            string[] responseItemArray;            foreach (string responseItem in arrResult)            {                responseItemArray = responseItem.Split('=');                htResponse.Add(responseItemArray[0], responseItemArray[1]);            }            string strAck = htResponse["ACK"].ToString();            if (strAck == "Success" || strAck == "SuccessWithWarning")            {                string strAmt = htResponse["AMT"].ToString();                string strCcy = htResponse["CURRENCYCODE"].ToString();                string strTransactionID = htResponse["TRANSACTIONID"].ToString();                //ordersDataSource.InsertParameters["TransactionID"].DefaultValue = strTransactionID;                string strSuccess = "Thank you, your order for: $" + strAmt + " " + strCcy + " has been processed.";                //successLabel.Text = strSuccess;                Response.Write(strSuccess.ToString());            }            else            {                string strErr = "Error: " + htResponse["L_LONGMESSAGE0"].ToString();                string strErrcode = "Error code: " + htResponse["L_ERRORCODE0"].ToString();                //errLabel.Text = strErr;                //errcodeLabel.Text = strErrcode;                Response.Write(strErr.ToString() + "<br/>" + strErrcode.ToString());                return;            }        }        catch (Exception ex)        {            // do something to catch the error, like write to a log file.            Response.Write("error processing");        }    }}

    Read the article

  • PHP-APC is exceeding limit apc.shm_size often

    - by user142741
    I am implementing the apc on a shared server that currently has 1000 sites (using wordpress, moodle, etc.). I'm Looking for the admin page, and I see "Cache full count" is growing rapidly. I've tried increasing the value of "apc.shm_size" reduce value "apc.ttl" increase the value "apc.shm_segments" but I can not resolve this issue. What am I doing wrong? I'm putting down some information: apc.ini: extension=apc.so apc.shm_size = 256 apc.enabled = 1 apc.ttl = 300 apc.user_ttl = 300 Ubuntu: 12.04 PHP: 5.3.10 APC: 3.1.7 Server has 16GB memory Limit share memory: 256MB

    Read the article

  • SQL 2008 R2 Mirroring Issue

    - by CWL
    Windows 2008 R2 with SQL 2008 R2 - Using Mirroring of a Database across the WAN in a HA setup with one witness. One issue I am having is during a failure (ever so often) the system fails over or tries, but leaves both databases in a Restoring State. My guess is the failover issue happens when there is a WAN bouncing and the systems get confused. The usual fix is to reboot the sql servers. Has anyone seen this type of failure? While this does not happen often it does causes an issue and concern with HA not being trusted fully.

    Read the article

  • Cannot install SQL Server (2012) PowerPivot for SharePoint, always fails Sharepoint Version check

    - by ProfessionalAmateur
    Trying to install a fresh install of Sharepoint 2010 (w/ SP1) and SQL Server 2012 PowerPivot for Sharepoint. The prerequisites clearly show that Sharepoint 2010 SP1 is needed, which we have installed. However after when trying to install the SQL Server portion we consistently fail the rule SharePoint version requirement for PowerPivot for SharePoint' validation in theSQL Server` install process. Here is the process we are following: 1. install Sharepoint 2010 2. install Sharepoint 2010 SP1 3. install SQL Server 2012 PowerPivot for SharePoint Here is a screen shot of the error and the log file error. We are completely stuck at this point, anyone run into this before?

    Read the article

  • How to route all network traffic for vlan through a proxy server on SRX

    - by user112570
    I'm trying configure an SRX router to automatically forward all traffic through a proxy server i have in the USA. I have created a separate vlan and configured the proxy but not sure how i can route all traffic through this. The aim of this task is create a test network which makes users appear in the location of the proxy server. (with the external ip address of the proxy) Is this possible and how should i do this. Am i approaching this the right way? Thanks

    Read the article

  • How do I put back different SCSI hard drives into their original RAID arrays across different servers?

    - by Edgar
    I have potentially a big mess in my hands: I received today a box with several hard drives that used to be connected to different servers each one of them using an unknown - at least as of right now- RAID configuration. Regretfully, these are not marked and I'm not sure how to go about putting them back into their original servers. Currently I don't have much more information: I don't know what type of array was being used on each instance and I don't have any specifics about the RAID controller originally used on each one of the servers (currently these servers are at a remote location with no easy access). Is there a way to sort through this mess? What would be the consequences of using trial and error to go about it? This might be a very basic question but I don't have much experience dealing with RAID arrays.

    Read the article

  • rsync error on Downloading

    - by Chandan
    Sir I am trying to setup a Rsyncmirror on my mount drive /mnt/Mirror/ubuntu_mirror .so I am trying the command rsync -a --bwlimit=128 rsync://archive.ubuntu.com/ubuntu /mnt/Mirror/ubuntu_mirror but it shows error rsync: getaddrinfo: archive.ubuntu.com 873: Name or service not known rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9] can anyone help me.. Thanks.

    Read the article

  • How to re-add a RAID-10 failed drive on Ubuntu?

    - by thiesdiggity
    I have a problem that I can't seem to solve. We have a Ubuntu server setup with RAID-10 and two of the drives dropped out of the array. When I try to re-add them using the following command: mdadm --manage --re-add /dev/md2 /dev/sdc1 I get the following error message: mdadm: Cannot open /dev/sdc1: Device or resource busy When I do a "cat /proc/mdstat" I get the following: Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [r$ md2 : active raid10 sdb1[0] sdd1[3] 1953519872 blocks 64K chunks 2 near-copies [4/2] [U__U] md1 : active raid1 sda2[0] sdc2[1] 468853696 blocks [2/2] [UU] md0 : active raid1 sda1[0] sdc1[1] 19530688 blocks [2/2] [UU] unused devices: <none> When I run "/sbin/mdadm --detail /dev/md2" I get the following: /dev/md2: Version : 00.90 Creation Time : Mon Sep 5 23:41:13 2011 Raid Level : raid10 Array Size : 1953519872 (1863.02 GiB 2000.40 GB) Used Dev Size : 976759936 (931.51 GiB 1000.20 GB) Raid Devices : 4 Total Devices : 2 Preferred Minor : 2 Persistence : Superblock is persistent Update Time : Thu Oct 25 09:25:08 2012 State : active, degraded Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Layout : near=2, far=1 Chunk Size : 64K UUID : c6d87d27:aeefcb2e:d4453e2e:0b7266cb Events : 0.6688691 Number Major Minor RaidDevice State 0 8 17 0 active sync /dev/sdb1 1 0 0 1 removed 2 0 0 2 removed 3 8 49 3 active sync /dev/sdd1 Output of df -h is: Filesystem Size Used Avail Use% Mounted on /dev/md1 441G 2.0G 416G 1% / none 32G 236K 32G 1% /dev tmpfs 32G 0 32G 0% /dev/shm none 32G 112K 32G 1% /var/run none 32G 0 32G 0% /var/lock none 32G 0 32G 0% /lib/init/rw tmpfs 64G 215M 63G 1% /mnt/vmware none 441G 2.0G 416G 1% /var/lib/ureadahead/debugfs /dev/mapper/RAID10VG-RAID10LV 1.8T 139G 1.6T 8% /mnt/RAID10 When I do a "fdisk -l" I can see all the drives needed for the RAID-10. The RAID-10 is part of the /dev/mapper, could that be the reason why the device is coming back as busy? Anyone have any suggestions on what I can try to get the drives back into the array? Any help would be greatly appreciated. Thanks!

    Read the article

  • File permission woes on an Ubuntu ec2 instance

    - by Pardoner
    I've set up an amazon ec2 instance and I'm have some file permission issues. I've created myself a new user and added myself to the following groups: adm:x:4:me,ubuntu sudo:x:27:me www-data:x:33:me,www-data ssh:x:108:me admin:x:111:me ubuntu:x:1000:www-data,me me:x:1001:me but when I cd /var/www I can't do simple commands without doing sudo. So I chown -R www-data:www-data /var/www to ensure that I'm in the owning group but I still have to type sudo for everything. If I sudo su www-data it works fine. Since I'm in the www-data group shouldn't I have the same privilages as www-data? One strange thing I'm noticing is that when I ls -l it list the owner but not the group names. Could this possibly be part of the issue? Is is posible for a directory to not be part of a group? drwxr-xr-x 4 www-data 4.0K Oct 24 16:39 . drwxr-xr-x 14 root 4.0K Oct 10 16:58 .. drwxrwxr-x 9 www-data 4.0K Oct 23 04:03 admin.mywebsite.com drwxrwxr-x 2 www-data 4.0K Oct 4 00:29 mywebsite.com drwxrwxr-x 9 www-data 4.0K Oct 23 04:03 staging.mywebsite.com Edit : It appears I had some alias messing with my ls command. By calling \ls -l I can see that all my files are in the correct group.

    Read the article

  • How to auto mark tape as free in DPM 2012?

    - by Massimo
    I have a backup server running System Center Data Protection Manager 2012, connected to a couple of tape drives (no library). I also have, of course, some tapes. Tape rotation is manual. The tape have been used before, by DPM itself (but the server has been completely rebuilt) and by other backup softwares; they are not emtpy. But they contain no data that DPM knows and/or wants to preserve, so they can be marked as free without having to run forcefreetape.ps1. When a tape is placed into the drive, it is required to perform an inventory, have it recognized as an imported tape and then mark it as free; otherwise DPM will simply refuse to use it. How can I tell DPM to automatically treat those imported tapes as free? And, of course, I do not want to reuse real backup tapes if by chance they get put into the drives before their expiration date, so the solution should mark imported tapes as free, but should not do the same with real, non-expired tapes.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >