Search Results

Search found 3241 results on 130 pages for 'extract'.

Page 29/130 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • How can i do this using a Python Regex?

    - by uberjumper
    I am trying to properly extract methods definitions that are generated by comtypes for Com Interfaces using a regex. Furthermore some of them are blank which causes even more problems for me. Basically i have this: IXMLSerializerAlt._methods_ = [ COMMETHOD([helpstring(u'Loads an object from an XML string.')], HRESULT, 'LoadFromString', ( ['in'], BSTR, 'XML' ), ( ['in'], BSTR, 'TypeName' ), ( ['in'], BSTR, 'TypeNamespaceURI' ), ( ['retval', 'out'], POINTER(POINTER(IUnknown)), 'obj' )), ] class EnvironmentManager(CoClass): u'Singleton object that manages different environments (collections of configuration information).' _reg_clsid_ = GUID('{8A626D49-5F5E-47D9-9463-0B802E9C4167}') _idlflags_ = [] _typelib_path_ = typelib_path _reg_typelib_ = ('{5E1F7BC3-67C5-4AEE-8EC6-C4B73AAC42ED}', 1, 0) INumberFormat._methods_ = [ ] I want to extract both the IXMLSerializerAlt and INumberFormat methods definitions however i cant figure out a proper regex. E.g. for IXMLSerializer i want to extract this: IXMLSerializerAlt._methods_ = [ COMMETHOD([helpstring(u'Loads an object from an XML string.')], HRESULT, 'LoadFromString', ( ['in'], BSTR, 'XML' ), ( ['in'], BSTR, 'TypeName' ), ( ['in'], BSTR, 'TypeNamespaceURI' ), ( ['retval', 'out'], POINTER(POINTER(IUnknown)), 'obj' )), ] This regex in my mind this should work: ^\w+\._methods_\s=\s\[$ (^.+$)* ^]$ Im checking my regex's using kodos however i cannot figure out a way to make this work.

    Read the article

  • Extracting a string starting with x and ending with y

    - by DMan
    First of all, I did a search on this and was able to find how to use something like String.Split() to extract the string based on a condition. I wasn't able to find however, how to extract it based on an ending condition as well. For example, I have a file with links to images: http://i594.photobucket.com/albums/tt27/34/444.jpghttp://i594.photobucket.com/albums/as/asfd/ghjk6.jpg You will notice that all the images start with http:// and end with .jpg. However, .jpg is succeeded by http:// without a space, making this a little more difficult. So basically I'm trying to find a way (Regex?) to extract a string from a string that starts with http:// and ends with .jpg

    Read the article

  • how to get wanted nodes from Stanford Parser nlp

    - by vitaly
    Hello all! My mean problem is that I dont know how to extract nodes from GrammaticalStructure. I am using englishPCFG.ser in java netbeans. My target is o know the quality of the screen like: the screen of iphone 4 is great. I want to extract screen and great. how can i extract the NN (screen) and VP (great) the code that I wrote is: LexicalizedParser lp = new LexicalizedParser("C:\\englishPCFG.ser"); lp.setOptionFlags(new String[]{"-maxLength", "80", "-retainTmpSubcategories"}); String sent ="the screen is very good."; Tree parse = (Tree) lp.apply(Arrays.asList(sent)); parse.pennPrint(); System.out.println(); TreebankLanguagePack tlp = new PennTreebankLanguagePack(); GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory(); GrammaticalStructure gs = gsf.newGrammaticalStructure(parse); Collection tdl = gs.typedDependenciesCollapsed();

    Read the article

  • How to build a data flow?

    - by salvationishere
    I am running Visual Studio 2008, the SSIS Tutorial described on: http://msdn.microsoft.com/en-us/library/ms167106.aspx I finished all of the tasks but am getting following errors: Error 1 Validation error. Extract Sample Currency Data: Extract Sample Currency Data: input column "CurrencyAlternateKey" (123) has lineage ID 55 that was not previously used in the Data Flow task. Lesson 1.dtsx 0 0 Error 2 Validation error. Extract Sample Currency Data SSIS.Pipeline: input column "CurrencyAlternateKey" (123) has lineage ID 55 that was not previously used in the Data Flow task. Lesson 1.dtsx 0 0 Can you tell what I need to do to make this build without errors?

    Read the article

  • Scrapy Not Returning Additonal Info from Scraped Link in Item via Request Callback

    - by zoonosis
    Basically the code below scrapes the first 5 items of a table. One of the fields is another href and clicking on that href provides more info which I want to collect and add to the original item. So parse is supposed to pass the semi populated item to parse_next_page which then scrapes the next bit and should return the completed item back to parse Running the code below only returns the info collected in parse If I change the return items to return request I get a completed item with all 3 "things" but I only get 1 of the rows, not all 5. Im sure its something simple, I just can't see it. class ThingSpider(BaseSpider): name = "thing" allowed_domains = ["somepage.com"] start_urls = [ "http://www.somepage.com" ] def parse(self, response): hxs = HtmlXPathSelector(response) items = [] for x in range (1,6): item = ScrapyItem() str_selector = '//tr[@name="row{0}"]'.format(x) item['thing1'] = hxs.select(str_selector")]/a/text()').extract() item['thing2'] = hxs.select(str_selector")]/a/@href').extract() print 'hello' request = Request("www.nextpage.com", callback=self.parse_next_page,meta={'item':item}) print 'hello2' request.meta['item'] = item items.append(item) return items def parse_next_page(self, response): print 'stuff' hxs = HtmlXPathSelector(response) item = response.meta['item'] item['thing3'] = hxs.select('//div/ul/li[1]/span[2]/text()').extract() return item

    Read the article

  • how to substract numbers from levels

    - by romunov
    Dear SOFers, I would like to cut a vector of values ranging 0-70 to x number of categories, and would like the upper limit of each category. So far, I have tried this using cut() and am trying to extract the limits from levels. I have a list of levels, from which I would like to extract the second number from each level. How can I extract the values between space and ] (which is the number I'm interested in)? I have: > levels(bins) [1] "(-0.07,6.94]" "(6.94,14]" "(14,21]" "(21,28]" "(28,35]" [6] "(35,42]" "(42,49]" "(49,56]" "(56,63.1]" "(63.1,70.1]" and would like to get: [1] 6.94 14 21 28 35 42 49 56 63.1 70.1 Or is there a better way of calculating the upper bounds of categories?

    Read the article

  • php preg_replace, regexp

    - by Michael
    I'm trying to extract the postal codes from yell.com using php and preg_replace. I successfully extracted the postal code but only along with the address. Here is an example $URL = "http://www.yell.com/ucs/UcsSearchAction.do?scrambleSeed=17824062&keywords=shop&layout=&companyName=&location=London&searchType=advance&broaderLocation=&clarifyIndex=0&clarifyOptions=CLOTHES+SHOPS|CLOTHES+SHOPS+-+LADIES|&ooa=&M=&ssm=1&lCOption32=RES|CLOTHES+SHOPS+-+LADIES&bandedclarifyResults=1"; //get yell.com page in a string $htmlContent = $baseClass-getContent($URL); //get postal code along with the address $result2 = preg_match_all("/(.*)/", $htmlContent, $matches); print_r($matches); The above code ouputs something like Array ( [0] = Array ( [0] = 7, Royal Parade, Chislehurst, Kent BR7 6NR [1] = 55, Monmouth St, London, WC2H 9DG .... the problem that I have is that I don't know how to extract the the postal code because it doesn't have an exact number of digits (sometimes it has 6 digits and sometimes has only 5 times). Basically I should extract the lasted 2 words from each array . Thank you in advance for any help !

    Read the article

  • How can I access variables outside of current scope in javascript?

    - by sekmet64
    I'm writing some application in javascript and cannot figure it out how to access the variables declared in my function, inside this jquery parse. Inside I can access global variables, but I don't really want to create global vars for these values. Basically I want to extract file names from an xml document in the simulationFiles variable. I check if the node attribute is equal with the simName and extract the two strings inside the xml elements, that part I think it's working. How can I extract those xml elements and append them to local variables? function CsvReader(simName) { this.initFileName = "somepath"; this.eventsFileName = "somepath"; $(simulationFiles).find('simulation').each(function() { if ($(this).attr("name") == simName) { initFileName += $(this).find("init").text(); eventsFileName += $(this).find("events").text(); } }); }

    Read the article

  • Extra characters Extracted with XPath and Python (html)

    - by Nacari
    I have been using XPath with scrapy to extract text from html tags online, but when I do I get extra characters attached. An example is trying to extract a number, like "204" from a <td> tag and getting [u'204']. In some cases its much worse. For instance trying to extract "1 - Mathoverflow" and instead getting [u'\r\n\t\t 1 \u2013 MathOverflow\r\n\t\t ']. Is there a way to prevent this, or trim the strings so that the extra characters arent a part of the string? (using items to store the data). It looks like it has something to do with formatting, so how do I get xpath to not pick up that stuff?

    Read the article

  • system() not working in php using windows server 2003

    - by jazzy
    hi i have to extract the cabfile(.cab) on the server. i am Finding such script which extract cab file but i didn't get it yet. So now i am try to extract using cabarc.exe. But i face the problem that when i run command throuw commandline its work fine but when i give same command to system() or exec() function in php it is not work. code is as follow: $command = "c:\\exe\\cabarc X c:\\cab\\data.cab c:\\data\\"; if(($output = system($command,$return) != false) { echo "$return"; } it is not working when i use same string in commandline it works fine. please any body help me to why it not working what to do tomake it work is ther any rights issue. I had give the execute permission to the site. thanks

    Read the article

  • Use a function in a conditions hash

    - by Pierre
    Hi, I'm building a conditions hash to run a query but I'm having a problem with one specific case: conditions2 = ['extract(year from signature_date) = ?', params[:year].to_i] unless params[:year].blank? conditions[:country_id] = COUNTRIES.select{|c| c.geography_id == params[:geographies]} unless params[:geographies].blank? conditions[:category_id] = CATEGORY_CHILDREN[params[:categories].to_i] unless params[:categories].blank? conditions[:country_id] = params[:countries] unless params[:countries].blank? conditions['extract(year from signature_date)'] = params[:year].to_i unless params[:year].blank? But the last line breaks everything, as it gets interpreted as follows: AND ("negotiations"."extract(year from signature_date)" = 2010 Is there a way to avoid that "negotiations"." is prepended to my condition? thank you, P.

    Read the article

  • rule based file parsing

    - by user359490
    I need to parse a file line by line on given rules. Here is a requirement. file can have multiple lines with different data.. 01200344545143554145556524341232131 1120034454514355414555652434123213101200344545143554145556524341232131 2120034454514 and rules can be like this. if byte[0,1] == "0" then extract this line to /tmp/record0.dat if byte[0,1] == "1" then extract this line to /tmp/record1.dat if byte[0,1] == "2" then extract this line to /tmp/record2.dat I am looking for any language which can do this in a fast manner with a very long file size like 2 GB. Appreciate all the help in advance. Thanks

    Read the article

  • Python lxml - returns null list

    - by Chris Finlayson
    I cannot figure out what is wrong with the XPATH when trying to extract a value from a webpage table. The method seems correct as I can extract the page title and other attributes, but I cannot extract the third value, it always returns an empty list? from lxml import html import requests test_url = 'SC312226' page = ('https://www.opencompany.co.uk/company/'+test_url) print 'Now searching URL: '+page data = requests.get(page) tree = html.fromstring(data.text) print tree.xpath('//title/text()') # Get page title print tree.xpath('//a/@href') # Get href attribute of all links print tree.xpath('//*[@id="financial"]/table/tbody/tr/td[1]/table/tbody/tr[2]/td[1]/div[2]/text()') Unless i'm missing something, it would appear the XPATH is correct: Chrome screenshot I checked Chrome console, appears ok! So i'm at a loss $x ('//*[@id="financial"]/table/tbody/tr/td[1]/table/tbody/tr[2]/td[1]/div[2]/text()') [ "£432,272" ]

    Read the article

  • How to create a slipstreamed SharePoint Server 2010 SP1 and August Cumulative Update install

    - by ybbest
    When install SharePoint2010 ,you normally need to install the base the install and then install each Service Pack and cumulative update.Fortunately , there is an easy way to install the base and all the update at once.It is normally called slipstream installation.You need to follow the steps below. 1.Open the command prompt and extract the file using the command below. office2010-kb2553048-fullfile-x64-glb.exe \extract.\SP2010 Aug Update 2.Doing the same for SP1 and August cumulative update. 3.Next , you need to copy all the update files to the Updates folder under the base install. 4.Now , you are ready to install SharePoint2010 now , just click the PrerequisiteInstaller to install the prerequisite files. 5.Finally , you can click the setup.exe to start the installation. References: SharePoint Server 2010 SP1 SharePoint Foundation SP1 Service Pack 1 for SharePoint 2010 Products is Now Available for Download SharePoint Patching and “Action Required” Updates for SharePoint 2010 Products SharePoint Patching and “Action Required”  

    Read the article

  • Edit ePub eBooks with Your Favorite HTML Editor

    - by Matthew Guay
    ePub eBooks are increasingly popular today, but often they’ve been made by converting other file formats. Here’s how you can edit ePub books to remove irregularities and make them better for reading on your devices. ePub’s are actually a zip file containing images, XHTML files with your text, and more with the .epub extension. You can make them better by editing the XHTML files directly.  Code gurus can edit the code directly, but even if you’ve never edited HTML, you can still quickly make changes with a WYSIWYG editor. Extract the Files from your ePub eBook As mentioned before, ePub files are actually renamed zip files.  So first let’s get all of the files in your ePub eBook accessible.  Find an eBook you want to edit and then change the file extension to .zip. If you don’t see the file extensions, click Organize in the menu bar and select Folder and search options. Select the View tab, and then uncheck the box beside Hide extensions for known file types.  Click Ok, and then change the file type as above. Windows will warn you about changing the file type; click Yes to proceed. Now you can browse the files of the ePub file.  Notice that it contains mostly HTML or XHTML files and images.  Click Extract all files to save them all in a folder so you can easily edit them. Alternately, you can open the ePub file directly in your favorite file archival program such as 7-zip.  Browse to the location of your ePub file, double-click it, and it’ll automatically open even if you don’t change the file extension to zip.  Now you can extract the folder, or extract individual files as before.   Edit Your eBook in KompoZer The actual ebook contents are stored in HTML or XHTML files.  These may be stored on the top folder of you ePub file’s directory, or they may be stored in \OEBPS\text in the file. To change the contents of your eBook, you’ll want to edit these files.  Often there may be separate files for each chapter, so you may have to use trial and error to find the one you need to edit.  You could edit them by hand in Windows using Notepad if you don’t have an HTML editor installed. A better option would be to use an HTML editor.  Here we’ll use the free KompoZer program to edit the files just like we’d edit a document in Word. Download KompoZer (link below), and unzip the files.  Then open the new folder and launch kompozer.exe; you don’t even need to install it.  In fact, you could even store KompoZer on a flash drive so you could edit HTML files from any computer. In KompoZer, open the HTML or XHTML file from your eBook that you want to edit. Now you can edit the file just like you would edit a document in Word.  Remove extra and unneeded text, make titles stand out, correct misspellings … anything you want!  This is especially helpful if your ePub file was created by converting a PDF as these often have many small errors. Or, if you’d rather edit the code itself, select the Source tab and edit as you wish. When you’re done making the changes, make sure to save the file in the same location with the same file name. Recreate Your Edited ePub eBook Once you’ve made all the changes you wanted, it’s time to turn this folder of files back into ePub.  Make sure you change the name of the folder if it still has the same name as the original ePub or zip file so you don’t mix them up or have trouble with overwriting the old files. Zip the folder using Windows Explorer or your favorite archival utility.  If you are using another archival program, make sure to compress it as a zip folder; other compression methods will render the ePub unreadable by your eReader app. Now change the file extension again, this time back to .epub. Now you can read your eBook with your changes in your favorite reader program or app on your mobile device. Conclusion Whether you need to remove an odd, misplaced character or need to do fine editing, using an HTML editor is a great way to make your ePub eBooks look just like you want.  Also, with an editor like KompoZer it’s not even difficult. Download KompoZer Similar Articles Productive Geek Tips Change the Default Editor From Nano on Ubuntu LinuxConvert a PDF eBook to ePub Format for Your iPad, iPhone, or eReaderRead Mobi eBooks on Kindle for PCEdit Your Firefox Bookmarks Easier with Flat Bookmark EditorChange the Default Editor for Batch Files in Vista TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips HippoRemote Pro 2.2 Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server XPS file format & XPS Viewer Explained Microsoft Office Web Apps Guide Know if Someone Accessed Your Facebook Account Shop for Music with Windows Media Player 12 Access Free Documentaries at BBC Documentaries Rent Cameras In Bulk At CameraRenter

    Read the article

  • problem occur during installation of moses scripts

    - by lenny99
    we got error when compile moses-script. process of it as follows: minakshi@minakshi-Vostro-3500:~/Desktop/monu/moses/scripts$ make release # Compile the parts make all make[1]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts' # Building memscore may fail e.g. if boost is not available. # We ignore this because traditional scoring will still work and memscore isn't used by default. cd training/memscore ; \ ./configure && make \ || ( echo "WARNING: Building memscore failed."; \ echo 'training/memscore/memscore' >> ../../release-exclude ) checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking for boostlib >= 1.31.0... yes checking for cos in -lm... yes checking for gzopen in -lz... yes checking for cblas_dgemm in -lgslcblas... no checking for gsl_blas_dgemm in -lgsl... no checking how to run the C++ preprocessor... g++ -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking n_gram.h usability... no checking n_gram.h presence... no checking for n_gram.h... no checking for size_t... yes checking for ptrdiff_t... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore' make all-am make[3]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore' make[3]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore' make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore' touch release-exclude # No files excluded by default pwd=`pwd`; \ for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \ make -C training/$subdir || exit 1; \ echo "### Compiler $subdir"; \ cd $pwd; \ done make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/cmert-0.5' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/cmert-0.5' ### Compiler cmert-0.5 make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/phrase-extract' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/phrase-extract' ### Compiler phrase-extract make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/symal' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/symal' ### Compiler symal make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/mbr' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/mbr' ### Compiler mbr make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/lexical-reordering' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/lexical-reordering' ### Compiler lexical-reordering ## All files that need compilation were compiled make[1]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts' /bin/sh: ./check-dependencies.pl: not found make: *** [release] Error 127 We don't know why this error occurs? check-dependencies.pl file existed in scripts folder ...

    Read the article

  • How can I get shockwave flash to work on Ubuntu 12.04

    - by John Hill
    I've tried most of the things suggested on this site and others so far. It's kind of frustrating because this is a home computer and I mainly use it for browsing the internet and watching YouTube videos. When I try to install something that might fix it, it just downloads a bunch of files and says to extract them or whatever. I'm not sure what to do with the files after I extract them. That's probably the main issue: I don't have a lot of experience working with computers at this level. I'm used to Windows, which seems to make most software installs idiot-proof. Any suggestions are appreciated!!

    Read the article

  • There is any reason for which a delete method/field/function refactoring doesn't exist?

    - by raisercostin
    An operation in an interface is obsolete so I decided to delete it. It seems that there is no automatic support for such a "refactoring". For me is a refactoring operation since the behavior of the code will be preserved since nobody(tests, client apis) will notice that the operation was removed. In eclipse, in java code, on an method in an interface I have the following options: rename, move, change method signature, inline, extract interface, extract superclass, use supertype when possible, pull up, push down, introduce parameter objet, introduce indirection, generate declared type. There is any reason for which a delete method/field/function refactoring doesn't exist?

    Read the article

  • Code refactoring with Visual Studio 2010 Part-4

    - by Jalpesh P. Vadgama
    I have been writing few post with code refactoring features in Visual Studio 2010. This post also will be part of series and this post will be last of the series. In this post I am going explain two features 1) Encapsulate Field and 2) Extract Interface. Let’s explore both features in details. Encapsulate Field: This is a nice code refactoring feature provides by Visual Studio 2010. With help of this feature we can create properties from the existing private field of the class. Let’s take a simple example of Customer Class. In that I there are two private field called firstName and lastName. Below is the code for the class. public class Customer { private string firstName; private string lastName; public string Address { get; set; } public string City { get; set; } } Now lets encapsulate first field firstName with Encapsulate feature. So first select that field and goto refactor menu in Visual Studio 2010 and click on Encapsulate Field. Once you click that a dialog box will appear like following. Now once you click OK a preview dialog box will open as we have selected preview reference changes. I think its a good options to check that option to preview code that is being changed by IDE itself. Dialog will look like following. Once you click apply it create a new property called FirstName. Same way I have done for the lastName and now my customer class code look like following. public class Customer { private string firstName; public string FirstName { get { return firstName; } set { firstName = value; } } private string lastName; public string LastName { get { return lastName; } set { lastName = value; } } public string Address { get; set; } public string City { get; set; } } So you can see that its very easy to create properties with existing fields and you don’t have to change anything there in code it will change all the stuff itself. Extract Interface: When you are writing software prototype and You don’t know the future implementation of that then its a good practice to use interface there. I am going to explain here that How we can extract interface from the existing code without writing a single line of code with the help of code refactoring feature of Visual Studio 2010. For that I have create a Simple Repository class called CustomerRepository with three methods like following. public class CustomerRespository { public void Add() { // Some code to add customer } public void Update() { //some code to update customer } public void Delete() { //some code delete customer } } In above class there are three method Add,Update and Delete where we are going to implement some code for each one. Now I want to create a interface which I can use for my other entities in project. So let’s create a interface from the above class with the help of Visual Studio 2010. So first select class and goto refactor menu and click Extract Interface. It will open up dialog box like following. Here I have selected all the method for interface and Once I click OK then it will create a new file called ICustomerRespository where it has created a interface. Just like following. Here is a code for that interface. using System; namespace CodeRefractoring { interface ICustomerRespository { void Add(); void Delete(); void Update(); } } Now let's see the code for the our class. It will also changed like following to implement the interface. public class CustomerRespository : ICustomerRespository { public void Add() { // Some code to add customer } public void Update() { //some code to update customer } public void Delete() { //some code delete customer } } Isn't that great we have created a interface and implemented it without writing a single line of code. Hope you liked it. Stay tuned for more.. Till that Happy Programming.

    Read the article

  • OpenWorld hands on labs: HOL9558, HOL9559 and HOL9870

    - by cpauliat
    In the upcoming event Oracle OpenWorld that will start in 2 days in San Francisco, Olivier Canonge, Simon Coter, Eric Bezille and I will run 3 hands on lab about Cloud using Oracle VM for X86 virtualization tool (details below) For each lab, a detailed document (in PDF format) explains all steps. If you don't have the opportunity to attend OpenWorld labs sessions, you can still run the labs at home or office using those documents. Lab 9558: Deploying Infrastructure as a Service (IaaS) with Oracle VM Session ID: HOL9558 Tuesday October 2nd, 2012, 10:15am – 11:15amLocation: Marriott Marquis - Salon 14/15PDF Document: part1 part2 part3 (right click and save link for each part then use winzip on file .001 to extract the PDF doc from the 3 zip files) Lab 9559: Virtualize and Deploy Oracle Applications Using Oracle VM Templates Session ID: HOL9559 Tuesday October 2nd, 2012, 11:45am – 12:45pmLocation: Marriott Marquis - Salon 14/15 PDF Document Lab 9870: x86 Enterprise Cloud Infrastructure with Oracle VM 3.x and Sun ZFS Storage Appliance Session ID: HOL 9870 Wednesday, 3 Oct, 2012, 5:00 PM - 6:00 PMLocation: Marriott Marquis - Salon 14/15 PDF Document: part1 part2 part3 (right click and save link for each part then use winzip on file .001 to extract the PDF doc from the 3 zip files)

    Read the article

  • Sprite/Tile Sheets Vs Single Textures

    - by Reanimation
    I'm making a race circuit which is constructed using various textures. To provide some background, I'm writing it in C++ and creating quads with OpenGL to which I assign a loaded .raw texture too. Currently I use 23 500px x 500px textures of which are all loaded and freed individually. I have now combined them all into a single sprite/tile sheet making it 3000 x 2000 pixels seems the number of textures/tiles I'm using is increasing. Now I'm wondering if it's more efficient to load them individually or write extra code to extract a certain tile from the sheet? Is it better to load the sheet, then extract 23 tiles and store them from one sheet, or load the sheet each time and crop it to the correct tile? There seems to be a number of way to implement it... Thanks in advance.

    Read the article

  • How can I open binary image files? (.img)

    - by Simon Cahill
    I'm a Windows/Mac/Ubuntu and Androoid user, so I know what I'm talking about, when I say: How do I open binary image files? (.img) They just won't open, on any OS... I'm an Android dev... I'm currently working on a ROM, (I also program, using Windows) but I need to extract files, from .img files. I've converted them to .ext4.img but they just aren't recognized by Linux (Definitly not by Android), by Mac OS or Windows. In other words, I can't open, extract or mount them. Can anyone help me? I'm kinda confused...

    Read the article

  • Coffee spilled and went inside CPU...computer not starting

    - by Harpreet
    Today coffee got spilled over my table, and some of it (very less) reached the CPU placed under the table. I think little bit of it got inside the CPU through the front face of the CPU. As that happened the fan started running very fast and made noise. I tried to restart to see if it becomes fine, but the computer didn't start again. First it gave an error of "Alert! Air temperature sensor not detected" and didn't start. Next I tried again multiple times of starting the computer but then it gave some memory error. I was not able to start the computer. Incase there's a problem in hard disk or something related to memory, is there any way we can extract our work or data? I am scared if I am not able to extract my work in case some problem occurs like that. What options would I have? Help! EDIT: I have attached the photo here and you can see the area spilt in red circle. The hard drive electronics have been affected and internal speaker may also have been affected. Any advise on cleaning and if hard drive can work? EDIT 2: Are there any professional services offered to extract data from blemished hard disk, like this one, in case I am not able to run it personally?

    Read the article

  • Coffee spilled inside computer, damaged hard drive

    - by Harpreet
    Today coffee spilled over my table, and some of it (very less) reached the PC case placed under the table. I think little bit of it got inside the PC case through the front. As that happened the fan started running very fast and made noise. I tried to restart to see if it becomes fine, but the computer didn't start again. First it gave an error of "Alert! Air temperature sensor not detected" and didn't start. Next I tried again multiple times of starting the computer but then it gave some memory error. I was not able to start the computer. Incase there's a problem in hard disk or something related to memory, is there any way we can extract our work or data? I am scared if I am not able to extract my work in case some problem occurs like that. What options would I have? Help!! EDIT: I have attached the photo here and you can see the area spilt in red circle. The hard drive electronics have been affected and internal speaker may also have been affected. Any advise on cleaning and if hard drive can work? EDIT 2: Are there any professional services offered to extract data from blemished hard disk, like this one, in case I am not able to run it personally?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >