FAQ Database Discussion Community


How to set size of colour in grid view and change it's shape to round

java,android,gridview,view,android-arrayadapter
package com.example.dhavalpatel.atira; import android.content.Intent; import android.graphics.Color; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.GridLayout; import android.widget.GridView; import android.widget.TableLayout; import android.widget.Toast; public class second extends ActionBarActivity...

Calendar View Or DatePicker always returning wrong month Android

android,view,calendar
Good Day guys.Im implemented first the date picker.Day and year was ok,but i noticed that date picker always returning INT of month wrong(always 1 month less) for example if todays month is MAY it counts like 5th of the year,date picker always returning 4 and so on.I though its issue...

Is it possible to index views in Apache Solr

sql,view,solr
Let me first give you an example. I have two tables -table1 and table2. table1 has a field id_table2, which is a foreign key and references one of the fields in table2. So, when I want to scan table1, I make a query like: SELECT t1.attr_1_, t1.attr_2_, t2.attr_3_ FROM table1...

Filter Field in List by boolean value in MVC

c#,asp.net-mvc,linq,view
I had help filtering a Foreach loop in my view and I figured I would use that reasoning to now filter a field using the same logic. I need this field to show the last TicketNoteDate that has a PublicFlag == true. The code compiles but it crashes when I...

addOnLayoutChangeListener vs addOnGlobalLayoutListener vs post(Runnable r)

android,layout,view,measure
PROBLEM: Suppose we have simple case: we have view and we have to show some data on this view. We use static method showData(View view) to do this. I want to know the exact moment when view layout is measured and I can access getWidth() getHeight() and be sure that...

django rest framework - adding to views.obtain_auth_token

view,override,django-rest-framework,http-token-authentication
I have implemented Token Authentication with django rest framework and I can post username and password to /api-token-auth/ and get the token. url(r'^api-token-auth/', token_views.obtain_auth_token) In addition to the token, I want to get the User object related to the returned token. How can I override/add to this view and also...

How to get the whole bitmap of all views below?

android,view
I have a view which has some transparent area. Through the transparent area , I can see the view below it, now I want the view I see trough transparent area become blur. I have found some code to make a bitmap blur but how can I get the bitmap...

Include after ob_start(), nothing happen

php,model-view-controller,view,render
I'm trying to render my views with a function. But if start ob_clean(), all code after doesn't affect something. If i include before ob_clean() I see the template. public function render($template, $data = array()) { if (!empty($data)) { extract($data); } $templatePath = TEMPLATE_DIR . $template . '.tpl'; ob_start(); if (!is_file($templatePath))...

Android - Creating Views dynamically does not work as expected

java,android,json,view
I am developing an android application in which I am creating views like RadioButton,CheckBox,EditText dynamically based on json response and adding to LinearLayout using Java programmatically. In micromax A114 , I got the result as expected! . But when I tested with Samsung note edge it gets collapsed and does...

Android get convertView from BaseExpandableListAdapter

android,view,expandablelistview,expandablelistadapter
I need to call the BaseExpandableListAdapter method @Override public View getChildView(int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) or something like that to get the view that the method returns. The problem is, if I call that method, I have to pass null to convertView, which will...

One row of list view is updating, but duplicate row is also inserted

c#,windows,forms,list,view
Hello folks I am trying to update the quantity of a product that is being ordered. If the product already exists in the users 'basket' instead of inserting a new row, the quantity in the row with the existing item should be updated. It is updating but a new row...

Best practice of showing gif in Android

android,performance,view,gif,animated-gif
I tried to load a list of gifs and displays them on listview. Currently, I display each gif into a webview but it's very slow and looks ugly. I did some researches today but nothing could help me. Do you guys have any great idea that showing gifs smoothly? BTW,...

How can I get the object value of a combobox in django view?

django,view,combobox
I am creating an app in django and to do that I have a form where the field 'Person' is a ForeignKey field. So, when I run the application it appears a form correctly showing me a combobox that lets me select the 'Person' object that I want. But the...

calling the parent controller function in Ext.Ajax.request

extjs,view,controller,scope
I have a login Page which authenticates the user.On correct username and password it should hide the loginview and display the next view.When I call the function to do the same it gives an error saying "Uncaught TypeError: this.functionname is not a function.Here is my code for the same: startMain...

SQL Join Views - Duplicate Field

sql-server,tsql,join,view,alias
I am trying to join two views, I have tried to alias the cAuditNumber field under StkSalesUpdated view to AuditNumber1, but I still get the following message: Msg 4506, Level 16, State 1, Procedure KFF_Sales_Data_Updated, Line 3 Column names in each view or function must be unique. Column name 'cAuditNumber'...

Running SQL Server 2012 Express Scalar Function in View

sql,function,view,user-defined-functions,sql-server-2012-express
My SQL guru is in Costa Rica for the week and have a problem I don't know how to solve. I have four simple tables and one function. For simplicity sake I'll remove any fields not required to understand what I need. Table1: PRIMARY_ITEM_ID, INVENTORY_ITEM_ID Table2: Table2ID, INVENTORY_ITEM_ID, Table3ID Table3:...

grails, pass data from controller to generated _form.gsp view

grails,view,controller,gorm
I got a domain class (Booking) with a User property (using SpringSecurityCore Plugin) and the corresponding views (_form, create, edit, index, show.gsp). A normal user should not be able to set the user the normal way: <g:select id="user" name="user.id" from="${usermanagement.User.list()}" optionKey="id" required="" value="${dailyBookingInstance?.user?.id}" class="many-to-one"/> With this every user can select...

Cast and instance of in scala view template in playFramework

java,scala,templates,view,playframework
I am looping over collection of Person in scala view in PlayFramework2.2.6. Person class is superclass for classes User,Contact. While looping I would like to access some parameters specified for extending classes like email attribute in User class. Here is model's classes: public class Person { int id; String name;...

Hot to set weight for width and height?

android,view,height,width,android-layout-weight
I need to create view dynamical with width and height which are the percent of parent size.So I need to add weight for width and height for one view. Is it possible?

Android view's getTop(), getLeft(), getX(), getY(), getWidth(), getHeight() methods

android,view,layoutparams
I am writing a drag and drop application and got really confused because of some parameters. Please help to figure out. First of all, I read the documentation for the View class and got the following explanations. getX() : The visual x position of this view, in pixels. getY() :...

How can I destroy and redraw a view without refreshing the entire page?

javascript,jquery,html,backbone.js,view
I am using backbone.js to create a page. My code contains many models and views. I wonder if it is possible to destroy a view and then redraw it without refreshing the page, and if so, what is the best way to do it. $(document).ready(function() { var myHomeCollectionView = new...

Why is this page displaying the shared view corruptly?

c#,asp.net-mvc,view,shared
I am creating an MVC web application. I downloaded a free template online and it seems to be working fine. The home page renders perfectly, and so does the another page I have created. Home Page: I have another view(and controller) created called game. When I navigate to this page...

CustomView android for more objects

java,android,object,view,android-custom-view
So, I want to make something like this: from my online database I get x,y coordinates, height and width of the object, image for my object. I want to make custom view so I can place all those objects to right places so that those objects are same on all...

Displaying a table's row in a div element using AngularJS

javascript,angularjs,service,view,controller
I have a database table with many rows, each with 5 fields each. I then have a <div> element that I'd like to display one row's fields in. What is the best way to retrieve a row from my table and have a div display the row's fields? Currently I...

Center multiple UILabels on a line

ios,swift,view,uilabel,center
I want to horizontally center multiple UILabels - as a group - on a line in Interface Builder. One the straight view controller i could not figure out how to do this. I read comments about place the UILabels in a View and then centering the view in the view...

Change variable sent to view Laravel

php,laravel,view,laravel-5,blade
in __construct() in my controller I sent some data to my view by: public function __construct(){ // code View::share('messages',$messages); // more code } In other method I want to change this value (action from user change it). I don't want to copy this part of code to every method in...

Can't set view params to WRAP_CONTENT programatically

android,view
I am trying to set a custom view to wrap_content in both height and width programatically. The problem is that no matter what i do it is always presented as match_parent. This is the view public class Circle extends View { public Circle(Context context) { super(context); } public Circle(Context context,...

sql create a view combining two tables

mysql,view
Table 1 id DATE column1 column2 . Table 2 id DATE column1 column2 The output I want is: DATE {column1 from Table 1} {column2 from Table 2} Obviously the DATE column is common for the two tables, the data from column1 & column2 differs I tried with create view and...

SQL : Create view using multiple tables and a cursor

sql,view
I have two tables : 'pc' and 'results'. the table 'results' contains so many results of every pc. I need to create view that contains all pc columns and the last result of every pc. I'v tried this but it didn't work. select * from pc,resultat where pc.code_pc=result.code_pc order by...

Html.Action not work

c#,linq,asp.net-mvc-4,view
i want to bring the partial view of question link list to my edit view. However, when i select the groupby value, it shows the error below. Please guide me. The model item passed into the dictionary is of type 'System.Collections.Generic.List1[<>f__AnonymousType42[SurveyTool.Models.SURV_Question_Ext_Model,SurveyTool.Models.SURV_Question_Model]]', but this dictionary requires a model item of type...

how to find tables used in a view on sybase

sql,view,sybase,sybase-ase
Am relatively new to sybase ASE and trying to find the tables used in a view kindly help me

FatFree pass array to a view using Jig data mapper

view,render,fat-free-framework
I have data/faqs.json like this. { "section-1" : { "sub-section-1" : { "557aef62e0629": { "question": "how are you?", "answer": "fine.. you?" }, "557af3d40b041": { "question": "Question", "answer": "Answer to question" } }, "sub-section-2": { "557af3d80b041": { "question": "another section question?", "answer": "another section answer?" } } }, "section-2" : {...

Breadcrumb looking Tabstrip for navigation

android,view,navigation
I'm trying to find out how to create this: https://365webresources.com/wp-content/uploads/2013/10/Creating-A-Flat-Style-Breadcrumb-With-Pure-CSS3.jpg My Question: Where do I start with this? I'm not really sure where to begin as searching Google for 2 hours has gotten me nowhere. So far I've come across the following: FragmentBreadcrumbsand ViewPagerbut neither seem to have the design...

Show Static text in Menu bar

html,asp.net-mvc,view
I want to show a Users name in the menu bar after they log in. Currently it is showing up but it is aligned to the top and faded (compared to the rest). Here is my html for it: <ul class="nav navbar-nav navbar-right"> @if (Session["LoggedUserID"] != null) { <li> @Html.DisplayName(Session["LoggedUserFullName"].ToString())...

How to check weather the indirect child exists in View or not?

android,android-layout,view
Here is my layout. <LinearLayout android:id="@+id/lyt_linearNative" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:visibility="gone" > <LinearLayout android:id="@+id/lyt_tp1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <ImageView android:id="@+id/vmax_iv_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/bee7_btn_close" />...

Optimization of view with union / cross join

sql,sql-server-2008,view,union,cross-join
I would like to ask about one specific view I have and potential optimization. Seems like quite a casual tables setup - Customers (~50.000 rows) and Users (~250 rows), while most users can access all the customers (infact, there is a different permission level on customers geographical location, but it...

Managing user login segues in swift iOS

ios,iphone,swift,view
I am trying to build an initial user login system for an iPhone app. I have created an API which holds all the user data. I have successfully made a HTTP connection from my swift code to my API, where I sent the users login details the API authenticates the...

Radius around touched position

java,android,math,view,touch
I have a ArrayList of X & Y coordinates which are located in a View. Now I want to check if the user touches the view, if some of the stored X & Y coordinates are in a certain radius (Like 20 Pixel) around the touched point. How would I...

Android popup like IOS

android,view,popup
I need to implement popup dialog like in iOS, and show above some view (map point in this case), but don't know how to implement it. Screenshot attached. Will be glad any proposals.

Spring MVC: How do I forward to a specifc page after a successful Login?

spring-mvc,view
New to Spring MVC, I am trying to forward to a specific page of my application after I login. How do I do so? Is it using the WebSecurityConfigurerAdapter? ...

Android - draw9patch should help me? background of textview

android,view,background,textview,imageview
I need to set background of the TextView without stretching like this: I tried draw9patch but seems that it doesn't do that work. How can I reach this efect? I could also use ImageView, but I don't know how I can add text in ImageView (I cannot use layout or...

how to change the scale of view

ios,swift,view,scale
I am trying to make sidebar menu like in app Euro Sport! When the menu slides from left , the sourceviewcontroller slide to left and becomes smaller. var percentWidthOfContainer = containerView.frame.width * 0.2 // this is 20 percent of width var widthOfMenu = containerView.frame.width - percentWidthOfContainer bottomView.transform = self.offStage(widthOfMenu) bottomView.frame.origin.y...

Qt Model and View - Link data from model to view, how?

qt,view,model,signals,slots
I'm pretty new to the Model and View concept and I'm having trouble finding the right way to do this. So in my understanding the concept means, that I have one class that handles all the view (GUI) parts and an other class which handles the data processing. The GUI...

How do I control the camera in PyOpenGL using a mouse?

python,opengl,view,mouse,pyopengl
We need to make a 3D game in python so in my research I discovered PyOpenGL. After a bit of playing around with I became stumped on how to move the camera around. Give me some sample code and an explanation.

The best (or the proper) way to reuse action at any route? [Laravel 4.2]

php,laravel,view,laravel-4,controller
I'm just learning some Laravel 4.2 with a book I got recently (mainly the reason I learn 4.2 first, not 5). But now I'm kinda unsure. Let's say I have a Blog application. There will always be a sidebar with list of categories (all in DB). What is the best...

How does a form field in the view become associated with an object in the model?

c#,asp.net-mvc,view,model
This is a two part question. First, I understand that if use this in my Model: [Required(ErrorMessageResourceType = typeof(Resources.CustomerSatisfactionSurvey), ErrorMessageResourceName = "Page1Question1Required")] public int? LikelyToReturn { get; set; } And then this in my View: @for (var c = 0; c < 11; c++) { @Html.RadioButtonFor(model => Model.LikelyToReturn, @c) }...

How to call method with View Parameter in Android Studio

java,android,methods,view,android-actionbar
How can i call this method Calculate() from the menu in the actionbar? The application objective is to calculate the following formula: A = (2X + F) / (X - 2F) Here is my java code { private EditText txtX; private EditText txtF; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...

Android Create View of Display

java,android,view
I am trying to create a View of the current display so I can call the following methods to create a Bitmap: v1.setDrawingCacheEnabled(true); current = Bitmap.createBitmap(v1.getDrawingCache(), 1686, 136, (631-168), (343-136)); v1.setDrawingCacheEnabled(false); To create the View I tried this line View v1 = mCurrentUrlMask.getRootView(); I got the error "Symbol 'mCurrentUrlMask' cannot...

Ondraw method not calling in custom view

android,view,custom-view,viewgroup
I am making custom view using custom ViewGroup and custom View in Android. public class Custom_ViewGroup extends ViewGroup { public Custom_ViewGroup(Context context) { super(context); addView(new OwnView(context)); } public Custom_ViewGroup(Context context,AttributeSet attrs) { super(context, attrs); addView(new OwnView(context)); } @Override protected void onLayout(boolean changed, int l, int t, int r, int b)...

Android Get selected item on click listeners

android,listview,view,onclicklistener
Goys I use the following for an on click listener lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { TextView textview1 = (TextView) findViewById(R.id.textView1); TextView textview2 = (TextView) findViewById(R.id.Sr2); TextView textview3 = (TextView) findViewById(R.id.Sr3); TextView textview4 = (TextView) findViewById(R.id.Sr4); TextView textview5 = (TextView) findViewById(R.id.Sr5);...

Embjers store.createRecord or store.push not updating view

ember.js,view,ember-data,push
I'm trying to create a new record and push it into the store. I can persist it just fine (and i'll push to the store after successfully persisting, once i figure this out), but the view/template isn't being refreshed. I know persistence works because, if I refresh the entire page,...

Add element in an inherited view (Odoo 8)

xml,view,odoo,odoo-8
I would like to add an element (a button) in an inherited view but we can't add element which are not in the parent view. <record model="ir.ui.view" id="view_bill_clients_form"> <field name="name">bills.clients.form</field> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form"/> <field name="arch" type="xml"> <field name="name" /> <!--<button name="account.action_invoice_tree" type="object" string="Generer" class="oe_highlight" />-->...

SQL Change View Name / Joins

sql,sql-server,tsql,view
I am trying to join two views I created, however I am joining them using their common field (cAuditNumber). The issue is, once I have done the joins, it will not let me create the view as it cannot have the field name cAuditNumber twice. Is the cAuditNumber the PK...

“Undefined variable” error, when rendering data in a view

php,view,yii2
I want to render static array in _form.php view, using actionCreate method in Yii2. Here is my code: if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { $data = array('1'=>'AA','2'=>'BB'); return $this->render('create', [ 'model' => $model, 'data' => $data , ]); } When I try to...

Pass an id and get it from actionLink to view page

asp.net-mvc,view,controller,html.actionlink
I have this ActionLink into view named catalog @Html.ActionLink("Formations", "Index", "Formation", new { id = item.Id },null) and I want to get the list of formations of this catalog id. How can I do this ? In my database I have two tables : Catalog:idC (PK),NameC,Date Formation:idF(PK),idC(FK),NameF. ...

Laravel 5 No query results for model redirect page

laravel,view,eloquent
I have simple form that post values to a controller,everything works fine if a result is returned from the controller , but if there is no result I get error the following error: No query results for model Which works as it should. My question is : Is it possible...

How to reuse a MVC partial view from Module A in Module B in Orchard Modules?

asp.net-mvc,view,module,orchardcms
I want to reuse a partial view from Module A by writing @Html.Partial("~/Modules/ModuleA/Views/Shared/TaskBox") in a view from Module B but the view is not found. Is that even possible?...

ImageView setBackgroundRessource not update even with inflate

android,gridview,view,timer,adapter
I'm trying to update an imageView from a gridview with a border, for doing this I have this xml file which works : <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="#158CDB" /> </shape> </item> <item android:left="3dp" android:right="3dp" android:top="3dp" android:bottom="3dp"> <shape android:shape="rectangle"> <solid android:color="#FFFFFF" /> </shape>...

Qt5: How to replace numeric values of a column of a SQL table view with text aliases?

sql,qt,table,view,alias
I am using Qt5. I managed to connect to a sql database and using QtCreator I have now a QTableView that is nicely populated using "SELECT * ..." from a test table I previously defined with MS SQL Manager... Only one thing I would like to change: ...One column named...

Can't get the right view in a list by view.getTag()

android,listview,android-listview,view
I have a custom card list view.. the view contains an imageView and three buttons.. What i want to do is when i click on a button i want to set the image of the card that holds that button in imageView object.. What happens is that setSelectedimage() sets the...

If I modify a column type, do I need to replace the corresponding view?

mysql,sql,view
Say I have the table : CREATE TABLE `table` ( `IDTable` INTEGER PRIMARY KEY AUTO_INCREMENT, `date` LONG ); with view: CREATE OR REPLACE VIEW `ViewTable` AS SELECT `table`.`IDTable` , `table`.`date` FROM `table`; If I eventually modify the column date from long to datetime, do I then need to rerun the...

How to contribute a context menu to a custom view in an eclipse plug-in project?

eclipse,debugging,view,eclipse-plugin,popup
In an eclipse plug-in project, I contributed a view named Favorites with id com.qualityeclipse.favorites.views.FavoritesView. Then I want to contribute a context menu to the Favorites view by using popup:com.qualityeclipse.favorites.views.FavoritesView?after=additions. However, no context menu shows up upon a right-click within the Favorites view. I changed it to popup:org.eclipse.ui.popup.any?after=additions for test. This...

Enumerated list of child class not working

c#,asp.net-mvc,view,icollection
I am creating a webpage for a help desk software where the top shows the information from the ticket class and then the bottom for the ticketNotes that are attached to the ticket class through an ICollection. Currently if I comment out the bottom, the top portion (the static table)...

Getting grails view as string?

grails,view,grails-controller
Can I get grails view as string in grails ? I have one view on location "/template/product.gsp" inside view folder. I can render it using render (view: "/template/product", model: [product: Product.get(1)]) It's working without any problem, But what I need is to get the rendering content as string. Because I...

How to rotate text with view using OpenLayers 3

text,view,rotation,openlayers,openlayers-3
I am developing a navigation application, which draws planned route on a map. Planned route consists of points connected with a line. Each point is labelled with distance and direction. When I initially draw the route on the map, I calculate text position in a way, where it doesn't interfere...

Reload controllers after scope change (AngularJS)

javascript,angularjs,view,routes,scope
so I have this controller for swapping languages app.controller("langCtrl",['$scope','$route',function($scope,$route){ this.swap_lang = function(){ if(lang == "tr"){ lang = "en"; }else{ lang = "tr"; } console.log(lang); this.lang = lang; //$route.reload(); //$scope.$apply(); }; }]); And this one below is supposed to be responsible for bringing up menus (JSON files with short language codes)...

Make dynamically generate table stay in form when not enough item in row

html,asp.net-mvc,razor,view,foreach
I am working with asp.net MVC. I have dynamically generate table with 5 items in a row on my view. But I have a problem when model have not enough 5 items, items width will increase to fill in row like below: | x | x | x | x...

Adapter first position = 6th position?

android,listview,view,adapter
I've a problem that should not be weird but I don't know . I had not used Holder in a first time but my last item was the same as the first , with a Holder my last item is ok but not its layout . I have an ArrayList...

Getting response but view is not updating - AngularJS

angularjs,rest,view,binding
I am trying to get the response from a url and populate in the view, but I am do not see the view getting updated. Help me to resolve this issue. Thanks Source <!DOCTYPE html> <html ng-app="myModule"> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script> </head> <body ng-init="priceList='promo03'"> <div ng-controller="PricingController" > <div ng-repeat="item in finalList...

How to know the View Elements after loading a layout?

android,android-layout,view,layout-inflater
I am trying to write code , where after loading the Layout , i want to know which are the view elements are related to the layout like TextView, EditText , Checkbox etc. MyCode : MainActivity.java package com.example.myview; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.view.LayoutInflater;...

Filter array field in couchbase

android,view,filter,mapreduce,couchbase
I m working on couchbase lite android. I have series of documents, every document contains a field which it's value is array of string. now I want to filter value of this field. { type : "customer", name: "customerX", states: [ "IL" , "IO" , "NY" , "CA" ] },...

Replacing a TextView with the updated TextView Android

android,view
I am dynamically adding a TextView in an activity layout. the activity gets values from another activity using startActivityForResult and then creates a textView dynamically and add particular value to it. but the problem is that there is an update button to the same activity when I again get the...

ParameterMissing param is missing or the value is empty

ruby-on-rails,ruby-on-rails-4,view,controller,parameter-passing
i have the following situation: I have a controller for admins , that i use to manage the users (model generated by Devise). So, i use the actions of another controller to manage the resources "users". Here my files: admins_controller.rb before_action :set_user, only: [:show, :edit, :update, :destroy] def update respond_to...

MPAndroidChart - issues with setVisibleYRange, does not work for setting higher values

android,view,charts,mpandroidchart
Working with MPandroiChart i have encounterd a problem, i am adding dynamical data and am trying to have the chart fit the highest data at all times, using "setVisibleYRange()" seems to work fine when i need to narrow down the view but does not seem to work when i need...

Custom Widget in Yii

php,yii,view,widget
I create new widget like this: class MyMenu extends CWidget { public function init() { } public function run() { $Items = array( array('label'=>'Home', 'url'=>array('/site/index')), array('label'=>'Add User', 'url'=>array('/user/register')), array('label'=>'View Users', 'url'=>array('/user/index')), array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest), array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'),...

odoo v8 - Field(s) `arch` failed against a constraint: Invalid view definition

python,xml,view,odoo,add-on
I want to create a new view with a DB-view. When I try to install my app, DB-view was created then I get error: 2015-06-22 12:59:10,574 11988 ERROR odoo openerp.addons.base.ir.ir_ui_view: Das Feld `datum` existiert nicht Fehler Kontext: Ansicht `overview.tree.view` [view_id: 1532, xml_id: k. A., model: net.time.overview, parent_id: k. A.] 2015-06-22...

Sails.js : use i18n in my controller

node.js,view,controller,internationalization,sails.js
In my controller I want to send a message in my view like that : res.status(400).view('memberRegisterView',{error : "error"}); And I want to translate this error in french and have "erreur". I edited i18n.js : locales: ['en', 'fr'], defaultLocale: 'fr' In my en.json : "error":"error" In my fr.json : "error":"erreur" How...

How to create layout that use header and footer partials

php,layout,view,yii2
I have red the guide about views and layouts, I have googled how to to this, but I still can not make it work. Here is the problem: I want to have 2column.php and 3column.php layouts, where both are using _header.php and _footer.php partials. 2columns.php layout example: render _header.php $content...

Cannot get list for dropdownfor (to edit model)

c#,asp.net-mvc,view,selectlist
I am creating a form to post edits back to the controller and have a few drop downs in the controller. I have tried two different ways that are not working in the view. This is what I tried first: @Html.DropDownList("TechnicianId", null, htmlAttributes: new { @class = "form-control" }) Now...

Edit ViewGroup outside onCreate

java,android,view
I create a ViewGroup programatically. Then I add two Views, a game and a SeekBar. However, if I try to change the SeekBar properties from within the game (which has a pointer to the AndroidAdapter) using, for example, parent.seekBar.setVisibility(View.VISIBLE) the app crashes. The parent filed is set as follows, inside...

How to format the values of a model in Marionette Backbone View before rendering?

view,formatting,typescript,rendering,marionette
If you implement the onBeforeRender method the is no way to access the model values in order to format them temporarily Ideally you would want to format the values just before rendering without changing the model values of course! How to do it?...

findOrFail laravel 5 function for specific filed

database,laravel,view,eloquent
This is my code: $get_all = Geo_Postal_us::findOrFail($postal); With this query,laravel try to find ID filed in table. I don't have id filed, for primary key i have postal column. So, how to set function to find value in postal column, not to search from id column ? Thanks,...

How to use SELECT inside COUNT in MYSQL

mysql,sql,view,count
I have this view: myVIEW: (id,percent) I want to make another view, wich will be like this: LASTVIEW: (lastID, lastPR, counter) and in "counter", in evrey line I want to have how money id`s have a bigger percent than the percent of this line. so I tried: " CREATE VIEW...

Correctly format included javascript code when rendering

node.js,model-view-controller,express,view
My project listens to a port. Whenever it receives a request, it reads a couple of XML-files and returns certain chunks of Javascript, concatenated. My problem is that the code is HTML-formatted and put inside the header when rendering the .ejs file. It's built using Express and MVC, by the...

Hide only part of text in TextView

android,text,view,hide
Good Day i want to hide some specified or certain part of text in textview!Important: Im not talking about hide the full textview with TextView.setVisibility(View.Gone) I'm not talking about transparent of TEXT in textview!im not talking about hiding full text in textview!So please help me to hide some text. Example:...

Setting % of a background color programmatically

android,view,gradient,background-color
Say I want to color only 64% of the background of a linearlayout. I want to color it from left to right and have it be a solid color. At first I tried using Gradient Drawables because it allowed me to specify the orientation of the color, and the color...but...

Entity Framework code-first: querying a view with no primary key

sql,oracle,entity-framework,view,ef-code-first
Our customer has given the access to views in which there is no primary key is defined. I know Entity Framework needs a primary key for table to identify. But for views not having primary key is it still possible to query. I try to find but always Entity Framework...

How to exclude row data based on equal values in same view?

mysql,view,exclude
Given simple view reports.uid, reports.mail, reports.jobcode, reports.jobcodedescr, reports.regionname, reports.supervisorid, reports.supemail FROM reports_accredit_fscore_allmanagers How can I exclude rows where the uid on a row is not anywhere in the supervisorid list? I have tried several context but I keep getting my entire list. Right now that view has 440 employees and...

Passing parameter from controller to view

c#,asp.net-mvc-4,view,controller,tempdata
I'm working on a C# MVC project and need to pass some data from controller to all views. My task was to save a webpage to a pdf file. there are total of 5 pages so 5 different views, I also have 5 controllers, one for each view. I created...

tableSorter custom date parser doesn't work

javascript,sorting,view,tablesorter
I have the following table sorter configuration: $(function () { $.tablesorter.addParser({ id: "customDate", is: function(s) { //return false; //use the above line if you don't want table sorter to auto detected this parser //else use the below line. //attention: doesn't check for invalid stuff //2009-77-77 77:77:77.0 would also be matched...

CakePHP 3.0 Auth Error Flash Element

php,cakephp,view,cakephp-3.0
I am having no luck trying to change the Flash Element on the AuthError from default to error? I was just trying to see if I can change it, but now its driving me up the wall as I can not seem to change it? This is how I have...

Filter Foreach by boolean value in view

c#,asp.net-mvc,view,foreach
I need to be able to filter by a boolean field in my view for my foreach. Here is the code I tried: @foreach (var item in Model.TicketNotes.Reverse() while (item.PublicFlag==false)) If you remove everything after the while it works (minus the filtering out of course....

Open in same view controller as closed on (swift)

swift,view,controller,save,nsuserdefaults
I am making a simple fact app (In swift) and all the facts are in separate view controllers and when the user closes the app, it all goes to the main page and you have to start from fact 1 again. I want to know how to save what view...

How to access View control's from the ViewModel?

c#,design-patterns,mvvm,view,viewmodel
I've come across the situation, where I need access to the controls in the View from the ViewModel. In order to code a method that adds the selected item from a ComboBox to a list. My question is how do I access the View controls from the ViewModel? Is there...

Refreshing SQL view after adding a default constraint to one of its tables

sql,table,view,refresh
How exactly can I refresh the view after adding a default constraint to one of the tables that makes up the view? I tried to use the sp_refreshview stored procedure but that didn't actually update the view. Here is the code I wrote to update one of columns with a...

Mysql query create a view with join and distinct

mysql,view,distinct
i need some helps with a query that i can create correctly for what i want. i'm explaining all: accounts ( id, name, surname,email, telephone ..) with id p.k. boc (ad,username, port..) with ad p.k . Telephone and Username have the same values in their tables i need to create...

How do I launch the soft keyboard after “Cancel” button is clicked in DialogFragment?

android,view,onclick,android-softkeyboard,android-dialogfragment
Fragment.java file: .... public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.skyfrag_layout, container, false); getDialog().setTitle("Delete skycard"); Button btnCancel = (Button) rootView.findViewById(R.id.btnCancel); btnCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { getDialog().cancel(); } }); ... I tried each of the below in the onClick function but neither...

Swift visual delay in text height change

ios,swift,view,autolayout
I have a main display with a button, and when that button is clicked, it transitions to a second screen. In that second screen, I have a text label with a colored background that changes depending on the size of the screen using auto layout / constraints. I am then...

Rails tagging fail when printing the name of the tag

ruby-on-rails,view,model,tagging
I am busy building a tagging system in RoR. This system I've coded according to: http://tutorials.jumpstartlab.com/projects/blogger.html#i3:-tagging Now when I print out tag.name it works but I also get what looks like the entire tag_list as an object printed out directly next to it. The view render in my browser clarifies...

Alias case statement

sql,stored-procedures,view
I have stored procedure that sometimes return negative number in the ID. (on purpose). In additional, I have a view that shows this table (simple select), but I don't want that '-' will appear in the ID column, I mean, if the number is negative - I want to add...