My datagrid view contains three columns, column types are checkbox, textbox and combobox.
If I check one row, it will load corresponding rows combobox only. How can I do it?
What software (or types of software) can be condsidered as innovative?
What distinctive parameters or features of product can be considered as innovative?
Here is my grammar
grammar simulator;
options {
language = Java;
output = AST;
ASTLabelType=CommonTree;
}
//imaginary tokens
tokens{
SHARED;
LOCALS;
BOOL;
RANGE;
ARRAY;
}
parse
: declaration+
;
declaration
:variables
;
variables
: locals
;
locals
: (bool
| range
| array)
;
bool
:ID 'in' '[' ID ',' ID ']' ('init' ID)? -> ^(BOOL ID ID ID ID?)
;
range
: ID 'in' '[' INT '..' INT ']' ('init' INT)? -> ^(RANGE ID INT INT INT?)
;
array
:ID 'in' 'array' 'of' '[' INT '..' INT ']' ('init' INT)? -> ^(ARRAY ID INT INT INT?)
;
ID
: (('a'..'z' | 'A'..'Z'|'_')('a'..'z' | 'A'..'Z'|'0'..'9'|'_'))*
;
INT
: ('0'..'9')+
;
WHITESPACE
: ('\t' | ' ' | '\r' | '\n' | '\u000C')+ {$channel = HIDDEN;}
;
INPUT
flag in [down, up] init down
pc in [0..7] init 0
CA in array of [0..5] init 0
AST
It is having a small problem. Variables (bool, range or array) can be of two abstract types
1. locals (each object will have it's own variable)
2. shared (think of static in java, same for all object)
Now the requirements are changed. I want the user to input like this
NEW INPUT
domains:
upDown [up,down]
possibleStates [0-7]
booleans [true,false]
locals:
pc in possibleStates init 0
flag in upDown init down
flag1 in upDown init down
map in array of booleans init false
shared:
pcs in possibleStates init 0
flag in upDown init down
flag1 in upDown init down
maps in array of booleans init false
Again, all the variables can be of two types (of any domain sepecified)
1. Local
2. Shared
In Domains:
upDown [up,down]
possibleStates [0-7]
upDown, up, down and possibleStates are of type ID (ID is defined in my above grammar), 0 and 7 are of type INT
Can any body help me how to convert my current grammar to meet new specifications.
I'm doing course 3354 (Implementing System Types and Interfaces in the .NET Framework 2.0) and it is said that for simple classes, with members variables and functions, it is better to use a struct than a class because of overhead.
I have never heard of such a thing, what is the validity of this claim?
I use windows 7. I set the ClassPath like this:
D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\jsf-api.jar;D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\jsf-impl.jar;D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\primefaces-2.2.RC1.jar
And I alse do this:
Window Preferences General Content Types Text JSP Add (xhtml)
But, it doesn't works.
When I use netbeans. I do nothing, but the autocomplete function works well.
Hi friends
I have created custom site column with type text and I included in one of content types. But it is allowing me for 255 characters only. In which way I can extend it, say 1024 characters. I did this before by mentioning somewhere in web.config file but I forgot how i did.
Can anyone please tell me how can I achieve this. Thanks in advance.
Good Day,
In Visual c#, I need a login screen to enter the main form, I created the login screen, with user-name and password. (user-name and password are fields in a stand-alone table in the database) How do I verify what the user types in the text-boxes to that in the database,
I'm a newbie to Visual c#
I could not find a good example on checking text against stored data to learn from...
plz help
Thanks
I want to use selenium test to cover my rails project ! but i just find little documents on selenium test . I want someone to give me some documents for selenium test of all types !like website ,pdf ,text etc. you can sent them to my gmail [email protected] Thank you ,and best regards!
I am creating an external photo gallery using PHP and the Facebook graph API. It pulls thumbnails as well as the large image from albums on our Facebook Fan Page.
Everything works perfect, except I'm only able to retrieve photos that an ADMIN posts to our page. (graph.facebook.com/myalbumid/photos) Is there a way to use graph api to load publicy uploaded photos from fans?
I want to retrieve the pictures from the "Photos from" album, but trying to get the ID for the graph query is not like other albums... it looks like this: http://www.facebook.com/media/set/?set=o.116860675007039
Another note: The only way i've come close to retreiving this data is by using the "feed" option.. ie: graph.facebook.com/pageid/feed
EDIT:
This is about as far as I could get- it works, but has certain issues stated below. Maybe someone could expand on this, or provide a better solution. (Using FB PHP SDK)
<?php
require_once ('config.php');
// get all photos for album
$photos = $facebook->api("/YourID/tagged");
$maxitem =10;
$count = 0;
foreach($photos['data'] as $photo) {
if ($photo['type'] == "photo"):
echo "<img src='{$photo['picture']}' />", "<br />";
endif;
$count+= 1;
if ($count >= "$maxitem") break;
}
?>
Issues with this:
1) The fact that I don't know a method for graph querying specific "types" of Tags, I had to run a conditional statement to display photos.
2) You cannot effectively use the "?limit=#" with this, because as I said the "tagged" query contains all types (photo, video, and status). So if you are going for a photo gallery and wish to avoid running an entire query by using ?limit, you will lose images.
3) The only content that shows up in the "tagged" query is from people that are not Admins of the page. This isn't the end of the world, but I don't understand why Facebook wouldn't allow yourself to be shown in this data as long as you posted it "as yourself" and not as the page.
I have a long signup form and would like to hide a few fields and only show them when a certain input field is populated with text, if the user types some text in this field the other form fields will show.
I have looked at hide and show divs but have some trouble getting form elements hide and show them on a certain trigger ( populating a form with text )
anyone can point me in the right direction on how to implement
such feature in query ? thx in advanche!
I'm using Java's DataInputStream with scala to parse some simple binary file (which is very bad exprerience due to the lack of unsigned types, even in scala, but that's a different story).
However I find myself forced to use mutable data structure, since Java's streams are inherently state preserving entities.
What's a good design to wrap Java's streams with nice functional data structure?
Is it possible to create and manage custom permission types in Jetspeed. In addition to the default - folder, page, link, portlet I would like to add document as a type.
I want to then use the list of permissions of type "document" that a principal has to manage access to documents.
Thanks
The main problem is that I recieve the following message:
"base {System.SystemException} = {"Unable to create a constant value of type 'BokButik1.Models.Book-Author'. Only primitivetypes ('such as Int32, String, and Guid') are supported in this context."}"
based on this LinQ code:
IBookRepository myIBookRepository = new BookRepository();
var allBooks = myIBookRepository.HamtaAllaBocker();
IBok_ForfattareRepository myIBok_ForfattareRepository = new Bok_ForfattareRepository();
var Book-Authors =
myIBok_ForfattareRepository.HamtaAllaBok_ForfattareNummer();
var q =
from booknn in allBooks
join Book-Authornn in Book-Authors on booknn.BookID equals
Book-Authornn.BookID
select new { booknn.title, Book-AuthorID };
How shall I solve this problem to get a class instance that contain with property title and Book-AuthorID?
// Fullmetalboy
I also have tried making some dummy by using "allbooks" relation with Code Samples from the address http://www.hookedonlinq.com/JoinOperator.ashx. Unfortunately, still same problem.
I also have taken account to Int32 due to entity framework http://msdn.microsoft.com/en-us/library/bb896317.aspx. Unfortunatley, still same problem.
Using database with 3 tables and one of them is a many to many relationship. This database is used in relation with entity framework
Book-Author
Book-Author (int)
BookID (int)
Forfattare (int)
Book
BookID (int)
title (string)
etc etc etc
Hello everyone,
I'm working on "describe table" output to show a list of fields and their types, i want my primary keys to be at top of the list..
I think there's no way to sort describe's results using SQL (something like 'order by') rather than sorting it in PHP.
what do you think guys ?
thanks
That is the question? So how big a sin is it not to use this convention when developing a c# project? This convention is widely used in the .NET class library. However, I am not a fan to say the least, not just for asthetic reasons but I don't think it makes any contribution. For example is IPSec an interface of PSec? Is IIOPConnection An interface of IOPConnection, I usually go to the definition to find out anyway.
So would not using this convention cause confusion?
Are there any c# projects or libraries of note that drop this convention?
Do any c# projects that mix conventions, as unfortunately Apache Wicket does?
The Java class libraries have existed without this for many years, I don't feel I have ever struggled to read code without it. Also, should the interface not be the most primitive description? I mean IList<T> as an interface for List<T> in c#, is it not better to have List<T> and LinkedList<T> or ArrayList<T> or even CopyOnWriteArrayList<T>? The classes describe the implementation? I think I get more information here, than I do from List<T> in c#.
Hi,
I have a listbox inside another list box, in inner list box listboxitems height may grow or shrink. My problem is that when the inner items shrink the outer list box doesn't re-render its height. Thus - stays with the previous height before the inner list shrinked.
I have tried so many things here, among Invalidate of all types, selection and de-selection of the list box item that should be updated and more - nothing helps....
Can anyone pls help me with this?
Thanx,
Gili
I was learning this ORM because think this is good technology for most projects. But most employers required acquirement of ADO.NET and SQL.
This ORM not will use in high-loaded system (like popular web-sites)? In which types of projects this ORM will be useful? Are highly loaded projects using ORM?
I have a set of POCOs, all of which implement the following simple interface:
interface IIdObject
{
int Id { get; set; }
}
A subset of these POCOs implement this additional interface:
interface IDeletableObject : IIdObject
{
bool IsDeleted { get; set; }
}
I have a repository hierarchy that looks something like this:
IRepository<T <: BasicRepository<T <: ValidatingRepository<T (where T is IIdObject)
I'm trying to add a FilteringRepository to the hierarchy such that all of the POCOs that implement IDeletableObject have a Where(p => p.IsDeleted == false) filter applied before any other queries take place. My goal is to avoid duplicating the hierarchy solely for IDeletableObjects.
My first attempt looked like this:
public override IQueryable<T> Query()
{
return base.Query().Where(t => ((IDeletableObject)t).IsDeleted == false);
}
This works well with LINQ to Objects, but when I switch to an EF backend I get: "LINQ to Entities only supports casting Entity Data Model primitivetypes."
I went on to try some fancier parameterized solutions, but they ultimately failed because I couldn't make T covariant in the following case for some reason I don't quite understand:
interface IQueryFilter<out T> // error
{
Expression<Func<T, bool>> GetFilter();
}
I'd be happy to go into more detail on my more complicated solutions if it would help, but I think I'll stop here for now in hope that someone might have an idea for me to try.
Thanks very much in advance!
i have something that requires a matrix of values, similar to pokemon:
i have a class object for each of the types, is there a pattern or a good way to implement this, as a middle layer or in the classes?
I have a table in my database called "OrderItemType" which has about 5 records for the different OrderItemTypes in my system. Each OrderItem contains an OrderItemType, and this gives me referential integrity. In my middletier code, I also have an enum which matches the values in this table so that I can have business logic for the different types.
My dev manager says he hates it when people do this, and I am not exactly sure why. Is there a better practice I should be following?
Hi,
I'm working on a Rewriterule in order to have URLs like these: http://www.myhost.com/var1/var2/
RewriteRule ^(.*)\/(.*)\/$ index.php?var1=$1&var2=$2 [L]
What I would like to add is that when someone types myhost.com/var1/var2 (without the end slash), it still goes to the same page.
Is there a better way to do it than this?
RewriteRule ^(.*)\/(.*)\/$ index.php?band=$1&song=$2 [L]
RewriteRule ^(.*)\/(.*)$ index.php?band=$1&song=$2 [L]
I'd like to duplicate the find feature (Ctrl-F in Firefox) for my users.
In other words, a text box that as the user types, it finds the first occurrence of that text, and if they press "Next", it highlights the next occurrence and moves the page if necessary.
I'm thinking the search input would have to be in a div that remained fixed, and as it found what it was looking for, would insert a named anchor just before it and then follow the hyperlink.
Do you think this can be done?
Hi,
I need to decide which configuration framework to use. At the moment I am thinking between using properties files and XML files. My configuration needs to have some primitive grouping, e.g. in XML format would be something like:
<configuration>
<group name="abc">
<param1>value1</param1>
<param2>value2</param2>
</group>
<group name="def">
<param3>value3</param3>
<param4>value4</param4>
</group>
</configuration>
or a properties file (something similar to log4j.properties):
group.abc.param1 = value1
group.abc.param2 = value2
group.def.param3 = value3
group.def.param4 = value4
I need bi-directional (read and write) configuration library/framework. Nice feature would be - that I could read out somehow different configuration groups as different objects, so I could later pass them to different places, e.g. - reading everything what belongs to group "abc" as one object and "def" as another. If that is not possible I can always split single configuration object into smaller ones myself in the application initialization part of course.
Which framework would best fit for me?
Hi guys,
I am trying to mapp pojo class to mongodb using morphia-0.93-SNAPSHOT.jar but it is throwing exception that "java.lang.NoClassDefFoundError: org/bson/types/CodeWScope" which is bson's exception.So I am not able to run those programs.So please can anybody help me to solved this problem
I have the following (doctored) class in a system I'm working on and Findbugs is generating a SE_BAD_FIELD warning and I'm trying to understand why it would say that before I fix it in the way that I thought I would. The reason I'm confused is because the description would seem to indicate that I had used no other non-serializable instance fields in the class but bar.model.Foo is also not serializable and used in the exact same way (as far as I can tell) but Findbugs generates no warning for it.
import bar.model.Foo;
import java.io.File;
import java.io.Serializable;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Demo implements Serializable {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private final File file;
private final List<Foo> originalFoos;
private Integer count;
private int primitive = 0;
public Demo() {
for (Foo foo : originalFoos) {
this.logger.debug(...);
}
}
...
}
My initial blush at a solution is to get a logger reference from the factory right as I use it:
public DispositionFile() {
Logger logger = LoggerFactory.getLogger(this.getClass());
for (Foo foo : originalFoos) {
this.logger.debug(...);
}
}
That doesn't seem particularly efficient, though.
Thoughts?