Search Results

Search found 18003 results on 721 pages for 'nidhinzz own'.

Page 40/721 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Writing my own implementation of stl-like Iterator in C++.

    - by Negai
    Good evening everybody, I'm currently trying to understand the intrinsics of iterators in various languages i.e. the way they are implemented. For example, there is the following class exposing the list interface. template<class T> class List { public: virtual void Insert( int beforeIndex, const T item ) throw( ListException ) =0 ; virtual void Append( const T item ) =0; virtual T Get( int position ) const throw( ListException ) =0; virtual int GetLength() const =0; virtual void Remove( int position ) throw( ListException ) =0; virtual ~List() =0 {}; }; According to GoF, the best way to implement an iterator that can support different kinds of traversal is to create the base Iterator class (friend of List) with protected methods that can access List's members. The concrete implementations of Iterator will handle the job in different ways and access List's private and protected data through the base interface. From here forth things are getting confusing. Say, I have class LinkedList and ArrayList, both derived from List, and there are also corresponding iterators, each of the classes returns. How can I implement LinkedListIterator? I'm absolutely out of ideas. And what kind of data can the base iterator class retrieve from the List (which is a mere interface, while the implementations of all the derived classes differ significantly) ? Sorry for so much clutter. Thanks.

    Read the article

  • Android How do you save an image with your own unique Image Name?

    - by Usmaan
    This sounds like a issue a beginner like me would only have...this is my code... private void saveAvatar(Bitmap avatar) { String strAvatarFilename = Id + ".jpg"; try { avatar.compress(CompressFormat.JPEG, 100, openFileOutput(strAvatarFilename, MODE_PRIVATE)); } catch (Exception e) { Log.e(DEBUG_TAG, "Avatar compression and save failed.", e); } Uri imageUriToSaveCameraImageTo = Uri.fromFile(new File(PhotoActivity.this.getFilesDir(), strAvatarFilename)); Editor editor = Preferences.edit(); editor.putString(PREFERENCES_AVATAR, imageUriToSaveCameraImageTo.getPath()); editor.commit(); ImageButton avatarButton = (ImageButton) findViewById(R.id.ImageButton_Avatar); String strAvatarUri = Preferences.getString(PREFERENCES_AVATAR, ""); Uri imageUri = Uri.parse(strAvatarUri); avatarButton.setImageURI(null); avatarButton.setImageURI(imageUri); } This does save the image but when i go to look at the image on the sd card ti is called imag001 etc not the ID i am labelling it. How do i save the image with a name i want to call it? regards

    Read the article

  • Add my own RSS reader app on a http://feeds2.feedburner.com/exampleofname "subscribe feed using" lis

    - by user333647
    Hello everyone, I'm doing a RSS reader for a University Project. The feed urls have to be added by hand tipically with the copy/paste method, and I don't like this option because is poor for the users. My question is: can I do like in webpage http://feeds2.feedburner.com/microsiervos a list of web applications (Google Reader, Netvibes, etc.). There is a way to do so? I may have to create a firefox addon? I'm quite lost, I think... Thank you very very much, and sorry for my bad english but in this F***ing country that is Spain, there are lots of FIESTA and what you want but null english education... hehehe Byeeee!

    Read the article

  • First-time software contractor, building a system for a multi-site client; who should own the intell

    - by matthew
    I'm very new to software contracting; this is my first project. I've just built a point-of-sale software system for a client, and neither of us put a lot of work into the contract. I wrote that the software was "jointly owned" with exclusive license for use given to the client. The client is using it at one store and is very pleased with it. The client is also planning to expand to numerous stores over time, and wants to use it in every store. The client also now wants full ownership of the software, with me as the exclusive developer. I am very hesitant to allow this, and I am seeking previous experience. Should I sell the IP but demand royalties for every site at which it's installed? Should I demand royalties for every sale made using the software? Should I really start talking to a lawyer? A couple of other details: in terms of risk, it is fair to say that the client is assuming the risk, but the client is now using the software and exclaiming how great it is (and so I assume, how it is improving business). Also, the software is tailored to the client specifically, but could, with a bit of work, be repackaged and resold to other clients. Even if the client owned the IP I would certainly want to make sure that I then did have (significant) royalties on such sales.

    Read the article

  • What is the best way to connect to an Oracle database to build my own IDE? [closed]

    - by rima
    before answer me plz thinking about the futures of these kind of program and answer me plz. I wanna get some data from oracle server like: 1-get all the function,package,procedure and etc for showing them or drop them & etc... 2-compile my *.sql files,get the result if they have problem & etc... becuz I was beginner in oracle first of all I for solve the second problem I try to connect to sqlPlus by RUN sqlplus and trace the output(I mean,I change the output stream of shell and trace what happend and handle the assigned message to customer. NOW THIS PART SUCCEED. just a little bit I have problem with get all result because the output is asynchronous.any way... [in this case I log in to oracle Server by send argument to the sqlplus by make a process in c#] after that I try to get all function,package or procedure name,but I have problem in speed!so I try to use oracle.DataAccess.dll to connect the database. now I m so confusing about: which way is correct way to build a program that work like Oracle Developer! I do not have any experience for like these program how work. If Your answer is I must use the second way follow this part plz: I search a little bit the Golden,PLedit (Benthic software),I have little bit problem how I must create the connection string?because I thinking about how I can find the host name or port number that oracle work on them?? am I need read the TNSNames.Ora file? IF your answer is I must use the first way follow this part plz: do u have any Idea for how I parse the output?because for example the result of a table is so confusing...[i can handle & program it but I really need someone experience,because the important things to me learn how such software work so nice and with quick response?] All of the has different style in output... If you are not sure Can u help me which book can help me in this way i become expert? becuz for example all the C# write just about how u can connect to DB and the DB books write how u can use this DB program,I looking for a book that give me some Idea how develop an interface for do transaction between these two.not simple send and receive data,for example how write a compiler for them. the language of book is not different for me i know C#,java,VB,sql,Oracle Thanks.

    Read the article

  • PHP text parsing and / or make your own language?

    - by AlexanderJohannesen
    Been Googling around without finding much at all, so does anyone know of a class or library that helps you parse any sort of language, like a Domain Specific Language (I'm creating one, so I'm flexible in what the syntax and format can be) into either PHP code or some helpful struct or a class hiearchy or ... ? Anything goes at this point. :) I want to experiment with parsing text files into tokens, building up a small grammar and syntax library to express things like Business Natural Languages.

    Read the article

  • Partial view is not rendering within the main view it's contained (instead it's rendered in it's own page)?

    - by JaJ
    I have a partial view that is contained in a simple index view. When I try to add a new object to my model and update my partial view to display that new object along with existing objects the partial view is rendered outside the page that it's contained? I'm using AJAX to update the partial view but what is wrong with the following code? Model: public class Product { public int ID { get; set; } public string Name { get; set; } [DataType(DataType.Currency)] public decimal Price { get; set; } } public class BoringStoreContext { List<Product> results = new List<Product>(); public BoringStoreContext() { Products = new List<Product>(); Products.Add(new Product() { ID = 1, Name = "Sure", Price = (decimal)(1.10) }); Products.Add(new Product() { ID = 2, Name = "Sure2", Price = (decimal)(2.10) }); } public List<Product> Products {get; set;} } public class ProductIndexViewModel { public Product NewProduct { get; set; } public IEnumerable<Product> Products { get; set; } } Index.cshtml View: @model AjaxPartialPageUpdates.Models.ProductIndexViewModel @using (Ajax.BeginForm("Index_AddItem", new AjaxOptions { UpdateTargetId = "productList" })) { <div> @Html.LabelFor(model => model.NewProduct.Name) @Html.EditorFor(model => model.NewProduct.Name) </div> <div> @Html.LabelFor(model => model.NewProduct.Price) @Html.EditorFor(model => model.NewProduct.Price) </div> <div> <input type="submit" value="Add Product" /> </div> } <div id='productList'> @{ Html.RenderPartial("ProductListControl", Model.Products); } </div> ProductListControl.cshtml Partial View @model IEnumerable<AjaxPartialPageUpdates.Models.Product> <table> <!-- Render the table headers. --> <tr> <th>Name</th> <th>Price</th> </tr> <!-- Render the name and price of each product. --> @foreach (var item in Model) { <tr> <td>@Html.DisplayFor(model => item.Name)</td> <td>@Html.DisplayFor(model => item.Price)</td> </tr> } </table> Controller: public class HomeController : Controller { public ActionResult Index() { BoringStoreContext db = new BoringStoreContext(); ProductIndexViewModel viewModel = new ProductIndexViewModel { NewProduct = new Product(), Products = db.Products }; return View(viewModel); } public ActionResult Index_AddItem(ProductIndexViewModel viewModel) { BoringStoreContext db = new BoringStoreContext(); db.Products.Add(viewModel.NewProduct); return PartialView("ProductListControl", db.Products); } }

    Read the article

  • does a git repository have its own local value for core.autocrlf that overrides the global one?

    - by Warren P
    As per this question, I understand that core.autocrlf=true in git will cause CRLF to LF translations. However when I type : git config core.autocrlf I see: false However, when I stage modified files that are already in the repo, I still get these warnings: Warning: CRLF will be replaced by LF in File1.X. The file will have its original line endings in your working directory. My guess is that the repo copy of the file is already set to "autocrlf=true". Questions: A. How do I query whether a file or git repo is already forcing AutoCrlf? B. How do I turn it autocrlf off?

    Read the article

  • Is there a way to create my own "push pins" for a image without using Google Maps API?

    - by Charlie
    I am interested in working with friends via the internet on a fantasy world map. One of the things I want to do is host an image of the map online and allow us to insert push pins into the image that would then be associated with infoboxes. I don't want to resort to using the Google Map APIs mainly because this is something I want to just share among friends and not publicly. Terms of usage for the APIs state we would need to make the implementation available for everyone. This seems simple enough yet I've no idea how to do this. I looked into image maps, but that requires constant updates to the html markup itself. I just want to insert/delete/edit pushpins and infoboxes on the image and through our site itself. Can someone help me get started?

    Read the article

  • devise forgot password function not working when creating own user controller?

    - by ragupathi
    I use devise for authentication and i have created a user controller and specified as shown below in my routes which lets me to create users,edit and delete users, devise_for :users do resources :users, :only => [:index, :new, :create, :edit, :update, :destroy] end but i cannot able to make the forgot password functionality work using this but in case i specify as devise_for :users then i can able to use the forgot password function that comes with devise and i could not able to create , edit or delete when i specify like this. So how can i make both to work ? please help me

    Read the article

  • Creating my own simple CMS for asp.net-mvc?

    - by coure06
    I want to create a simple CMS for my asp.net-mvc site. Needs some help to start. Will i save my whole page to db? what if my page contain links like Url.Content("~/somepage") When the admin will edit the page he will get the plain link not the Url.Content. How i can handle this in CMS?

    Read the article

  • Can an Oracle user get a list of its own running sessions without access to v$session?

    - by Nick Pierpoint
    I have an application that runs a process and I only want one process to run at a time. Some options are: Use an object lock to prevent subsequent processes running. This would be fine, but I want the calling session to return immediately and not wait for the running session to complete. Use a custom Y/N to set whether a process is running or not. I set a "Y" flag at the start of the process and set it to "N" when it finishes or fails. Also fine but feels like I'm re-inventing the wheel and doesn't feel like the way to go. It also falls short if the running session is killed as the flag stays at "Y". Use dbms_application_info.set_module This approach seems the most robust, but if I'm to know there's an existing running process I think I need to be able to query v$session and I don't want this application to have such wide access. Any ideas?

    Read the article

  • How to create a Link that supplies its own Markup?

    - by Aranian
    I'm trying to create a link that will hide or show a part of my page. The link should be reusable and display one of two images, depending on state. Adding the two subcomponents on every page where I use the link is kind of clunky so I wanted to create a component that behaves like a link while automatically adding its content. This is the Link component: public class ToggleVisibilityLink extends AjaxFallbackLink<Boolean> { public ToggleVisibilityLink(final String id, final IModel<Boolean> model) { super(id, model); setOutputMarkupId(true); add(new Image("collapseImage") { @Override public boolean isVisible() { return !getModelObject(); } }); add(new Image("expandImage") { @Override public boolean isVisible() { return getModelObject(); } }); } @Override public void onClick(final AjaxRequestTarget target) { setModelObject(!getModelObject()); if (target != null) { target.add(this); send(this.getParent(), Broadcast.EXACT, target); } } } And this is how I currently use it in HTML (this is added to the page or panel where I use the link): <a href="#" wicket:id="collapseExpandLink" class="collapseExpandLink"> <wicket:link> <img src="collapse.png" wicket:id="collapseImage" class="collapseExpandImage collapse"> </wicket:link> <wicket:link> <img src="expand.png" wicket:id="expandImage" class="collapseExpandImage expand"> </wicket:link> </a> And the corresponding Java call: add(new ToggleVisibilityLink("collapseExpandLink", new PropertyModel(this, "hidden"))); But I want to be able to skip the body inside the link as one would have to know about the internals of ToggleVisibilityLink. I experimented with IMarkupResourceStreamProvider, using Dynamic markup in Wicket as a starting point. By googling I found another example where the poster was only able to get that to work when using a Panel, and I was able to do that as well. But I'd really like to keep the link and not package it inside a Panel, as I would not be able to style the link in the markup. I'm also open to alternatives to encapsulate the link and its body.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >