Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 220/278 | < Previous Page | 216 217 218 219 220 221 222 223 224 225 226 227  | Next Page >

  • PHP image resize on the fly vs storing resized images

    - by Pablo
    I'm building a image sharing site and would like to know the pros and cons of resizing images on the fly with php and having the resized images stored. Which is faster? Which is more reliable? how big is the gap between the two methods in speed and performance? Please note that either way the images go through a PHP script for statistics like views or if hotlinking is allow etc... so is not like it will be a direct link for images if i opt to store the resize images. I'll appreciated your comments or any helpful links on the subject, Thanks.

    Read the article

  • SQL Database dilemma : Optimize for Querying or Writing?

    - by Harry
    I'm working on a personal project (Search engine) and have a bit of a dilemma. At the moment it is optimized for writing data to the search index and significantly slow for search queries. The DTA (Database Engine Tuning Adviser) recommends adding a couple of Indexed views inorder to speed up search queries. But this is to the detriment of writing new data to the DB. It seems I can't have one without the other! This is obviously not a new problem. What is a good strategy for this issue?

    Read the article

  • IDL-like parser that turns a document definition into powerful classes?

    - by paniq
    I am looking for an IDL-like (or whatever) translator which turns a DOM- or JSON-like document definition into classes which are accessible from both C++ and Python, within the same application expose document properties as ints, floats, strings, binary blobs and compounds: array, string dict (both nestable) (basically the JSON type feature set) allow changes to be tracked to refresh views of an editing UI provide a change history to enable undo/redo operations can be serialized to and from JSON (can also be some kind of binary format) allow to keep large data chunks on disk, with parts only loaded on demand provide non-blocking thread-safe read/write access to exchange data with realtime threads allow multiple editors in different processes (or even on different machines) to view and modify the document The thing that comes closest so far is the Blender 2.5 DNA/RNA system, but it's not available as a separate library, and badly documented. I'm most of all trying to make sure that such a lib does not exist yet, so I know my time is not wasted when I start to design and write such a thing. It's supposed to provide a great foundation to write editing UI components.

    Read the article

  • How to see "anti if" movement and its gaol?

    - by Vijay Shanker
    I have a developer for last 3 years, have been using if-else or if-else if statements a lot in my programing habit. And today, I found This link. One obvious sample i put here public void doSomthing(String target, String object){ //validate requests if(target != null && target.trim().length() < 1){ //invalid request; } //further logic } Now, I have seen this sort of check all over the places, libraries. So, I wanted to have a discussion about the worthiness of such a movement. Please let me know your views.

    Read the article

  • RSpec View testing: How to modify params?

    - by sebastiangeiger
    I am trying to test my views with RSpec. The particular view that is causing me troubles changes its appearance depending on a url parameter: link_to "sort>name", model_path(:sort_by => 'name') which results in http://mydomain/model?sort_by=name My view then uses this parameter like that: <% if params[:sort_by] == 'name' %> <div>Sorted by Name</div> <% end %> The RSpec looks like this: it "should tell the user the attribute for sorting order" do #Problem: assign params[:sort_for] = 'name' render "/groups/index.html.erb" response.should have_tag("div", "Sorted by Name") end I would like to test my view (without controller) in RSpec but I can't get this parameter into my params variable. I tried assign in all different flavours: assign[:params] = {:sort_by => 'name'} assign[:params][:sort_by] = 'name' ... no success so far. Every idea is appreciated.

    Read the article

  • UINavigationController doesn't fully push view and only changes the Navigation toolbar to the next v

    - by user284757
    So I have an iPhone application that utilizes a UINavigationController for setting up the views. When the application first starts, it presents the user with a UITableViewController and the user can select an item and it will push another view. Now I have it set so that my app remembers the user's last selection and automatically selects it and loads the correct view controller. The only problem is that I am experiencing a really weird glitch when I load the next view automatically.. When the view is pushed, the navigation toolbar will change so that a back button directed to the previous view is showing but it won't display the next view. It will instead keep showing the table view and I can interact with it as well. I can press the back button and it will change the toolbar back and the tableview is still shown. Then when I select an item it loads the view just fine. Thanks for the help.

    Read the article

  • Tabbar App with Paging between tabs.

    - by user558076
    Hi everyone, I've been struggling for about four days now trying to figure out how to implement the functionality I need. Basically I want to make a tabbar app that you can swipe back and forth between the tabs. Say I have 4 tabs. Would it make any sense just to create a scrollview that's 4 times as wide as the device, and load up 4 individual views side by side? Then I could use the tabbar delegate to simple tell which page to make visible? I could also use itemSelected to update the tab itself if a user swipes to a new page. does this make sense / is it a good idea? I just need a quick yes or no answer before I spend another whole day pursuing something doomed to failure. Thank you very much for your help...

    Read the article

  • form_for [@parent,@son],:remote=>true not asking for JS

    - by Cibernox
    Hi. I have a plain old form. That form is used to create new objects of a nested model. #restaurant.rb has_many :courses #courses.rb belongs_to :restaurant #routes.rb resources :restaurants do resources :courses end In my views(in haml), i have that code: %li.course{'data-random'=>random} = form_for([restaurant,course], :remote=>true) do |f| .name= f.text_field :name, :placeholder=>'Name here' .cat= f.hidden_field :category .price= f.text_field :price,:placeholder=>'Price here' .save = hidden_field_tag :random,random = f.submit "Save" I espected that form to be answered by action create of courses_controller with JS (create.js.erb), but it is submited like a normal form, and is answered with html. What am I doing wrong? This problem is similar to this but the only answer don't make sense to me. Thanks Inside

    Read the article

  • Crystal Reports: Cannot insert some fields from Field Explorer to Report

    - by zdhacz
    I have an existing report (Crystal Reports 11) that is based on two Oracle views. I have made 'Verify database' already, it's done and up to date. My problem is that I can insert some fields to report but some other I cannot. For example: field Name (string(35)) is ok, but similar field Compamy (string(20)) I cannot insert to Report. Drag&drop does not work and small button "Insert to Report" in Field Explorer is disabled too. Next symptom: when I try to use functionless field (e.g. Company) in Record Selection Formula Editor, Crystal Reports crash. There is any way how to add these fields into Report? Thanks

    Read the article

  • Region or ItemsSource for large data set in ListBox

    - by Ryan
    I'm having trouble figuring out what the best solution is given the following situation. I'm using Prism 4.1, MEF, and .Net 4.0. I have an object Project that could have a large number (~1000) of Line objects. I'm deciding whether it is better to expose an ObservableCollection<LineViewModel> from my ProjectViewModel and manually create the Line viewmodels there OR set the ListBox as it's own region and activate views that way. I'd still want my LineViewModel to have Prism's shared services (IEventAggregator, etc.) injected, but I don't know how to do that when I manually create the LineViewModel. Any suggestions or thoughts?

    Read the article

  • Is there an ORM with APIs to be used programatically?

    - by Kabeer
    Hello. Neither did not get any response for my previous question, nor enough views :) So here I am now framing my query afresh. Is there any ORM that offers APIs to be used programatically? In my situation, a user will be helped through a wizard to define some entities. Thereafter those entites will be created in a database in form of tables (there will of course be some improvization). I need an ORM that offers APIs for modeling and creating entities during application runtime and not just during design time. Mine is a .Net application, therefore I was looking at Entity Framework. However, to me it looked tied to Visual Studio (I may be wrong also as I am new to it). Any recommendations? Or alternative point of view?

    Read the article

  • iphone dev - loading table content asynchronously

    - by Brian
    My app has a navigation controller which push and pop a series of views. One of the tableViews loads .xml file from URL and it takes 4-5 seconds. If I click the back button on the navigation bar, it will only respond after the content of the table finish loading. Is there an easy way to load the content asynchronously so that the app will still respond to my gesture on the navigation bar? p.s. I search this on the Internet and people are talking about multithreading. I don't know a lot about threads so please be more specific. Thanks in advanced =)

    Read the article

  • How to pass Model from a view to a partial view?

    - by chobo2
    Hi I have a view that is not strongly typed. However I have in this view a partial view that is strongly typed. How do I do I pass the model to this strongly typed view? I tried something like public ActionResult Test() { MyData = new Data(); MyData.One = 1; return View("Test",MyData) } In my TestView <% Html.RenderPartial("PartialView",Model); %> This give me a stackoverflow exception. So I am not sure how to pass it on. Of course I don't want to make the test view strongly typed if possible as what happens if I had like 10 strongly typed partial views in that view I would need like some sort of wrapper.

    Read the article

  • UITextView or UIWebView with normal words looking like links

    - by diwup
    Hey guys, I was looking at the Twitter for iPhone app and was puzzled. First of all, there are normal words looking like links inside. Second, when I touch those link-like words, the text view (or maybe web view) jumps to the corresponding part below (yes, it doesn't open Safari, it just jumps to the text within that text/web view) Now I want to implement the same effects. I should base my implementation on what? UITextView or UIWebView? How to make normal words look like links? How to make those smooth jumps within such a text/web views? Thanks in advance.

    Read the article

  • Which PHP calendar will suit my needs? Or build my own?

    - by John
    There are so many web based calendars out there that I'm not sure which will best suit my purposes. I want to create an events calendar, which I suppose looks and functions in much the same way as google calendar. But users shouldn't need to sign up for a gmail account or a google account. Users of my social network website should be able to create events in the calendar and share it with other friends in their "friend network". In month, year or day views, you can mouse hover events to see a bubble dialog that lists events in detail. People need to pay a monthly fee to use my website (not sure if this prevents me from using google apps). So is something like Google Calendar the way to go? Or are there other php/javascript calendars out there that already meet my needs? Or will it just save me more time to build my own?

    Read the article

  • How to integrate "basic" website into Zend Framework

    - by Joel
    Hi guys, I have a website that has around 10 pages. Only one of those pages uses Zend (to integrate with Google gData). Right now, it's just all coded into that one page, but I'm wanting to learn how to use Zend Framework. How do you handle basic-relatively static php pages within Zend Framework? Do you just stick the whole individual pages into their own respective views and then have to common stuff in the layout, and not worry about a model and controller for those pages? in general, is MVC accepted and appropriate technology for general "web-design" work?

    Read the article

  • Large strings: Text files or SQL DB?

    - by Tommo
    I am coding a forum system using PHP. I am currently storing a threads ID, title, author, views and other attributes in an SQL database and then storing the thread body (the HTML and BBcode) in text files inside a folder named after the thread ID. In practise it's really simple to grab the database values then just grab the thread body from the text file, but I was wondering if this is the 'proper way'? I have personally no problems doing this but if it turns out it is massively inefficient and I should instead store both the thread body HTML and BBcode in the database instead then I will change. However, to me it seems wrong to store such a (very possibly) huge string of multi-line text along with lots of different characters in a database - I was taught that databases are more for short field 'values' rather than website content. I would just like a definitive answer to this because it's been bugging me for ages as to wherever I’ve been doing it properly. Does anyone know how popular forum systems store threads?

    Read the article

  • Interpreting type codes in sys.objects in SQL Server

    - by fatcat1111
    On SQL Server, the sys.objects table includes "Type" and "Type_Desc" attributes. For example: SELECT DISTINCT [Type], Type_Desc FROM Sys.Objects ORDER BY [Type] Returns: C CHECK_CONSTRAINT D DEFAULT_CONSTRAINT F FOREIGN_KEY_CONSTRAINT FN SQL_SCALAR_FUNCTION FS CLR_SCALAR_FUNCTION IT INTERNAL_TABLE P SQL_STORED_PROCEDURE PK PRIMARY_KEY_CONSTRAINT S SYSTEM_TABLE SQ SERVICE_QUEUE TR SQL_TRIGGER U USER_TABLE UQ UNIQUE_CONSTRAINT V VIEW Is there a comprehensive list of these types somewhere? There isn't a constraint on sys.objects that points me to table of these, and sys.types contains data types. I've searched SQL BOL but haven't found it. Any help would be appreciated. EDIT: Some DBs use only a subset of these types. For example, if I have a database with no views, when I query Sys.Objects as above, there are no "V" rows in the results. I am looking for a list of all possible types and descriptions used by SQL Server.

    Read the article

  • Freeglut ( OpenGL ) in C

    - by user1832149
    I would like to ask for you a little help in my homework. I'm learning at an university of Debrecen, and I would like to be a programmer, but I'm stuck with this homework. It's a OpenGL project in C. (freeglut) The next task is about: Window to viewport transformation. Draw graphs of functions, as shown below. The individual views (viewport) defines four different rectangles. Functions look like this picture: one window in 4 piece, and one pice of one function. The functions, respectively: f(x)=x2 g(x)=x3 h(x)=sin(x) i(x)=cos(x) Heres a pic what I need to make: How would I approach such a task?

    Read the article

  • JQuery pass model to controller

    - by slandau
    I want to pass the mvc page model back to my controller within a Javascript Object. How would I do that? var urlString = "<%= System.Web.VirtualPathUtility.ToAbsolute("~/mvc/Indications.cfc/ExportToExcel")%>"; var jsonNickname = { model: Model, viewName: "<%= VirtualPathUtility.ToAbsolute("~/Views/Indications/TermSheetViews/Swap/CashFlows.aspx")%>", fileName: 'Cashflows.xls' } $.ajax({ type: "POST", url: urlString, data: jsonNickname, async: false, success: function (data) { $('#termSheetPrinted').append(data); } }); So where it says model: Model, I want the Model to be the actual page model that I declare at the top of the page: Inherits="System.Web.Mvc.ViewPage<Chatham.Web.Models.Indications.SwapModel>" How can I do that?

    Read the article

  • How to have the controller change its behavior depending on the view?

    - by Ian Boyd
    If from one view a user enters some invalid data, e.g.:     E-mail: [email protected]     then i want the controller to: not place the data into the model color the text box reddish not allow the user to save But it's possible that if the user enters the same invalid data in a different view i want the controller to: place the data into the model color the text box reddish allow the user to save But it's possible that if the user enters the same invalid data in a different view i want the controller to: place the data into the model color the text box bluish allow the user to save And it's possible that another view will: place the data into the model leave the text box uncolored allow the user to save And it's possible that another view will: auto-correct the data, placing it into the model color the text-box reddish allow the user to have And it's possible for another view to: auto-correct the data, placing it into the model update the view with the new data color the text-box bluish allow the user to save [ad infinitum] Without using n-controllers for n-views, how do i do this?

    Read the article

  • What is the most elegant way to access current_user from the models? or why is it a bad idea?

    - by TheLindyHop
    So, I've implemented some permissions between my users and the objects the users modify.. and I would like to lessen the coupling between the views/controllers with the models (calling said permissions). To do that, I had an idea: Implementing some of the permission functionality in the before_save / before_create / before_destroy callbacks. But since the permissions are tied to users (current_user.can_do_whatever?), I didn't know what to do. This idea may even increase coupling, as current_user is specifically controller-level. The reason why I initially wanted to do this is: All over my controllers, I'm having to check if a user has the ability to save / create / destroy. So, why not just return false upon save / create / destroy like rails' .save already does, and add an error to the model object and return false, just like rails' validations? Idk, is this good or bad? is there a better way to do this?

    Read the article

  • Javascript in CakePHP

    - by user445803
    Hello, I had one page in Views in CakePHP, it have normal javascript block, Just inserted: <script language="JavaScript" type="text/javascript"> ---code--- </script> Inside page, and it was all working okay... But now... It doesn't show... How can I change configuration or something to enable showing javascript blocks without CakePHP commands. Javascript needs data from that page so I can't use outer file, and it's too long to use $javascript-codeBlock Is there any way to reconfigure stupid CakePHP to start showing those blocks? Some files are showing javascript, and it's working all okay, but some of them won't show... Please help...

    Read the article

  • UIWebView appears null when calling fro a method

    - by Alexidze
    I have a major problem when trying to access a UIWebView that was created during ViewDidLoad, the UIWebView appears null here is how i declare the property @property (nonatomic, retain) UIWebView *detailsView; the implementation @implementation iPadMainViewController @synthesize detailsView; - (void)viewDidLoad { [super viewDidLoad]; detailsView = [[UIWebView alloc] initWithFrame:CGRectMake(500, 0, 512, 768)]; [self.view addSubView:detailsView]; } When accessing from - (void)loadDetailedContent:(NSString *)s { NSLog(@"%@", detailsView); } I get NULL, is it a normal behavior or am i doing something wrong? here is the touchesBegan that is being called, from the views subclass that is being touched, -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { iPadMainViewController *mycontroller = [[iPadMainViewController alloc] init]; self.delegate = mycontroller; [self.delegate loadDetailedContent:NewsId]; }

    Read the article

  • didSelectRowAtIndexPath being called after viewDidLoad of the called view

    - by Serguei Fedorov
    I am trying to pass variables over to the new view. I have the following code: appDelegate *dataCenter = (AppDelegate*)[[UIApplication sharedApplication] delegate]; dataCenter.myVariable = [array objectAtIndex:indexPath.row]; in the didSelectRowAtIndexPath of the calling view. However, the issue that I have is that this variable is empty in the vewDidLoad function of the next view, simply because it fired off BEFORE the didSelectRowAtIndexPath of the calling view. I am using storyboard to link the views together. Both are UITableView. If I hit back and then reselect the table element it is then set, granted that by the time I hit back and then selected again, the variable got set. Is there any way to for the order of execution? I really don't want to do UI view switching on the back end. Any help is greatly appreciated!

    Read the article

< Previous Page | 216 217 218 219 220 221 222 223 224 225 226 227  | Next Page >