Search Results

Search found 1101 results on 45 pages for 'essential'.

Page 35/45 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • How Do I Make A Small jQuery Confirm Replacement?

    - by Volomike
    I have a table row with a Delete link on it for deleting that row. I want to create a jQuery feature that pops up above that Delete link an "Are you sure?" yes/no confirm dialog, but in a very small size. How do I achieve this in the least lines of code in jQuery? I mean, I need to determine the x,y of the Delete link that was detected from a click, and then move (and fadeIn()) a DIV into that location. If they click anywhere on that page except Yes on the yes/no, the thing does a fadeOut(). If they click Yes, then it deletes the row with a fadeOut() effect. Note on this I don't need a modal screen dimmer, but the confirm needs to work modally. (Items above that are bolded are something I don't exactly know how to do. Items bolded and italicized are important to what I need to do.) I would think a widget like this would be critical to any Web 2.0 design, much like the Pines Notify feature seems essential.

    Read the article

  • Erlang OTP application design

    - by Toby Hede
    I am struggling a little coming to grips with the OTP development model as I convert some code into an OTP app. I am essentially making a web crawler and I just don't quite know where to put the code that does the actual work. I have a supervisor which starts my worker: -behaviour(supervisor). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). init(_Args) -> Children = [ ?CHILD(crawler, worker) ], RestartStrategy = {one_for_one, 0, 1}, {ok, {RestartStrategy, Children}}. In this design, the Crawler Worker is then responsible for doing the actual work: -behaviour(gen_server). start_link() -> gen_server:start_link(?MODULE, [], []). init([]) -> inets:start(), httpc:set_options([{verbose_mode,true}]), % gen_server:cast(?MODULE, crawl), % ok = do_crawl(), {ok, #state{}}. do_crawl() -> % crawl! ok. handle_cast(crawl}, State) -> ok = do_crawl(), {noreply, State}; do_crawl spawns a fairly large number of processes and requests that handle the work of crawling via http. Question, ultimately is: where should the actual crawl happen? As can be seen above I have been experimenting with different ways of triggering the actual work, but still missing some concept essential for grokering the way things fit together. Note: some of the OTP plumbing is left out for brevity - the plumbing is all there and the system all hangs together

    Read the article

  • Custom QAbstractGraphicsShapeItem very slow in Qt Jambi

    - by Mene
    I try to implement an own QAbstractGraphicsShapeItem in Qt Jambi (4.5) but as soon as I implement a custom class (rather than use e.g. QGraphicsEllipseItem) the rendering speed drops by about on order of magnitude. If looked in the original Code of QGraphicsEllipseItem and it seems to do basicly the same. class Circle extends QAbstractGraphicsShapeItem { final private QRectF rect = new QRectF(); public final void setRect(double x, double y, double w, double h) { QRectF newRect = new QRectF(x, y, w, h); if (!newRect.equals(rect)) { prepareGeometryChange(); this.rect.setX(x); this.rect.setY(y); this.rect.setWidth(w); this.rect.setHeight(h); this.update(rect); } } @Override public final QRectF boundingRect() { return rect; } QPainterPath shape; @Override public final QPainterPath shape() { if (shape == null) { QPainterPath path = new QPainterPath(); path.addEllipse(rect); QPainterPathStroker stroker = new QPainterPathStroker(); QPen pen = this.pen(); stroker.setCapStyle(pen.capStyle()); stroker.setWidth(pen.widthF()); shape = stroker.createStroke(path); } return shape; } @Override public final void paint(QPainter painter, QStyleOptionGraphicsItem option, QWidget widget) { painter.setPen(this.pen()); painter.setBrush(this.brush()); painter.drawEllipse(this.rect); } } I need to render a lot of objects and they are mostly moving, so speed is essential. Anyone knows how to speed this up? I underestand that Java might be slower then the nativ code in the library. But the code in the paint method seems not to be the problem, since commenting it out doesn't change the speed notably.

    Read the article

  • multithreading issue

    - by vbNewbie
    I have written a multithreaded crawler and the process is simply creating threads and having them access a list of urls to crawl. They then access the urls and parse the html content. All this seems to work fine. Now when I need to write to tables in a database is when I experience issues. I have 2 declared arraylists that will contain the content each thread parse. The first arraylist is simply the rss feed links and the other arraylist contains the different posts. I then use a for each loop to iterate one while sequentially incrementing the other and writing to the database. My problem is that each time a new thread accesses one of the lists the content is changed and this affects the iteration. I tried using nested loops but it did not work before and this works fine using a single thread.I hope this makes sense. Here is my code: SyncLock dlock For Each l As String In links finallinks.Add(l) Next End SyncLock SyncLock dlock For Each p As String In posts finalposts.Add(p) Next End SyncLock ... Dim i As Integer = 0 SyncLock dlock For Each rsslink As String In finallinks postlink = finalposts.Item(i) i = i + 1 finallinks and finalposts are the two arraylists. I did not include the rest of the code which shows the threads working but this is the essential part where my error occurs which is basically here postlink = finalposts.Item(i) i = i + 1 ERROR: index was out of range. Must be non-negative and less than the size of the collection Is there an alternative?

    Read the article

  • In .NET when Aborting Thread, can this piece of code get corrupted?

    - by bosko
    Little intro: In complex multithreaded aplication (enterprise service bus EBS), I need to use Thread.Abort, because this EBS accepts user written modules which communicates with hardware security modules. So if this module gets deadlocked or hardware stops responding - i need to just unload this module and rest of this server aplication must keep runnnig. So there is abort sync mechanism which ensures that code can be aborted only in user section and this section must be marked as AbortAble. If this happen there is possibility that ThreadAbortException will be thrown in this pieace of code: public void StopAbortSection() { var id = Thread.CurrentThread.ManagedThreadId; lock (threadIdMap[id]) { .... } } If module is on AbortSection and Aplication decides to abort module, but after this decision but before actual Thread.Abort, module enters NonAbortableSection by calling this method, but lock is actualy taken on that locking object. So lock will block until Abort or abort can be executed before reaching this block by this code. But Object with this method is essential and i need to be sure that this pieace of code is safe to abort in any moment. Probably i have to mention that threadIdMap is Dictionary(int,ManualResetEvent), so locking object is instance of ManualResetEvent. I hope you now understad my question. Sorry for its largeness.

    Read the article

  • SharePoint extensions for VS - which version have I got?

    - by Javaman59
    I'm using Visual Studio 2008, and have downloaded VSeWSS.exe 1.2, to enable Web Part development. I am new to SP development, and am already bewildered by the number of different versions of SP, and the VS add-ons. This particular problem has come up, which highlights my confusion. I selected Add - New Project - Visual C# - SharePoint- Web Part, accepted the defaults, and VS created a project, with the main file WebPart1.cs using System; using System.Runtime.InteropServices; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Serialization; using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; using Microsoft.SharePoint.WebPartPages; namespace WebPart1 { [Guid("9bd7e74c-280b-44d4-baa1-9271679657a0")] public class WebPart1 : System.Web.UI.WebControls.WebParts.WebPart { public WebPart1() { } protected override void CreateChildControls() // <-- This line { base.CreateChildControls(); // TODO: add custom rendering code here. // Label label = new Label(); // label.Text = "Hello World"; // this.Controls.Add(label); } } } The book I'm following, Essential SharePoint 2007, by Jeff Webb, has the following for the default project - using System; <...as previously> namespace WebPart1 { [Guid("9bd7e74c-280b-44d4-baa1-9271679657a0")] public class WebPart1 : System.Web.UI.WebControls.WebParts.WebPart { // ^ this is a new style (ASP.NET) web part! [author's comment] protected override void Render(HtmlTextWriter writer) // <-- This line { // This method draws the web part // TODO: add custom rendering code here. // Label label = new Label(); // writer.Write("Output HTML"); } } } The real reason for my concern is that in this chapter of the book the author frequently mentions the distinction between "old style" web parts, and "new style" web parts, as noted in his comment on the Render method. What's happened? Why has my default Web Part got a different signature to the authors?

    Read the article

  • Deploying a Java application. How?

    - by danpalmer
    I am new to Java (and Eclipse) but I have used .NET (and Visual Studio) a fair amount. I also know about compiling C/C++ code and things like that. I know that at the end I get either an EXE or a nice binary file that can be run from the command line. I have been making a Java utility that uses some external libraries. I need to compile this into an executable that I can run from the command line on a unix machine, but I cannot find any way to do this. I can build and run/debug in Eclipse, but that is no use to me as this code will be run on a webserver. I just need all the dependancies compiled in to one file but after hours of searching on Google, the best thing I could find was the Fat-JAR plugin for Eclipse and after using that I just get the following error when I try to run the file: Exception in thread "main" java.lang.NoClassDefFoundError: Network/jar This is really confusing me and as it is such an essential thing to be able to do I am sure I must be missing something blindingly obvious, but as I said, after hours of searching I have gotten nowhere. I really appreciate any help you can give me. Thanks.

    Read the article

  • Benefits of migrating my work to a new web development framework?

    - by John
    When I first started programming with PHP, I was ignorant of other php frameworks (like code igniter, cake php, etc...). So I fell into the trap of re-inventing wheels, which had the benefit of being "fun" and "educational". Overtime, I discovered other open source products that I found useful, like smarty templating engine, jquery library, tcpdf library, fdf etc...so I started bundling these technologies along with things I've built over the years into a LAMP development framework to make life easier for myself. This pass year, I've been having fun developing on the code igniter framework. It does many of the things I do in my framework. Coding in CI feels natural because the MVC and ORM feels similar to the MVC and ORM of my framework. So now I'm contemplating migrating a lot of the plugins in my framework over to CI. The pros and cons I can think of for such a project are: Pros: benefit from the vast community of CI developers lots of other developers will be familiar with it better documentation Cons: I've built a lot of useful plugins against my own framework, and it will take a lot of time to move even just the essential ones at the moment, I still, work faster against my own framework than CI, just because I'm more familiar with it even if I did migrate to CI, there will always be newer and better frameworks in the near future, and i'll be contemplating this scenario again So my question is the following: perhaps I should leave my old framework as is, and for each new project I receive, I make a decision on whether the requirements are best served by developing with CI or my own framework. Is this the right approach?

    Read the article

  • Is this a good job description? What title would you give this position?

    - by Zack Peterson
    Department: Information Technology Reports To: Chief Information Officer Purpose: Company's ________________ is specifically engaged in the development of World Wide Web applications and distributed network applications. This person is concerned with all facets of the software development process and specializes in software product management. He or she contributes to projects in an application architect role and also performs individual programming tasks. Essential Duties & Responsibilities: This person is involved in all aspects of the software development process such as: Participation in software product definitions, including requirements analysis and specification Development and refinement of simulations or prototypes to confirm requirements Feasibility and cost-benefit analysis, including the choice of architecture and framework Application and database design Implementation (e.g. installation, configuration, customization, integration, data migration) Authoring of documentation needed by users and partners Testing, including defining/supporting acceptance testing and gathering feedback from pre-release testers Participation in software release and post-release activities, including support for product launch evangelism (e.g. developing demonstrations and/or samples) and subsequent product build/release cycles Maintenance Qualifications: Bachelor's degree in computer science or software engineering Several years of professional programming experience Proficiency in the general technology of the World Wide Web: Hypertext Transfer Protocol (HTTP) Hypertext Markup Language (HTML) JavaScript Cascading Style Sheets (CSS) Proficiency in the following principles, practices, and techniques: Accessibility Interoperability Usability Security (especially prevention of SQL injection and cross-site scripting (XSS) attacks) Object-oriented programming (e.g. encapsulation, inheritance, modularity, polymorphism, etc.) Relational database design (e.g. normalization, orthogonality) Search engine optimization (SEO) Asynchronous JavaScript and XML (AJAX) Proficiency in the following specific technologies utilized by Company: C# or Visual Basic .NET ADO.NET (including ADO.NET Entity Framework) ASP.NET (including ASP.NET MVC Framework) Windows Presentation Foundation (WPF) Language Integrated Query (LINQ) Extensible Application Markup Language (XAML) jQuery Transact-SQL (T-SQL) Microsoft Visual Studio Microsoft Internet Information Services (IIS) Microsoft SQL Server Adobe Photoshop

    Read the article

  • function objects versus function pointers

    - by kumar_m_kiran
    Hi All, I have two questions related to function objects and function pointers, Question : 1 When I read the different uses sort algorithm of STL, I see that the third parameter can be a function objects, below is an example class State { public: //... int population() const; float aveTempF() const; //... }; struct PopLess : public std::binary_function<State,State,bool> { bool operator ()( const State &a, const State &b ) const { return popLess( a, b ); } }; sort( union, union+50, PopLess() ); Question : Now, How does the statement, sort(union, union+50,PopLess()) work? PopLess() must be resolved into something like PopLess tempObject.operator() which would be same as executing the operator () function on a temporary object. I see this as, passing the return value of overloaded operation i.e bool (as in my example) to sort algorithm. So then, How does sort function resolve the third parameter in this case? Question : 2 Question Do we derive any particular advantage of using function objects versus function pointer? If we use below function pointer will it derive any disavantage? inline bool popLess( const State &a, const State &b ) { return a.population() < b.population(); } std::sort( union, union+50, popLess ); // sort by population PS : Both the above references(including example) are from book "C++ Common Knowledge: Essential Intermediate Programming" by "Stephen C. Dewhurst". I was unable to decode the topic content, thus have posted for help. Thanks in advance for your help.

    Read the article

  • Incorporating Devise Authentication into an already existing user structure?

    - by Kevin
    I have a fully functional authentication system with a user table that has over fifty columns. It's simple but it does hash encryption with salt, uses email instead of usernames, and has two separate kinds of users with an admin as well. I'm looking to incorporate Devise authentication into my application to beef up the extra parts like email validation, forgetting passwords, remember me tokens, etc... I just wanted to see if anyone has any advice or problems they've encountered when incorporating Devise into an already existing user structure. The essential fields in my user model are: t.string :first_name, :null => false t.string :last_name, :null => false t.string :email, :null => false t.string :hashed_password t.string :salt t.boolean :is_userA, :default => false t.boolean :is_userB, :default => false t.boolean :is_admin, :default => false t.boolean :active, :default => true t.timestamps For reference sake, here's the Devise fields from the migration: t.database_authenticatable :null => false t.confirmable t.recoverable t.rememberable t.trackable That eventually turn into these actual fields in the schema: t.string "email", :default => "", :null => false t.string "encrypted_password", :limit => 128, :default => "", :null => false t.string "password_salt", :default => "", :null => false t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "reset_password_token" t.string "remember_token" t.datetime "remember_created_at" t.integer "sign_in_count", :default => 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.datetime "created_at" t.datetime "updated_at" What do you guys recommend? Do I just remove email, hashed_password, and salt from my migration and put in the 5 Devise migration fields and everything will be OK or do I need to do something else?

    Read the article

  • (x86) Assembler Optimization

    - by Pindatjuh
    I'm building a compiler/assembler/linker in Java for the x86-32 (IA32) processor targeting Windows. High-level concepts of a "language" (in essential a Java API for creating executables) are translated into opcodes, which then are wrapped and outputted to a file. The translation process has several phases, one is the translation between languages: the highest-level code is translated into the medium-level code which is then translated into the lowest-level code (probably more than 3 levels). My problem is the following; if I have higher-level code (X and Y) translated to lower-level code (x, y, U and V), then an example of such a translation is, in pseudo-code: x + U(f) // generated by X + V(f) + y // generated by Y (An easy example) where V is the opposite of U (compare with a stack push as U and a pop as V). This needs to be 'optimized' into: x + y (essentially removing the "useless" code) My idea was to use regular expressions. For the above case, it'll be a regular expression looking like this: x:(U(x)+V(x)):null, meaning for all x find U(x) followed by V(x) and replace by null. Imagine more complex regular expressions, for more complex optimizations. This should work on all levels. What do you suggest? What would be a good approach to optimize in these situations?

    Read the article

  • Entity Framework - Insert/Update new entity with child-entities

    - by Christina Mayers
    I have found many questions here on SO and articles all over the internet but none really tackled my problem. My model looks like this (I striped all non essential Properties): Everyday or so "Play" gets updated (via a XML-file containing the information). internal Play ParsePlayInfo(XDocument doc) { Play play = (from p in doc.Descendants("Play") select new Play { Theatre = new Theatre() { //Properties }, //Properties LastUpdate = DateTime.Now }).SingleOrDefault(); var actors = (from a in doc.XPathSelectElement(".//Play//Actors").Nodes() select new Lecturer() { //Properties }); var parts = (from p in doc.XPathSelectElement(".//Play//Parts").Nodes() select new Part() { //Properties }).ToList(); foreach (var item in parts) { play.Parts.Add(item); } var reviews = (from r in doc.XPathSelectElement(".//Play//Reviews").Nodes() select new Review { //Properties }).ToList(); for (int i = 0; i < reviews.Count(); i++) { PlayReviews pR = new PlayReviews() { Review = reviews[i], Play = play, //Properties }; play.PlayReviews.Add(pR); } return play; } If I add this "play" via Add() every Childobject of Play will be inserted - regardless if some exist already. Since I need to update existing entries I have to do something about that. As far as I can tell I have the following options: add/update the child entities in my PlayRepositories Add-Method restructure and rewrite ParsePlayInfo() so that get all the child entities first, add or update them and then create a new Play. The only problem I have here is that I wanted ParsePlayInfo() to be persistence ignorant, I could work around this by creating multiple parse methods (eg ParseActors() ) and assign them to play in my controller (I'm using ASP.net MVC) after everything was parsed and added Currently I am implementing option 1 - but it feels wrong. I'd appreciate it if someone could guide me in the right direction on this one.

    Read the article

  • Cyclic Reference - protocols and subclasses

    - by blindJesse
    I'm getting some cyclic reference (I think) problems between a few classes that require imported headers due to either subclassing or protocol definitions. I can explain why things are set up this way but I'm not sure it's essential. Basically these classes are managing reciprocal to-many data relationships. The layout is this: Class A imports Class B because it's a delegate of Class B and needs its protocol definition. Class B imports Class C because it's a subclass of Class C. Class C imports Class A because it's a delegate of Class A and needs its protocol definition. Here's some sample code that illustrates the problem. The errors I'm getting are as follows: In Class A - "Can't find protocol definition for Class_B_Delegate". In Class B - "Can't find interface declaration for Class C - superclass of Class B." In Class C - "Can't find protocol definition for Class_A_Delegate". Class A header: #import <Foundation/Foundation.h> #import "Class_B.h" @protocol Class_A_Delegate @end @interface Class_A : NSObject <Class_B_Delegate> { } @end Class B header: #import <Foundation/Foundation.h> #import "Class_C.h" @protocol Class_B_Delegate <NSObject> @end @interface Class_B : Class_C { } @end Class C Header: #import <Foundation/Foundation.h> #import "Class_A.h" @interface Class_C : NSObject <Class_A_Delegate> { } @end

    Read the article

  • The fastest way to iterate through a collection of objects

    - by Trev
    Hello all, First to give you some background: I have some research code which performs a Monte Carlo simulation, essential what happens is I iterate through a collection of objects, compute a number of vectors from their surface then for each vector I iterate through the collection of objects again to see if the vector hits another object (similar to ray tracing). The pseudo code would look something like this for each object { for a number of vectors { do some computations for each object { check if vector intersects } } } As the number of objects can be quite large and the amount of rays is even larger I thought it would be wise to optimise how I iterate through the collection of objects. I created some test code which tests arrays, lists and vectors and for my first test cases found that vectors iterators were around twice as fast as arrays however when I implemented a vector in my code in was somewhat slower than the array I was using before. So I went back to the test code and increased the complexity of the object function each loop was calling (a dummy function equivalent to 'check if vector intersects') and I found that when the complexity of the function increases the execution time gap between arrays and vectors reduces until eventually the array was quicker. Does anyone know why this occurs? It seems strange that execution time inside the loop should effect the outer loop run time.

    Read the article

  • Domain model: should things like Logging, Audit, Persistence be in it

    - by hom.tanks
    I'm having a hard time convincing our architect that a Domain model should only have the essential elements of the business domain on it. Things like the fact that a class is persistable, that it needs logging and auditing and that it has a RESTful URI should not drive the domain model. They can be added later on, by using interfaces. Ours is a healthcare information management system. At the very coarse level, its a system where users login and access their healthcare information. They can share this information with others and be custodian for others' information (think Roles). But because of a few sound bytes that caught on early like "Everything should be a REST resource" the model now has a top level class called Resource that every other class extends from. I'm trying to make him see that the domain model should have well defined concepts like User Account, HealthDocument, UserRole etc which are distinct entities of the business , with specific associations between them. Clubbing everything under Resource class lets our model be inflexible besides being potentially incorrect. But he wants me to show him why its a bad idea to do it his way. I don't know how to articulate that properly but all my OO instincts tell me that its just not right. Any thoughts?

    Read the article

  • How can I have a VBA macro perform a Search/Replace in formulas across an entire workbook?

    - by richardtallent
    I distribute an Excel workbook to a number of users, and they are supposed to have a particular macro file pre-installed in their XLSTART folder. If they don't have the macro installed correctly, and they send the workbook back to me, any formulas depending on it include the full path of the macro, e.g.: 'C:\Documents and Settings\richard.tallent\Application Data\ Microsoft\Excel\XLSTART\pcs.xls'!MyMacroFunction() I want to create a quick macro I can use to remove the improper path from every formula in the workbook. I've successfully retrieved the special folder using GetSpecialFolder (an external function that is working just fine), but the Replace call itself shown below throws an "Application-defined or object-defined error". Public Sub FixBrokenMacroFormulas() Dim badpath As String badpath = "'" & GetSpecialFolder(AppDataFolder) & "\Microsoft\Excel\XLSTART\mymacro.xls'!" Dim Sheet As Worksheet For Each Sheet In ActiveWorkbook.Sheets Call Sheet.Activate Call Sheet.Select(True) Call Selection.Replace(What:=badpath, Replacement:="", LookIn:=xlFormulas) ''//LookAt:=xlPart, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False Next End Sub Automating search and replace isn't exactly my forte, what am I doing wrong? I've already commented out some of the parameters that don't seem essential.

    Read the article

  • Variable reference problem when loading an object from a file in Java

    - by Snail
    I have a problem with the reference of a variable when loading a saved serialized object from a data file. All the variables referencing to the same object doesn't seem to update on the change. I've made a code snipped below that illustrates the problem. Tournament test1 = new Tournament(); Tournament test2 = test1; try { FileInputStream fis = new FileInputStream("test.out"); ObjectInputStream in = new ObjectInputStream(fis); test1 = (Tournament) in.readObject(); in.close(); } catch (IOException ex){ Logger.getLogger(Frame.class.getName()).log(Level.SEVERE, null, ex); } catch (ClassNotFoundException ex){ Logger.getLogger(Frame.class.getName()).log(Level.SEVERE, null, ex); } System.out.println("test1: " + test1); System.out.println("test2: " + test2); After this code is ran test1 and test2 doesn't reference to the same object anymore. To my knowledge they should do that since in the declaration of test2 makes it a reference to test1. When test1 is updated test2 should reflect the change and return the new object when called in the code. Am I missing something essential here or have I been misstaught about how the variable references in Java works?

    Read the article

  • Whatfor Visual Studio?! ml, cl, and link exe-cutables would suffice

    - by AntonIO
    It says in /library article /9s7c9wdw : "You can start this tool [cl.exe] only from the Visual Studio command prompt. You cannot start it from a system command prompt or from Windows Explorer." The corresponding (v=VS.80) page geared towards Visual Studio 2005 makes no such mention. Moreover, there is this Q&A. Thing is: Why should anybody spend anything on VS? ml is provided free of charge- necessarily so since it poses no value addition. The combined size of the other two is 895kb. Uncompressed. The GUI is a disservice. I myself have found half a dozen bugs. However, if the above is true, you'd need the IDE. MSFT fanboys, please step up. Background is that I have the 2008 Pro ed. The official Firefox builds use VS 2005 which I have on another system. To me no redundancy is acceptable. That's when I started pondering about boiling down VS and merely copying over the essential binaries. Then extended the thought to synthetically updating V$.

    Read the article

  • How do I send text to a UITextView?

    - by Lee
    I'm new to iphone development. I'm a VB programmer who is trying to convert a VB application to an ipad app. I need some help with sending text to a UITextView. I want to first have a UIPickerView and then once the user hits a UIButton, a UITextView appears and the text is then generated by my source code code, line by line. The code would constantly be concatenating strings to the text. It would sort of go like this-- 1) User makes selections with UIPickerView. 2) User then hits UIButton. 3) UIPickerView is replaced on the screen with a UITextView. 4) The code does stuff. 5) The code adds the 1st line of text into the UITextView. 6) The code does more stuff. 7) The code then adds the 2nd line of text into the UITextView, retaining the 1st line that was already there. Steps 6 and 7 are repeated until the code is done. Does anyone know of any examples of this that I could look at? I am mostly interested in finding something like a youtube video, a webpage that explains the code or even a good book that covers this particular topic. I am finding that the sample codes that Apple has on this site goes over my head. In fact, I could probably benefit from a good book. But, I am looking for one that I would already know covers this particular topic, since it is so essential to the app that I am trying to build.

    Read the article

  • Return call from ggplot object

    - by aL3xa
    I've been using ggplot2 for a while now, and I can't find a way to get formula from ggplot object. Though I can get basic info with summary(<ggplot_object>), in order to get complete formula, usually I was combing up and down through .Rhistory file. And this becomes frustrating when you experiment with new graphs, especially when code gets a bit lengthy... so searching through history file isn't quite convenient way of doing this... Is there a more efficient way of doing this? Just an illustration: p <- qplot(data = mtcars, x = factor(cyl), geom = "bar", fill = factor(cyl)) + scale_fill_manual(name = "Cylinders", value = c("firebrick3", "gold2", "chartreuse3")) + stat_bin(aes(label = ..count..), vjust = -0.2, geom = "text", position = "identity") + xlab("# of cylinders") + ylab("Frequency") + opts(title = "Barplot: # of cylinders") I can get some basic info with summary: > summary(p) data: mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb [32x11] mapping: fill = factor(cyl), x = factor(cyl) scales: fill faceting: facet_grid(. ~ ., FALSE) ----------------------------------- geom_bar: stat_bin: position_stack: (width = NULL, height = NULL) mapping: label = ..count.. geom_text: vjust = -0.2 stat_bin: width = 0.9, drop = TRUE, right = TRUE position_identity: (width = NULL, height = NULL) But I want to get code I typed in to get the graph. I reckon that I'm missing something essential here... it's seems impossible that there's no way to get call from ggplot object!

    Read the article

  • Simplest distributed persistent key/value store that supports primary key range queries

    - by StaxMan
    I am looking for a properly distributed (i.e. not just sharded) and persisted (not bounded by available memory on single node, or cluster of nodes) key/value ("nosql") store that does support range queries by primary key. So far closest such system is Cassandra, which does above. However, it adds support for other features that are not essential for me. So while I like it (and will consider using it of course), I am trying to figure out if there might be other mature projects that implement what I need. Specifically, for me the only aspect of value I need is to access it as a blob. For key, however, I need range queries (as in, access values ordered, limited by start and/or end values). While values can have structures, there is no need to use that structure for anything on server side (can do client-side data binding, flexible value/content types etc). For added bonus, Cassandra style storage (journaled, all sequential writes) seems quite optimal for my use case. To help filter out answers, I have investigated some alternatives within general domain like: Voldemort (key/value, but no ordering) and CouchDB (just sharded, more batch-oriented); and am aware of systems that are not quite distributed while otherwise qualifying (bdb variants, tokyo cabinet itself (not sure if Tyrant might qualify), redis (in-memory store only)).

    Read the article

  • Custom Swing component: questions on approach

    - by phatmanace
    Hi Folks, I'm trying to build a new java swing component, I realise that I might be able to find one that does what I need on the web, but this is partly an exercise for me to learn ow to do this. I want to build a swing component that represents a Gantt chart. it would be good (though not essential for people to be able to interact with it (e.g slide the the tasks around to adjust timings) it feels like the best approach for this is to subclass JComponent, and override PaintComponent() to 'draw a picture' of what the chart should look like, as opposed to doing something like trying to jam everything into a custom JTable. I've read a couple of books on the subject, and also looked at a few examples (most notably things like JXGraph) - but I'm curious about a few things When do I have to switch to using UI delegates, and when can I stick to just fiddling around in paintcomponent() to render what I want? if I want other swing components as sub-elements of my component (e.g I wanted a text box on my gantt chart) can I no longer use paintComponent()? can I arbitrarily position them within my Gantt chart, or do I have to use a normal swing layout manager many thanks in advance. -Ace

    Read the article

  • Doing coding in Linux through a virtual machine on Windows VS partitioning

    - by ihaveitnow
    I already have experience with setting up virtual machines, running them and other minor tasks. Im a gamer, so I wont get rid of windows (for now at least...) but I do want to be a great programmer and to be involved with the Open-Source community. Id like to know if its a good idea to do my programming in linux through a virtual machine, vs giving it a partitioned section of the HDD. Id like to know about performance pros and cons and functionality. All responses are appreciated, thanks in advance. The type of programming I intend to dive into : Android Dev, Web Dev, Desktop Dev...More Android and Web right now though. So im looking at C#,C,C++,Java,PHP,HTML,MySQL...Off the top of the dome. I do web designing as well, so dreamweaver is added as an "essential". But im sure I can do dreamweaver files and upload them to the server after programming in Linux...Right? And any info on IDE's in Linux for the above mentioned are appreciated, but i would prefer going the coding route and understanding the essence of whats happening "under the covers" Thanks to all for reading, I appreciate it. Hope this isnt confusing :S

    Read the article

  • Building a custom Linux Live CD

    - by Mike Heinz
    Can anyone point me to a good tutorial on creating a bootable Linux CD from scratch? I need help with a fairly specialized problem: my firm sells an expansion card that requires custom firmware. Currently we use an extremely old live CD image of RH7.2 that we update with current firmware. Manufacturing puts the cards in a machine, boots off the CD, the CD writes the firmware, they power off and pull the cards. Because of this cycle, it's essential that the CD boot and shut down as quickly as possible. The problem is that with the next generation of cards, I have to update the CD to a 2.6 kernel. It's easy enough to acquire a pre-existing live CD - but those all are designed for showing off Linux on the desktop - which means they take forever to boot. Can anyone fix me up with a current How-To? Update: So, just as a final update for anyone reading this later - the tool I ended up using was "livecd-creator". My reason for choosing this tool was that it is available for RedHat-based distributions like CentOs, Fedora and RHEL - which are all distributions that my company supports already. In addition, while the project is very poorly documented it is extremely customizable. I was able to create a minimal LiveCD and edit the boot sequence so that it booted directly into the firmware updater instead of a bash shell. The whole job would have only taken an hour or two if there had been a README explaining the configuration file!

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >