w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Cannot login to Umbraco 6.0.7 back office using Firefox and Chrome, I am redirected back to the login page but IE and Safari is fine
This is slightly confusing, but can you check that: Your database connection in the staging web.config is correct; and the staging database's user/login has sufficient rights, and is assigned to the database I know you say that Safari and IE work fine, but just to cover the basics it's worth checking the database connections first.

Categories : C#

In Umbraco 6.1.1 MVC 4, how can I do a form post back to a surface controller using a model that inherits from Umbraco's RenderModel?
Ok, I've had no responses to this question but am now in a position to answer it myself. Maybe it was a fundamental oversight, but not that obvious imho, and information on the Umbraco forum etc about inheriting from RenderModel is fairly limited. Essentially the answer, as was my first instinct, is to solve the original exception "No parameterless constructor defined for this object" by providing a paramaterless constructor. The difficulty is working out what to put inside the parameterless constructor for my model, since it inherits from the Umbraco RenderModel which requires an IPublishedContent instance passed to it's constructor. Luckily while browsing around I happened across this post on the Umbraco forum: http://our.umbraco.org/forum/developers/api-questions/40754-Getting-Curre

Categories : Asp Net Mvc

How to implement Remote validation in Umbraco 6.0 for MVC
It may just be me, but your configured route isn't the same as the URL you are using. You URL starts with /us/ but this is part of the path is missing from your route, so it would throw a 404. You could change your route to "us/Stores/{action}/{id}" perhaps and see if that works.

Categories : C#

In Umbraco 6, what is the best way to save and publish a list of nodes with ContentService?
You are correct there is no Publish or SaveAndPublish option that takes in an IEnumerable like the Save method. It could be handy as it could save some lines of code. The most valid option currently to achieve what you want is to do the following. var cs = ApplicationContext.Current.Services.ContentService; foreach(var content in yourListOfContentItems) { cs.SaveAndPublish(content); } Saving your list before publishing by calling Save method isn't really going to make any differences to you as if Umbraco detects there is new content in your list it processes each individually. And from what I can tell doing that and then calling Publish after is not going to save you any cycles either because the Publish method calls the same SaveAndPublishDo method that SaveAndPublish calls. So mi

Categories : C#

how to save xsl file in client pc if i am using Microsoft.Office.Interop.Excel
HRESULT: 0x800A03EC is an unknown (to VB.Net) COM error. This usually happens when Excel throws some error because your input or parameters were wrong or didn't work. Also check the error detail carefully. In my case the Data section had an Item that gave me clues about the exact error thrown by Excel. @Erwin says: The IIS user account has to have permissions to write the file. Search for 0x800A03EC in the following article, How to Create Excel file in ASP.NET C#

Categories : Asp Net

Umbraco MVC Implementation - View does not depend on Umbraco implementations
No you can't. Simply because all requests pass through a single action. In order to retrieve a path to a CMS-managed page, you need to use the node/content traversal the @Model provides. See here for more details on this. Edit To clarify, the author of the article is suggesting that the Umbraco implementation should be more in line with a traditional MVC implementation with little or no logic in the views. Therefore, any querying of node data should happen prior to the view (e.g. in the Mappers). So this is where you would have to retrieve the links. Umbraco's default MVC implementation forces all requests to go via a single action on a single controller. The author's implementation allows the requests to be shared across one controller per document type - which is better IMO. But it st

Categories : Asp Net Mvc

Umbraco MediaService / Umbraco MediaItem not saving
To Save media, I found this method with MediaService. However, I think it's possible another method more refined [HttpPost] public JsonResult Upload(HttpPostedFileBase file) { IMedia mimage; // Create the media item mimage = _mediaService.CreateMedia(file.FileName, <parentId>, Constants.Conventions.MediaTypes.Image); mimage.SetValue(Constants.Conventions.Media.File, file); _mediaService.Save(mimage); return Json(new { success = true}); }

Categories : C#

Umbraco - error when using umbraco.library:NiceUrl(...)
Ok I found a solution: I added an extra check to this part: <!-- Return the url --> <xsl:if test="$i = $max"> <xsl:if test="$id != '' "> <xsl:value-of select="umbraco.library:NiceUrl($id)" /> </xsl:if> </xsl:if> this fixed my problem.

Categories : Xslt

Could not locate Razor Host Factory type: umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines
If you are trying to host the blogengine site within a virtual directory of the Umbraco site, then you will have to amend the blogengine web.config to "remove" all the Umbraco-specific handlers and modules, as these will be inherited by the blogengine application, causing this exception because the application can't find the relevant DLLs in its bin folder. I recently had a similar problem and I have posted the web.config I used in the virtual directory below. Mine was a very simple web application, so obviously this will not work by itself in your blogengine app. You will need to add the relevant parts into your web.config file. Also, this was for a v6 Umbraco install in IIS7.5, so you may have to experiment a little. <?xml version="1.0"?> <configuration> <configSecti

Categories : Iis

pointing to local drive Office.FileDialog fDialog = Application.get_FileDialog(Office.MsoFileDialogType.msoFileDialogSaveAs)
Don't know if you allready got the answer.. But the problem is mostly on the local client. Sometimes the WebClient service has to be restartet to make the windows explorer see a SharePoint document library as a folder. The other problem can be an access problem. If the site isn't a Trusted site, windows explorer cannot send the user token through.

Categories : C#

Is there any Java library which supports both Microsoft office and Open Office?
docx4j is a Java library for creating and manipulating Microsoft Open XML (Word docx, Powerpoint pptx, and Excel xlsx) files. Docx4j

Categories : Java

How do you disable "Save and send" in Excel 2010 (in the File ribbon (called backstage in Office 2010)?
For Ribbon UI example/documentation from Microsoft, here. They will recommend you use the CustomUI Editor. Open your file (which must be an Excel 2007+ file extension like XLSX, XLSM, XLAM, etc) in the CustomUI Editor. Then use this XML in the editor: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <backstage> <tab idMso="TabShare" visible="false" enabled="false"> </tab> </backstage> </customUI> Save the file, and close the CustomUI Editor. Then, open your file. Go to the File/Backstage view and you should see that the Save and Send tab has been removed: Note: This has disabled the entire "Save & Send" tab from the backstage view. It should be possible using XML to fine-tune this, i.e., to enable the tab, bu

Categories : Vba

Using MS Office Interop v11 with Office 2010
Try NetOffice. It's a pretty transparent wrapper around Office Interop API. They detect and load available Interop DLLs at runtime, so you don't have to build your solution against them.

Categories : Dotnet

Passing validation errors back to UI
With this pattern it might make sense to create a custom validation exception that you can throw in case of validation errors. The try catch on the caller side can look for a List<string> property on the exception itself and display the errors in the UI. Alternatively you can return an object with success/error collections instead.

Categories : C#

ActiveRecord won't save changes back to db
Don't change activerecord model attributes in place - you'll confuse the change tracking and activerecord will think you've made no changes. Instead do t.url = t.url.sub(/www./,'') You should also escape the . in the URL or you'd match any character after the www.

Categories : Ruby On Rails

Is it practical to have back-end (database side) validation for everything?
back end validations are necessary! if the front end uses JavaScript validation, and the user disables the JavaScript in the browser the validation is turned off. So there is need for back-end validation.

Categories : SQL

I want to open file in asp.net and save it back after editing
Assuming this is a text file, you could read it into a textbox, make your edits, and then just overwrite the old file. Assuming you're working with a CSV file named "hello.csv", you can do something like this: ASPX code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="btnRead" runat="server" Text="Read text file" onclick="btnRead_Click" /> <p><asp:TextBox ID="tb1" TextMode="MultiLine" runat="server" Height="168px" Width="624px"></asp:TextBox></p> <p><asp:Button ID="btnWrite" runat="server" Text="Write text file" onclick="btnWrite_Cl

Categories : C#

Save ListView data and get it back on application start
I suggest that you read this article: http://developer.android.com/intl/ru/guide/topics/data/data-storage.html In your case, I think the easiest way is to save list data during run time to some cache file (simple text file would do) and then load the data from it during onCreate() of your activity. This way you could always load the data from your cache file even if your application was killed. After loading list data from file you could start your AsyncTask, load data from web and then reload the list at onPostExecute().

Categories : Java

Save and Restore UIViewcontroller when back button is pressed
If your are using a Navigation controller, navigating from one controller to another, your parent view controller will not be deallocated. Hence you can maintain state of that first view controller by means of properties or something else. When viewWillAppear is called for that controller, you can make use of that and update the controller accordingly.

Categories : Iphone

How to save state of activity on android on back key press
In general, you need to save any state information in onPause(), and recover it in onResume(). I was under the impression that various state information is kept automatically when you close the App, and automatically restores itself when start it back up again (until Android removes the App from its memory to make space, calling onDestroy()). If I were you, I would store the grid in SharedPreference. It really is the most reliable solution. You can also use the details in this topic: http://stackoverflow.com/a/151940/503508

Categories : Android

How to Edit & Save ViewModels data back to database
First of all, it's really good that you are using ViewModels but for this particular case, it's probably not necessary, your Create view could look like this: @model MvcApplication1.Models.Doctor //other fields here <div class="editor-label"> @Html.LabelFor(model => model.DoctorAddress.Address) </div> <div class="editor-field"> @Html.EditorFor(model => model.DoctorAddress.Address) @Html.ValidationMessageFor(model => model.DoctorAddress.Address) </div> <div class="editor-label"> @Html.LabelFor(model => model.DoctorCharge.IPDCharge) </div> <div class="editor-field"> @Html.EditorFor(model => model.DoctorCharge.IPDCharge) @Html.ValidationMessageFor(model => mo

Categories : Asp Net Mvc

Can we save thread with bundle when push back button?
You can't save a thread in a Bundle. In general if you need a task to run after you exit the app you should be using a Service.

Categories : Java

How to return validation information from a .save
It is not official but you can send an errors object back. With the fields that did not validate and a stadus code 422 so with status code 422 content {"errors": {"foo": "no foo barr"}} your record gets an error object with the error messages and data will prevent you from sending update until you altered the fields that have error's

Categories : Json

Mongoosejs set/save vs. update for validation
The main downside to your approach is that you lose atomicity of your updates, because another update can occur in-between the time of your findOne call and the call to doc.save. You also lose the power of the various update operators like $addToSet that provide tested logic that you would otherwise have to implement in code.

Categories : Node Js

Backbone.validation not working on save
I just did a bunch of testing and the only way I could get it to consistently not send a request was by also creating defaults on the model: var LocationModel = Backbone.Model.extend({ defaults: { location_name: null }, validation: { location_name: { required: true, msg: 'A name is required for the location' } } // end validation }); var test = new LocationModel(); test.on('validated', function() { console.log(arguments); }); test.url = '/echo/json'; test.save(); Here's a fiddle. If you comment out the defaults, it sends a request initially, even though the validated event is saying that it's invalid. And then fires validated again without sending the request.

Categories : Backbone Js

How to keep client side MVC 4 validation disabled when a form is rendered again after post back?
After a postback the element will lose its disabled property, you will have to re-apply prop("disabled", true) to the element after the postback Or could you use <% Html.EnableClientValidation(false); %> before the field?

Categories : Jquery

save check box state in android after back button clicked
Override the onbackpressed to trigger your function to save the states. public void onBackPressed() { //Do your db saving here super.onBackPressed(); }

Categories : Android

How to change property in DOM and save back to model for use in separate view?
Your issue is caused by the isolated scopes. When you create a new controller inside of your main controller, or next to your main controller, each of them have their own scope. A child scope can see his parent scope, but it is in read-only mode. There is 2 solution to your problem. You could use the rootScope to store the items and add functions in the rootScope to edit this array. This is a bad design. The real Angular way to do what you want to do is to use services. A service is shared by all the controllers and even persist between views. The service will hold the data and give you access to it via methods. This service would do the job : var app = angular.module('plunker', []); app.factory('FavoritesService', function() { var items = [{ "isFavorited": false, "n

Categories : Javascript

open('file_path').read() - save contents back to file
Do you mean something like that? def save_file(request): if request.method == 'POST': with open('some_file') as fw: fw.write(request.POST["file"]) You can find more about accessing request content in official docs.

Categories : Python

Save page view state on Server, and not allow it to go back browser
Yes you can save it on server on a database You overwrite this two function of the page protected virtual void SavePageStateToPersistenceMedium (object viewState); protected virtual object LoadPageStateFromPersistenceMedium(); and on save you add to the page a unique id and you save the viewstate the database, and connect it with this unique ID. You need to clear it time to time to remove the non used viewstate data here is a full working example with the source code: http://www.codeproject.com/Articles/8001/ViewState-Provider-an-implementation-using-Provide For me the better is to reduce the viewstate that you use on controls, and compress it. Usually the viewstate after correct using of it is too small. Also remember that the viewstate is used on post back, on page with out the use

Categories : Asp Net

How to tell if there was a save or validation attempt in a Rails model?
You can add a custom validation method. Your method will be executed on any validation attempt. You can set a flag inside your validation method to know if it has been executed. But I see no point in this task. I doubt you really should do this.

Categories : Ruby On Rails

Save sklearn cross validation object
One possible cause could be multithreading issue, which you may refer to this stackoverflow answer. Also, is it possible for you to dump your object not via joblib but a more fundamental method like pickle (and not even cPickle, which is more restrictive)?

Categories : Python

Save Model with a partially failed validation
If you're looking to bypass validations you can always do so with: if @car.save # ... else @car.save(validate: false) end You may want to have a different conditional on that or whatever... but this is how you bypass validations on a one-off basis. This may, however, destroy the errors array so you could rebuild it after the save(validate: false) with: @car.valid? You can also bypass validations one-at-a-time using @car.update_attribute(:attribute, <value>).

Categories : Ruby On Rails

Django to save the form details in database and retreive back using ajax
The basic idea is that you put an element with an ID around the data that will change, and target that id with a jQuery.load call. see: Render a django table using ajax

Categories : Ajax

Yii redirect to same view after multiple model validation and save
Did you use ajax validation for the form? If yes, implement the code to ajax validate on your controller or set ajax validation is false. Your code below is right: if ($valid) { foreach ($models as $model) { $model->save(false); //The model has been validated, no need to validate again } $this->redirect... }

Categories : Validation

CakePHP save failing with validation errors set but empty
Maybe it doesn't like the null and zero value of parent_id and sort_order? Also in the database what are their field types set as? Do they allow null values? etc. I'm guessing that as there are no validation rules in the model or parent/App model, then it must be some default validation with cake's lib linking to the database/mysql table itself. So I would check the Categories table structure for the parent_id and sort_order fields.

Categories : Cakephp

Yii save multiple models into a 3rd connecting table with validation
It took reading this a couple times before I realized what you are doing. This is a basic order entry problem. Typically this is solved by creating the order, and then creating the order details one by one. You can show them on the grid as they are created. The thing that confused me was that you seem to have a bunch of empty orders already created, and are trying to do some sort of many to many assignment of products to the orders. That is complicating things far too much. Better to: Create a new order. This can be when the user selects the first item to put into a shopping cart, or simply by initiating a create order screen which populates the order header information. Add an item to the newly created order. Once again this can be that first item added to the shopping cart, or yo

Categories : Validation

rails form skips validation and doesn't save
I don't think it's skipping the validation, I think there's no way for your page to show the error. You need to add <%= flash[:success] %> somewhere on the page. You can also output errors for the contact object, which might help! (You may refute this by posting the content of common/form_errors -

Categories : Ruby On Rails

Validation fails if redirect after save is anywhere other than the saved object
When I see that I am quite scared validates_presence_of :plain_password, :on => :create Are you saving unencrypted password in your database ? Regarding your issue you may want to consider using respond_to / respond_with class UsersController < ApplicationController respond_to :html, :json def new @user = User.new end def create @user = User.new(params[:user]) if @user.save # set sessions end respond_with @user, location: 'static/tutorial' end end Read this blog post http://bendyworks.com/geekville/tutorials/2012/6/respond-with-an-explanation

Categories : Ruby On Rails

How to save multiple activity's edit text into a single file and again restoring back on pressing button
Shared preference is a good idea. see this (How to use SharedPreferences in Android to store, fetch and edit values) Alternatively you think of other File IO. Android also provide XML parser that could be another option depend on your requirement i guess. For SAX see this(How to parse XML using the SAX parser)

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.