Search Results

Search found 2899 results on 116 pages for '7 zip'.

Page 80/116 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • ValueError: too many values to unpack in a tuple

    - by falosi
    Please put some light on why am getting a too many to unpack (ValueError in my for loop).Have tried deb naislist = [('CONTROL FILE', '0', '0', '0'), ('REDO LOG', '0', '0', '0'), ('ARCHIVED LOG', '.69', '.59', '3'), ('BACKUP PIECE', '46.54', '0', '192'), ('IMAGE COPY', '0', '0', '0'), ('FLASHBACK LOG', '10.15', '6.31', '82'), ('FOREIGN ARCHIVED LOG', '0', '0', '0')] print "size of naislist is ",len((naislist)) heading = ('MAIN MENU', 'LEVELS', 'LEVEL2', 'LEVEL3') rearrange = dict(zip((0, 1, 2, 3), (len(str(x)) for x in heading))) for tu, x in naislist: rearrange.update((i, max(rearrange[i], len(str(el)))) for i, el in enumerate(tu)) rearrange[4] = max(rearrange[4], len(str(x))) forkit = '|'. join('%%-%ss' % rearrange[i] for i in xrange(0, 4)) print '\n'.join((forkit % heading, '-|-'.join(rearrange[i] * '-' for i in xrange(4)), '\n'.join(forkit % (a, b, c, d) for (a, b, c), d in naislist)))

    Read the article

  • Why's a simple change to rt.jar causing the Java Runtime Environment to crash silently?

    - by Tom
    This is what I'm doing: extract contents of my JRE's rt.jar extract src.zip of my JDK (same version) Now, if I copy Runtime.java from the extracted src folder and compile it using javac.exe without any modifications and then put it in the extracted rt folder to finally put everything back in a jar file using jar.exe, everything works as expected. The JRE runs fine. However, if I make the slightest change to Runtime.java and compile it and put it in rt.jar, the JRE crashes whenever I attempt to start it. This is an example of a slight change that causes the silent crash: /** Don't let anyone else instantiate this class */ private Runtime() { System.out.println("This is a test."); } Instead of: /** Don't let anyone else instantiate this class */ private Runtime() {} Could anyone tell me why this is causing my JRE to crash? Thanks in advance.

    Read the article

  • IO redirect engine with metadata

    - by hawk.hsieh
    Is there any C library or tool to redirect IO and be able to configured by a metadata. And provide a dynamic link library to perform custom process for feeding data into next IO. For example, network video recorder: record video: socket do_something() file preview video: socket do_something() PCI device http service: download file: socket do_something(http) file socket post file: socket do_something(http) file serial control: monitor device: uart do_something(custom protocol) popen("zip") socket I know the unix-like OS has IO redirect feature and integrate all application you want. Even socket IO you can use /dev/tcp or implement a process to redirect to stdout. But this is process based , the process's foot print is big , IPC is heavy. Therefore, I am looking for something to redirect IO in a process and the data redirect between IO is configurable with a metadata (XML,jason or others).

    Read the article

  • How Transport for London Website Works

    - by Subhen
    Hi, Here let me clarify , I have no intentions to peep in to or any evil intention towards tfls database and other related information. But , ofcourse Millions of users are greatly beniftted the way it serves the information. http://journeyplanner.tfl.gov.uk/ So , If we want to create some site like tfl, journeyplanner , what are the basic things we need to keep in mind. Which Architecture We should use? Can We create this website using ASP.NET(Should be able to)? Is TFL integrating it's website with google maps or any other GPS Edit: While you enter the Zip/Pin code or Station name , it creates a map automatically from source to destination and calcculates the distance also. My Question here is , How do they calculate the distance , do they keep help of Maps or GPS or they created there own webservic?

    Read the article

  • How do I get IE to open a file with its associated application?

    - by Wayne
    MSTest produces an XML file with a .trx extension containing test results. If I have a .trx file on a machine without Visual Studio installed, I get prompted to "Use the Web Service..." or "Select from a list...", which is expected. If I have a .trx file on my development machine and I open it, it opens in Visual Studio, which is expected. If I click a link on a web page or in an email which gets a .trx file from my build server, it ALWAYS opens the XML in IE. How do I configure IE (or IIS on the build server) to open the remote .trx file in Visual Studio, if it's installed, or prompt if it's not? UPDATE: If I rename the .trx file on the server and give it various extensions (eg. .bmp, .msi, .txt, .zip), it still opens as XML in IE, so it's clearly going by the content of the file and not the declared MIME type.

    Read the article

  • filtering elements from list of lists in Python?

    - by user248237
    I want to filter elements from a list of lists, and iterate over the elements of each element using a lambda. For example, given the list: a = [[1,2,3],[4,5,6]] suppose that I want to keep only elements where the sum of the list is greater than N. I tried writing: filter(lambda x, y, z: x + y + z >= N, a) but I get the error: <lambda>() takes exactly 3 arguments (1 given) How can I iterate while assigning values of each element to x, y, and z? Something like zip, but for arbitrarily long lists. thanks, p.s. I know I can write this using: filter(lambda x: sum(x)..., a) but that's not the point, imagine that these were not numbers but arbitrary elements and I wanted to assign their values to variable names.

    Read the article

  • RealPath returns an empty string

    - by Abs
    Hello all, I have the following which just loops through the files in a directory and echo the file names. However, when I use realpath, it returns nothing. What am I doing wrong: if ($handle = opendir($font_path)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && $file != "a.zip") { echo $file.'<br />';//i can see file names fine echo realpath($file);// return empty string?! } } closedir($handle); } Thanks all for any help on this. ~I am on a windows machine, running php 5.3 and apache 2.2.

    Read the article

  • I need to know how to create a custom webform template in ASP.NET that allows me to pick a master pa

    - by Pete
    Using Visual Studio 2008, I need to create a custom web form that when picked acts like the web content form, by providing a dialog that lets you pick a master page. I have looked through the webform.zip template and thought I had a clue, but trying different combinations has baffled me as it either doesn't appear or doesn't work. Also when you set the project type to Web and sub project type to CSharp it doesn't appear, so I don't know if this part of the cause, because I would of hoped that the SupportsMasterPage element would of caused this dialog to appear, if it is a web item, but no luck. Frown Any ideas? p.s. I have used my googling resources to the maximum so unsure what to do.

    Read the article

  • How can I create a class diagram with NetBeans' 6.8 UML module?

    - by Karussell
    It seems to me the UML module of NetBeans is a bit too much hidden. In NetBeans 6.5 it was very easy to create an UML diagram. No plugin installation necessary or sth. like. Read my post where I found a zip file to install the UML module. And now, after this procedure, I got the UML module back, but it seems to me that I cannot create class diagram with it. Do you know how I can do this with NetBeans 6.8? Update1: There seems to be no support Update2: Nevertheless somebody seems to got it working.

    Read the article

  • Is there a tool to build and test a local change on multiple platforms

    - by Ben
    A company I used to work for was plagued with build breakages. So they made a tool that would zip up a developers local changes (which it detected from SCM) and send them to a remote server for a test build. The remote server would update its copy of the source with the repository and then apply the changes it received from the developer. It would then build and test the changes. We actually targeted multiple platforms so it would do the above for each of those platforms. When it was done, if everything was green, the developer was reasonable confident they could submit the change without breaking the "real" build. Are there any tools out there that do something similar?

    Read the article

  • XML Schema - how do you conditionally require address elements? (street, city, state, etc)

    - by Sly
    If an address can be composed of child elements: Street, City, State, PostalCode...how do you allow this XML: <Address> <Street>Somestreet</Street> <PostalCode>zip</PostalCode> </Address> and allow this: <Address> <Street>Somestreet</Street> <City>San Jose</City> <State>CA</State> </Address> but not this: <Address> <Street>Somestreet</Street> <City>San Jose</City> </Address> What schema will do such things!?

    Read the article

  • IIS 8 - PHP Manager - Enabling php_oci8.dll for Oracle Connection

    - by Jemru
    I would need to connect to Oracle DB in my PHP codes. I'm using Windows Server 2012, IIS 8 with PHP Manager. I opened IIS PHP Manager, then go to PHP Extensions, then I enabled "php_oci8.dll" extension. However when I tried to connect to Oracle DB I'm getting the following PHP error: PHP Fatal error: Call to undefined function oci_connect() I just restarted the IIS using the IIS Manager, but didn't done computer reboot. Do I need to reboot? Do I also need to download "instantclient-basic-windows.x64-12.1.0.1.0.zip"? If yes, do I just need to set it to classpath "Path" where I extracted? Thank you very much in advance.

    Read the article

  • Importing libraries from build.xml file in Eclipse

    - by user3873909
    I am developing a java app and I need to use jnativehook library. I have downloaded the .zip from https://code.google.com/p/jnativehook/downloads/list . There is a bin folder,src folder,build.xml,build.num and 3 .txt files when I extracted this folder. I have included this library in my project by File - project - Java project from existing Ant file And I have tried an example https://code.google.com/p/jnativehook/wiki/examples But I get the following error Exception in thread "main" java.lang.ExceptionInInitializerError at GlobalKeyListenerExample.main(GlobalKeyListenerExample.java:25) Caused by: java.lang.RuntimeException: Unable to locate the native library. at org.jnativehook.GlobalScreen.loadNativeLibrary(GlobalScreen.java:462) at org.jnativehook.GlobalScreen.<init>(GlobalScreen.java:71) at org.jnativehook.GlobalScreen.<clinit>(GlobalScreen.java:53) ... 1 more What location should I give in native library path?

    Read the article

  • UIPageViewController: How to refer the UIPicker selected Value from 1 Viewcontroller to another...

    - by Abhinav
    I am referring the code from here, please have look at the code while answering my question : http://www.ioslearner.com/wp-content/uploads/2011/12/UIPageViewControllerDemo.zip important notes and few changes: I basically have a viewcontroller and contentviewcontroller . ViewController - have following UIPAgeViewController Datasource and Deligate UIPickerView - upon next and previous page turn the value in the PickerView changes contentviewcontroller - has following UIWebview - defined in Viewdidload of contentviewcontroller which dynamically fetches a html page based upon the string value (LabelContents) sent through following method -(UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController is there a way to populate the UIWebview in contentviewcontroller based upon the row selected in UIPickerView ? Kindly help.

    Read the article

  • LinqToSql: How can I create a projection to adhere to DRY?

    - by mhutter
    Just wondering if there is a way to take some of the repitition out of a LINQ to SQL projected type. Example: Table: Address Fields: AddressID, HouseNumber, Street, City, State, Zip, +20 more Class MyAddress: AddressID, HouseNumber, Street (Only 3 fields) LINQ: from a in db.Addresses select new MyAddress { AddressID = a.AddressID, HouseNumber = a.HouseNumber, Street = a.Street } The above query works perfectly, and I understand why something like this will return all 20+ fields in each row: from a in db.Addresses select new MyAddress(a); class MyAddress { public MyAddress(Address a) { this.AddressID = a.AddressID, this.HouseNumber = a.HouseNumber, this.Street = a.Street } } Which leads me to my Question: Is it possible to implement some kind of helper function or extension method to "map" from the LINQ model to MyAddress yet only return the necessary fields in the query result rather than all of the fields?

    Read the article

  • How do I model a has_many :through and with aggregation in Rails?

    - by Angela
    How do I model having multiple Addresses for a Company and assign a single Address to a Contact? Contacts belong_to a Company. A Company has_many Contacts. A Company also has_many Addresses. And each Contact belongs_to an Address. How do I model this? I have Model/Contacts.rb belong_to :Company belong_to :Address (?) Model/Company.rb has_many :Contacts has_many :Addresses Address is an aggregation of :street1, :street2, :city, :state, :zip so not clear exactly what to do there. So what would I do in my _form so that when I have a contact/new I am able to either default to a main address or select one of the others? If none of them match, adding for a Contact makes that address available to any subsequent contact?

    Read the article

  • How to retrieve files/documents that are not found on the web server machine.

    - by jhorton
    I am trying to create an export feature for a user to be able to download documents into a zip file. I have the feature working when the files are located on my local and I can use an absolute path on my local. But after talking to the infrastructure team, I found out that the documents are not stored on the same machine as the web server but located at a server farm located off site. I can query the database which gives me a file path. But the path is more of a relative path. So can anyone help me understand how to use FileInfo with getting files from another machine. I believe the infrastructure team said there is a virtual drive set up to the outside server. Am I able to use a virtual path some how? Thanks.

    Read the article

  • Java/Swing: Problem with key listener

    - by Mike
    I have a search dialog with a JTextField that's being used as a search box. When the user types something, it searches the DB, shows the result in a JTable and selects the first item in it. If the first result is what they were looking for, I want to let them quickly accept the dialog, by pressing Enter (while the JTextField is focused). So I added a KeyListener to the JTextField and it's working OK. Now the problem: The user opens can open the dialog by pressing Enter when a "Search" button on the dialog's parent frame is focused. The dialog is displayed and the JTextField gets the keyReleased event (from the Enter key that displayed it), so it shows up and closes. If the user holds Enter down, then the JTextField receives the keyPressed, keyTyped and keyReleased events. How can I fix without resorting to ugly workarounds? Platform is Windows 7 x64, btw. Test NetBeans project here: http://dl.dropbox.com/u/6354360/KeyListenerTest.zip Thanks.

    Read the article

  • jQuery colorbox plugin isn't loading inline content

    - by Summer
    Hi, I'm trying to use the jQuery colorbox plugin to show a little warning when a warning icon is clicked. Check out the problem: - Go to http://dev.imagineelection.com/browse/zip/10011 - Click on one of the warning icons (scroll down to see one). See how the colorbox that pops up is empty? I've tried to isolate the problem: - If you click "View Source" -- the div id="address-alert" is in there - If you click "View Generated Source" (for example, with Firefox Web Developer plugin) -- the div id="address-alert" has been taken out, but it has not been replaced inside the new div id="cboxCurrent" that colorbox has put at the top of the page The jQuery call I'm doing is: if (jQuery().colorbox) { $(".warning-class").colorbox({width:"50%", inline:true, href:"#address-alert"}); } What is going on? Why won't the inline content work?

    Read the article

  • how to put my own words. small problem in Sphinx configuration

    - by Nubkadiya
    hi, i have setup Sphinx and tested Hello World and its working fine. but i wanted to change the words. so i change the WSJ extension and edited the Dictionary and included the name which i wanted with the phonemes. and then i zip it and again change the extension type to jar and checked. but it says "WARNING jsgfGrammar Can't find pronunciation for nugegoda" and when i talked to some friends about it they asking me to put that word to the language model also but i cannot find such a language model in the library folder. please can someone help me the normal english words are working fine. i hope someone help me on this.

    Read the article

  • Solr; What does this mean?

    - by Camran
    At the end of the README.txt file which is located in the example directory under solr, I find this line: NOTE: This Solr example server references SolrCell jars outside of the server directory with statements in the solrconfig.xml. If you make a copy of this example server and wish to use the ExtractingRequestHandler (SolrCell), you will need to copy the required jars into solr/lib or update the paths to the jars in your solrconfig.xml What does this mean? Do I have to make some adjustment before uploading solr to my server? Also, if you know, what is Solr-nightly:s difference to regular solr? The tutorial states "solr-nightly.zip" but on their download section I cant find it.

    Read the article

  • ReportViewr: Hyperlink to a local file doesn't work

    - by kernelMode
    I need to add 2 type of links to existing report with c#. For exapmle: 1) http://www.google.co.il/ 2) file:///C:/index.html I added the links, but only the "http://" works. when I press the link of "file:///" nothing happens. I've uploaded the full project (very small though) which includes the problem: http://www.filefactory.com/file/452gsoyymalv/n/ObjectReports.zip btw, The "index.html" is a simple 'helloWorld' which loaded successfully when writing the path on the address bar in the browser. Do anyone know what additional settings should be set to make the link work? Thanks!!! KM *credit for the sample (without my case): http://www.c-sharpcorner.com/uploadfile/mahesh/reportviewerobject04172007111636am/reportviewerobject.aspx

    Read the article

  • Giving proper credit to a projects contributors

    - by Greg B
    I've recently been working with an opensource library for a commercial product. The opensource code is distributed from the website of the company who sells the proprietary product as a zip file. The library is a (direct) port to C# of the original library which is in Java. As such, it uses methods instead of getter/setter properties. The code contains copyright notices to the supplier of the product. The C# port was originally provided to the company by a 3rd party individual. I have modified the source to be more C# like and added a couple of small features. I want to put my version of the code out there (Google code or where ever) so that C# users of the software can benefit from a more native feeling library. How can I and/or how should I amend the copyright notice to give proper credit to The comercial owner of the original source The guy who provided the original C# port Myself and anyone else who contributes to the project in the future The source is provided under the LGPL V2.1,

    Read the article

  • choose append to existing backup instead of overwrite

    - by aron
    Hello, I have a database and I made it's first backup 2 days ago. Then yesterday I spent an entire adding new records. This morning I ran a backup, (but I selected append to existing backup set) as pictured below. I just ran a restore and I found that it wiped out all my data from yesterday and it restored it from the backup of 2 days ago. Not the version from this mornings backup. I zipped this backup file to be safe. I changed some data in the DB, Then I ran the back up again, but this time I selected "overwrite all existing backup sets" Now when I restore the db it's seems to restore the data from the backup correctly. I think I learned a lesson here, correctly if I'm wrong My questions is, Did I lose an entire day of work? I still have this morning's backup .bak file safe in a zip. Is there anyway I can restore is with the right data?

    Read the article

  • idiomatic way to take groups of n items from a list in Python?

    - by Wang
    Given a list A = [1 2 3 4 5 6] Is there any idiomatic (Pythonic) way to iterate over it as though it were B = [(1, 2) (3, 4) (5, 6)] other than indexing? That feels like a holdover from C: for a1,a2 in [ (A[i], A[i+1]) for i in range(0, len(A), 2) ]: I can't help but feel there should be some clever hack using itertools or slicing or something. (Of course, two at a time is just an example; I'd like a solution that works for any n.) Edit: related http://stackoverflow.com/questions/1162592/iterate-over-a-string-2-or-n-characters-at-a-time-in-python but even the cleanest solution (accepted, using zip) doesn't generalize well to higher n without a list comprehension and *-notation.

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >