w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Table for model not found in datasource default
I found this question when I was googling. I had a similar issue. I kept being prompted that I do not have a particular table when it was obviously there and I was following the conventions in naming the table as plural form. I even cleared the cake cached files several times to no avail. Then I changed the debug mode from 0 to 2. Suddenly the error was gone. Then I changed the debug mode from 2 back to 0. The error was still gone. This is a weird behavior. And I am not sure exactly how to duplicate it. I am writing this down in case somebody else faced the same issue as me. UPDATE: I have realized that for one of my apps that frequently has this problem, somehow the jenkins tasks causes some files in tmp/cache/persistent to have files in the wrong user:group. I have corrected this

Categories : PHP

Cakephp Bake - table not found in datasource
The issue ending up being with permissions on the table. ./cake bake can't see the database if the user defined in app/config/database.php does not have permissions on the tables. All I needed to do was add permissions on the tables. This is what I did in my Postgresql database: GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE my_schema.my_table TO notrealusername I also add permission to the sequences used by the tables: GRANT USAGE ON SEQUENCE my_schema.my_table TO notrealusername The SQL is for Postgresql 9.1 Adding the permission to the sequences didn't make a difference for using the Bake utility, but it would have caused problems down the road when trying to insert new records that depend on a sequence for a default value.

Categories : PHP

Can't get linkedin profiles summaries using Spring social
EDIT. It is true, summary is included in the basic profile. So normally you must be able get it. It looks like a bug on LikedIn side. I am almost sure that you need to request `r_fullprofile` permission to be able get summary (see [corresponding documentation entry][2]). To do it with Spring Social you can try to: add corresponding parameter to signin form <form name="linkedinin_signin" id="linkedin_signin" action="${linkedin_uri}" method="POST"> <input type="hidden" name="scope" value="r_fullprofile" /> </form> and use some [more recent Spring Social version][3]. Support for Linked In scopes was added starting from Spring Security version 1.1.0.M2. Hope it helps.

Categories : Java

Database Scheme for unified profiles fetched from multiple Social Networks (Facebook and Linkedin...)
var UserSchema = new Schema({ name: { type: String, default: '' }, email: { type: String, default: '' }, provider: { type: String, default: '' }, hashed_password: { type: String, default: '' }, salt: { type: String, default: '' }, authToken: { type: String, default: '' }, facebook: {}, linkedin: {} }) I'm using the Schema mentioned above for my users collection. and when a new user wants to Sign up, using either the local strategy or social strategies I just use the update mongoose function with the "upsert: true" option, to either update or create an entry.

Categories : Mongodb

ASP .NET Nested Datagrid - Field or Property was not found on selected datasource error
Look at this part: DataTable dtQuoteHed = new DataTable("dtQuoteHed"); dtQuoteHed.Columns.Add("QuoteNum", typeof(int)); dtQuoteHed.Columns.Add("QuoteLine", typeof(int)); You are defining Quoteline column for dtQuoteHed table but in the schema dtQuoteHed element does not have Quoteline child element. So remove it from dtQuoteHed data table: DataSet dsQuote = new DataSet("dsQuote"); DataTable dtQuoteHed = new DataTable("dtQuoteHed"); dtQuoteHed.Columns.Add("QuoteNum", typeof(int)); dtQuoteHed.Columns.Add("TerritoryTerritoryDesc", typeof(string)); dtQuoteHed.Columns.Add("DueDate", typeof(DateTime)); dtQuoteHed.Columns.Add("BTCustID", typeof(string)); dtQuoteHed.Columns.Add("CustomerName", typeof(string)); dtQuoteHed.Columns.Add("QuoteAmt", typeof(decimal)); dtQuoteHed.PrimaryKey =

Categories : C#

Default Table Model in JavaFX
The default selection mode of tableview is SelectionMode.SINGLE. To change it to multiple try tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); > what am I trying to do is select a single row from table and get the index To get selected index: viewCategory.getSelectionModel().getSelectedIndex(); To listen changes of index: viewCategory.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() { @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) { System.out.println("index changed from " + oldValue + " to " + newValue); } });

Categories : Java

Error No default container found with grails
See how plugins are declared in BuildConfig.groovy. You need this section at least: grails.project.dependency.resolution = { inherits("global") { } repositories { grailsPlugins() grailsHome() grailsCentral() } plugins { build ":tomcat:$grailsVersion" } }

Categories : Tomcat

Default Table Model doesn't show new lines
That's because the DefaultTableCellRenderer uses JLabel as the component to paint the cells. And labels can't have new lines. You have to use your own TableCellRenderer that uses a TextComponent that accepts new lines, for example JTextArea. final JTextArea textArea = new JTextArea(); // or static field //... table.setDefaultRenderer(Object.class, new TableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { textArea.setText(value.toString()); return textArea; } }); Try copying and pasting a text of a couple of lines, to see it work. Now you might want to cahnge the cellEditor and prevent the Enter key from finalizing the edition so it can be us

Categories : Java

Xcode5 "No matching provisioning profiles found issue" (but good at xcode4)
Here's a simpler solution that worked for me: In XCode5, double-click on your app's target. This brings up the Info pane for the target. In the "Build Settings" section, check the "code signing" section for any old profiles and replace with the correct one. update the value of "code signing identity" and "provisioning profile"

Categories : Xcode

pyodbc error of data source name not found or no default driver on 64-bit PC
Download the 64-bit Office 2010 drivers from here. I was only able to test with an Access 2010 database, but it should work for 2007 also. You don't need the Provider attribute of the connection string. cnxn = pyodbc.connect(r'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=managermeta.mdb;')

Categories : Python

npm install -g karma error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found
If you don't have Visual Studio installed at all, then you definitely need the answer at http://stackoverflow.com/a/18779641/530967. Basically you have to install some version of Visual Studio 2010 (Express version is free), then the Windows SDK, then VS SP1, then a VC++ compiler update, all in that order. After that this problem should disappear (as it did for me.)

Categories : Angularjs

Error: Cannot connect to [Microsoft][ODBC Manager] Data source name not found and no default driver specified
If your application cannot find the Jet driver via url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" + url1; then it must be running as 64-bit. There is no 64-bit Jet driver, so you'll need to download and install the 64-bit version of the Access Database Engine from here, and then use this instead: url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + url1;

Categories : Java

datamember property 'System' cannot be found on the DataSource
If you want the display member to be the key of each pair in the dictionary, and the value member to be the value of each pair, you probably want: lComboBox.DisplayMember = "Key"; lComboBox.ValueMember = "Value"; You should be aware that the order will be undetermined though - is that really what you want? Calling ToString() on the return value of Dictionary<,>.Keys or Dictionary<,>.Values is probably just going to give you the fully-qualified name of a type, which will start with System.Collections... - that's why you're getting the current error. I'd also strongly encourage you to rename your property to something which follows the .NET naming conventions, and also means something.

Categories : C#

How do I model social network connections in neo4j?
Not sure if I understand you requirements correctly, but in general, it's good to model real world entities as nodes and relationships between things, quite naturally, as relationships. In your case, I'd go one of the two following ways, depending on how much you want to do with their social media accounts. 1) A node for each social media, e.g. (LinkedIn), (Twitter), (Facebook). Then a single relationship type, call it HAS_ACCOUNT, which links (user) nodes to accounts. For example: (user1)-[:HAS_ACCOUNT]->(LinkedIn) 2) If you find you're storing too many properties in the HAS_ACCOUNT relationship, or even that you feel like it should be linked to something else (e.g. links between social media accounts), create a node for each account the user has. (user1)-[:HAS_ACCOUNT]->(user

Categories : Database

How to create datasource with observable model?
Bindings are not supported inside of the client template - you can only use client expressions like #= #, #: #, # #. Basically what you are looking for is discussed in a code library. Anyway I updated the JsBin with extra logic that demonstrates what you search for: template: '<input type="checkbox" #= IsSelected ? "checked" : ""# "></input>', And the most vital logic that actually updates the underlying model: grid.tbody.on('click',':checkbox',function(){ var tr = $(this).closest('tr'); grid.dataItem(tr).set('IsSelected',$(this).is(':checked')); }); JsFiddle here.

Categories : Javascript

How to design content share model for social network in Django?
If I do this work, I may choose the first design; But I will create a category Model like this class Category(models.Models): category = models.CharField(max_length=100) class VideoPost(models.Models): category = models.ForeignKey(Category) ......

Categories : Django

KendoUI datasource model for "recursive" object
This kind of binding is possible in kendo grid. you will be using something like the one given below var dataSource = new kendo.data.DataSource({ data: { a:"A", b:{ c:"C", d:"D" } }, schema:{ model:{ fields:{ a: "string" 'b.c': "string", 'b.d':"string" } } } }) This kind of binding works fine for me. Do check this out. If you are working with ASP.Net MVC, the posted JSON data is model bound perfectly too.

Categories : Kendo Ui

Kendo DataSource How to define a Model.Id when using DataTable
You can bind to a DataTable. In fact, we do a lot of dynamic grids and DataTable is our only recourse. Binding is a little different, though. A snippet for one of ours is like this: @model System.Data.DataTable @(Html.Kendo().Grid(Model) .Name("SomeGrid") .Columns(columns=> { foreach(System.Data.DataColumn column in Model.Columns) { columns.Bound(column.ColumnName).Title(column.Caption).Width(200); } } ) .Selectable(selectable=>selectable .Type(GridSelectionType.Row) ) .DataSource(dataSource => dataSource .Ajax() .Model(model => { foreach(System.Data.DataColumn column in Model.Columns) { model.Field(col

Categories : Kendo Ui

Kendo UI DataSource with Spring MVC model attribute
I figured out the answer, instead of using the bind method, I declared change="onChange" in kendo:grid tag, and I implemented the onChange method in the same jsp file.

Categories : Javascript

can't save model instance in pipeline method of django-social-auth
def load_user_data(request, user, *args, **kwargs): x = User.objects.get_or_create(id=user.id) # this is looking for specyfic User, if nothing found it will create one. In your solution x wasnt User instance, so you cant save it. x.fid = 123 x.save() # <-- Nothing changes in db . I even used force_update attribute. user.fid = 123 # User instance. user.save() # <-- it works.

Categories : Python

django social auth , create user model with email as primary key
Well I am doing facebook login for my ios app. What I am doing is Login to facebook from my app and get the facebook access token Send the facebook email and access token to the django backend Then what I do is, instead of using the django default authenticate method which takes the username and password to authenticate a user, I overwrite my own authenticate method. Doing this is really easy just read Django Custom Authentication In my custom authentication class I verify the email-token pair sent from the front using fb sdk for python and that is it. After than I can login the user using the django in built login

Categories : Python

Kendo UI Grid: Configuration of the DataSource with Context Model
It looks like your code is similar to the example for the Kendo Grid at http://demos.kendoui.com/web/grid/index.html I would start by setting up a ViewModel class for Company that would hold all of your columns for the grid similar to how they have a ProductViewModel in their example. For instance, you would have the following in your ViewModel: Name, DateCreated, Quarter, Code, Enabled If you navigate to ASP.NET MVC > IndexController.cs you'll see where they've defined their method: public ActionResult Products_Read([DataSourceRequest] DataSourceRequest request) From there you'll see that they wrapped their LINQ results into their ViewModels and returned them in JSON format. You're on the right track for setting up the DataSource for your grid. As far as the Controller goes, y

Categories : Linq

django-social-auth with custom user model and overridden save() method
In order to solve the problem I created a custom "pipeline" (com.mysite.apps.users.social_auth.pipeline.addFacebookDetails) in which I add the necessary data to the user model only during its creation: in settings.py: SOCIAL_AUTH_PIPELINE = ( 'social_auth.backends.pipeline.social.social_auth_user', 'social_auth.backends.pipeline.user.get_username', 'social_auth.backends.pipeline.user.create_user', 'com.mysite.apps.users.social_auth.pipeline.addFacebookDetails', 'social_auth.backends.pipeline.social.associate_user', 'social_auth.backends.pipeline.user.update_user_details', ) in com.mysite.apps.users.social_auth.pipeline.addFacebookDetails.py: def addFacebookDetails(*args, **kwargs): if kwargs['is_new']: user = kwargs['user'] user.field1 = 'fo

Categories : Django

Provisioning Profiles in Xcode - can't shift this error
Ahh the joys of codesign -- it has tripped up many developers trying to get build configuration setup. This too is a mismatch between a few different settings in Xcode and potentially your App Store Distribution Profile. There are three places that you have to make sure are set identically to ensure this error clears, each of which is tied to the AppID. I answered a similar question relating to a Development Certificate and Provisioning Profile, however the same set of checks is required for your App Store distribution certificates and provisioning profile: A valid provisioning profile matching the application's identifier could not be found That question includes some additional information about where particular settings are located, and the process by which one would go through to

Categories : Xcode

Entity Framework model first error on mapping table
I suggest to use the fluent api for mapping because of naming convention sometimes is not suit the requests. Following code should be work as you desired; protected override void OnModelCreating (DbModelBuilder modelBuilder) { modelBuilder.Entity<Student>() .HasMany(t => t.Subject) .WithMany(t => t.Student) .Map(m => { m.ToTable("StudentSubjects"); m.MapLeftKey("StudentId"); m.MapRightKey("InstructorID"); }); }

Categories : Entity Framework

Is it possible to create model of a table from a given table of database in django model
I don't think you can tell inspectdb to generate code only for a certain table. You can just use inspectdb for all tables, and then only use the code generated for the table you want. The modelname usually is the CamelCased version of your underscored_table_name.

Categories : Django

xcodebuild code sign error provisioning profile even though all profiles are in correct folder
Look for provision profile id in the profilename.mobileprovision file. Open the file and search for UUID to find this, it will be in XXX-XXX-XXXX format. Pass this as the value of PROVISIONING_PROFILE in xcodebuild command sudo xcodebuild -configuration Debug PROVISIONING_PROFILE=<Provisioning Profile Id>

Categories : IOS

Lightswitch with WCF RIA Services datasource - Query operation [operation name] could not be found on the service
It turns out I was indeed doing something very wrong...the md_SKURevMngtRRPPhantom object that I was returning, was an object defined in the Lightswitch project's DataSource that I was adding a property to by creating a partial class of it in my DomainService project. Seems this was a bad idea. I changed the DomainService project to return a newly-defined class instead of a the md_SKURevMngtRRPPhantom class, and all worked fine.

Categories : Misc

Database error: no such table: auth_user. Extending AbstractUser and using model to register on admin
So deleted all the work I had done with this and moved on with the standard user so that I could make progress. Then one day I went back to it and managed to get it working in an hour. I'll post the code for reference but I can't really pin point what made the difference. I do know that the creation forms and stuff were not necessary. models.py class PropaUser(AbstractUser): uuid = UUIDField(auto=True) admin.py from django.contrib import admin from login.models import PropaUser admin.site.register(PropaUser) settings.py AUTH_USER_MODEL = "login.PropaUser" other models.py class Word(models.Model): user = models.ManyToManyField(settings.AUTH_USER_MODEL) deck = models.ManyToManyField(Deck) word = models.CharField(max_length=100) def __unicode__(self): # Pyt

Categories : Django

In social networking getting W3c error
I got the answer of My Question for that i need to set <!DOCTYPE HTML> <!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml"> %%Panel.HTMLHead%% <body> Now all the the error are solve it just because of the page DOCTYPE is not HTML 5 **data-buttons data-style data-counter data-hover data-promo-callout** This all attribute support in HTML5. I got this after long research. I hope this will also help to other.

Categories : Javascript

How to register wso2 datasource defined in custom-datasource.xml in jndi
The useDataSourceFactory should be set as an attribute of jndiConfig element. So your datasource configuration should shange as follows. <datasource> <name>IPL_DS_IDB</name> <description>My custom datasource</description> <jndiConfig useDataSourceFactory="true"> <name>IPL_DS_DB</name> <environment> <property name="java.naming.factory.initial">com.sun.jndi.rmi.registry.RegistryContextFactory</property> <property name="java.naming.provider.url">rmi://localhost:10002</property> </environment> </jndiConfig> <definition type="RDBMS"> <configuration> <url&g

Categories : Wso2

GridView with both declarative (Html side) datasource and code-behind datasource
It is possible only under one condition.That you set the DataSourceID to nothing of your gridview before re-assigning its datasource to a datatable.Otherwise visual Studio will scream loudly at you in these lines 'Both DataSource and DataSourceID are defined on 'yourGrid'. Remove one definition.' yourgrid.DataSourceID=null; yourGrid.DataSource=yourDataTable;

Categories : Asp Net

cocoa, table view with core data datasource
You put the fetch code at that location of your program at which fetching is useful. You store the data in a way that is convenient for you, probably a property typed array in your controller. After fetching the data, you tell the table view, that there is new data to display by sending a reloadData (et al.) message to it. The data source of the table view, probably your controller will receive messages defined within the data source protocol to transport the date into the view. Since this is code written by you, too, it is totally under your controller, how you get the data. (See step 2).

Categories : Objective C

How to Ommit DataGridViewRow from DataSource Based on Another Table's Data
You could iterate through the datatable and remove the one you have selected and redraw the datagridview. Not another SQL call just using the datatable you already have. You can reinsert the row if you want, when done, or just use that same beginning datatable to refresh the DGV. For example if the open bill was id 1287: Dim dtTemp As DataTable = dtOpenBills.Clone() For Each dr As DataRow in dtOpenBills.Rows If Cint(dr("OpenBillID")) <> 1287 Then Dim drTemp As DataRow = dtTemp.NewRow() drTemp = dr dtTemp.Rows.Add(drTemp) End If Next DataGridViewName.DataSource = dtTemp DataGridViewName.Refresh() 'Might not be needed You haven't touched the original datatable.

Categories : SQL

Can you use Kendo UI's dataSource to get data straight from a database or C# dataSource?
Yes. It can bind to pretty much any source of json, so you have a lot of options. In WebForms, a good one is WebMethods. You could add a WebMethod to your form and then bind the DataSource to it. Or you could also create a web service, or build an aspx that renders json or xml instead of html (make sure you set the content-type!), or even call a static file that contains json. I would start with reading this overview of the DataSource: http://docs.kendoui.com/getting-started/framework/datasource/overview

Categories : C#

Putting image in DataTable and setting table as datasource to gridview
I'm not aware of a method for natively rendering image files (including BMP) in a GridView. In your case, what I'd do is save that bitmap in a local file in the virtual directory. Once you have the file name, you can bind that filename to an ImageField column in the GridView.

Categories : C#

iOS: Update table view datasource with animations without core data
Take a look at TLIndexPathTools. It is an alternative to NSFetchedResultsController that, in addition to working with NSFetchRequest and Core Data objects, also works with plain arrays containing any type of data. It provides a standardized data model class TLIndexPathDataModel that can automatically organize your data into sections and has many APIs to simplify the implementation of your data source and delegate methods. But the main thing it does is automatically calculate and perform the animated batch updates for you when you update the data model. Try running the numerous sample projects to get an idea what can be done. The Shuffle sample project is a good starting point: tap the Shuffle button and the collection view grid randomly rearranges itself with animation. Here is the full

Categories : IOS

403 error while posting to Sharepoint REST social API
In your application, you need to go into the AppManifest, go to the permissions, and give it permission to the "User Profiles (Social)" with at least Read permission. This will allow your application to have access to the elements that it looks like you're trying to hit. http://msdn.microsoft.com/en-us/library/jj163864.aspx

Categories : Javascript

django-allauth social network error
You mention that visitting http://127.0.0.1:8000/accounts/socialnetwork/login/ (where I assume socialnetwork is one of google/twitter/facebook) works fine. Congratulations! -- because these are the proper entry points for logging in with a third party provider. You should not be visitting the callback url directly yourself. It is meant to be redirected to by the third party provider. In doing so, it passes along authentication related codes that can be used to login. If you visit the url directly these codes are not passed, hence, the system will complain with "an error has occurred"... As for the issue with respect to the social connections url: what you see here is all third party accounts connected to the local user account. So, if it varies from time to time I can only assume you are

Categories : Django

'invalid for creating a default constraint' error when trying to add a constraint to an existing table
As far as I'm aware there are two possible circumstances that might cause this error. Attempting to add a default constraint to: A computed column. A column that doesn't exist at all! For the table definition CREATE TABLE dbo.Register ( ID INT IDENTITY(1, 1) NOT NULL, Computed AS 'Foo' ) Both of the following statements fail with error 1752. ALTER TABLE dbo.Register ADD CONSTRAINT C1 DEFAULT 'X' FOR Computed ALTER TABLE [dbo].[Register] ADD CONSTRAINT [Register_StartDate] DEFAULT (GETDATE()) FOR StartDate There are various other conditions on which it is not permissible to add a default constraint to a column but these all have their own unique error numbers and messages. +------------------------------------+--------------+ | Reason

Categories : SQL



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