Hi all,
I have this code. How can I check null values for SingleOrDefault method ??
public static List<ETY.Rol> GetRolesByApplicationAndCompany(this UsuarioContext usuario, int company, int app)
{
List<ETY.Company> lCompanies= usuario.Companies;
var roles = lCompanies.
SingleOrDefault(e ...
I want to populate the contents of a combobox with country names/flags reading from a database table. I want the first item to represent no selection. (The user may not know the country info during first insert) Should I include an item for this in db. Or should I add an item representing the no-select to the array in the code. Which app...
I'm looking for a class like EnumMap, except for enum type values (ie. EnumValueMap<K,V extends Enum<V>>).
http://java.sun.com/javase/6/docs/api/java/util/EnumMap.html
Edit
If I was mapping, say, a few million Objects to 10 enum types, I imagined it would at least be possible to create a more memory-efficient implementation than just ...
I have one frame where one TextCtrl and a button. I would like to enter a value in that TextCTrl and to be displayed in another frame TextCTrl and use that value for computation in that new frame as well. Any idea would be appreciated.
...
Django doesn't support getting foreign key values from list_display or list_filter (e.g foo__bar). I know you can create a module method as a workaround for list_display, but how would I go about to do the same for list_filter? Thanks.
...
Hi all :)
I'm currently writing sort of a download manager and I was asking myself if that was possible:
if($ext == ('zip' || 'png')) { echo "Is it possible ?" }
It returns true everytime, so I guess it's not possible. But do you have an idea about how I could easily do this ? I mean, not with plenty of "if" or "switch"...
Thanks an...
Hi,
I am having a javascript array.
addresses = new Array(document.client.cli_Build.value,
document.client.cli_Address.value,
document.client.cli_City.value,
document.client.cli_State.value,
document.client.cli_Postcode.value,
document.client.cli_Country.value);
document.client.cli_PostalAddress.value = address...
Is there a way to retain values of textfield/textbox when a user submits a form? i only want to retain values with errors or values I specify.
For example i am posting to 10 blogs and 1-9 gets posted succesfully so I only want to retain the value from 10 when a page load after form submission. Can I do that? how?
...
I'm storing multiple numbers in a MySQL cell by using a delimiter (eg "1,5,10") and the TEXT datatype.
How do I perform lookups like this?
SELECT * FROM MyTable WHERE MultiVals CONTAINS "5"
And lastly, is this the preferred approach to store such values? I'm using this like a linker table, to link certain rows to multiple other rows ...
i am planning to use T4 template to generate the config files.
i have a main.tt file with basic settings.
there are different .tt file for each environment which include the main.tt
one thing which i want to achieve is how do i make sure that each environment specific .tt files override the main.tt variables.
i need to do this since i wa...
I need to count the non-empty (by which I mean a string containing at least 1 character) rows grouped by a particular ID. Eg. my data might look like this:
form_id mapping
1 'value_1'
1 ''
1 'value_2'
2 ''
2 NULL
3 'value_3'
and I want to count the non-empty values for each form, so I ...
Here's my RegisterController:
public function saveforminformationAction(){
$request = $this->getRequest();
if($request->isPost()){
//I NEED HELP WITH THE getFormValues() METHOD.
$formResults = $this->getFormValues();
$db = $this->_getParam('db');
$data = array(
...
Hi friends,
Do anyone knows about how many values I can give in a where in clause? I get 25000 values in a where in clause and mysql is unable to execute. Any thoughts? Awaiting for your thoughts
...
I have a table called activities which contains a number of activities for projects (for example 6 activities are related to one project). On projects page, you can see the projects, and I have one column which needs to display the number of activities associated with the project.
So basically, I need a query or PHP calculation that can...
I have a Page in Silverlight which is Navigated from the MainPage.xaml, called OpenPage.xaml, I then want to pass a value back to the MainPage.xaml - this OpenPage.xaml is called using this:
NavigationService.Navigate(new Uri("/OpenPage.xaml", UriKind.Relative));
From the mainpage - this is not a child of the MainPage as the RootVisua...
I have a form with 'selected' values pulled from the database.
Now I want the user to edit the values.
When the data is send I want to show the new values.
When I submit my form I always get the 'green' value?
What am I doing wrong here?
<?php
// pulled from db
$color = "blue";
// update
if (isset($_POST['Submit'])) {
echo "write ...
Hi, I have the following XML
<search ver="3.0">
<loc id="ARBA0009" type="1">Buenos Aires, Argentina</loc>
<loc id="BRXX1283" type="1">Buenos Aires, Brazil</loc>
<loc id="ARDF0127" type="1">Aeroparque Buenos Aires, Argentina</loc>
<loc id="MXJO0669" type="1">Concepcion De Buenos Aires, Mexico</loc>
<loc id="MXPA1785" ...
EDIT AGAIN ... I'm just a dummy and figured it out!
EDIT: So, it looks like if I highlight everything in the target select box and click "Add selected", it submits... How do I correct that behavior in the code below so that you don't have to click the "Add selected" button to get it to work?
I have a form that includes three select box...
Hi, I'm new to wicket and stuck with the following problem:
I have a table with 5 rows. Each row contains 7 cells. Each cell has a unique value. Once a cell is clicked, its unqiue value should be posted to the server.
I would like to register only one ajaxfallbacklink (or similar) on the table and adjust the value of the model to the u...
noob question right here. How do you pass values between 2 different cpp files in the same project? Do you make objects? if yes, how does the other cpp file see it?
some enlightment pls..
EDIT: some clarifications. I'm trying to interface direct input with a program (of which I have the plugins sdk). I'm trying to interface a joystick w...