Hey guys. I am just a beginner in eclipse rcp I'm feeling it hard to understand the concepts. Infact I struggling to create a button, somebody pls give a good suggestion as to how to start with rcp.
I'm trying to figure out the best build system for latex.
Currently, I use latex-makefile, editing in vim, and viewing changes in Okular or gv. The major problem is that it sometimes gets hides errors on me, and I have to run latex manually. The major advantages are that it does all the iteration I need, and offers both pdf and ps simply.
If you have experience with
latex-mk
vim-latex
kile
lyx
miktex
latex-makefile
the ultimate latex makefile
rubber
any others I havent come across
Would you recommend them, and why/why not?
Hi all,
If I develop my application using eclipse RCP and my own eclipse plugins, can other people copy and paste my plugins and used in other application?
thanks
So, I'd like to implement my own custom authorization system in MVC2.
If I'd have to create a global class, where do I instantiate it?
Can HttpContext be extended with my own additions and where do I do that?
Should I use Authorization filters for rights validation or ActionFilters or do it within an action?
Can ActionFilter pass any data to the action itself?
Previously (in WebForms) I was using a Session object where I would put a serialized object containing essential user data (account id and a list of roles and rights) and I'd extend my own Page class.
The Application static members are supposed to be thread safe:
The public static (Shared in Visual
Basic) members of this type are thread
safe. In addition, the FindResource
and TryFindResource methods and the
Properties and Resources properties
are thread safe.1
How much can we trust that statement in a multithreaded environment when calling static member methods of System.Windows.Application?
Update:
It's all in reference to this question: http://stackoverflow.com/questions/2463822/threading-errors-with-application-loadcomponent-key-already-exists/2463866#2463866
I never thought I'd see a real bug in the library, but this must be the day for me... that question seems to show a genuine bug. Usually it's "user error," but this doesn't seem to be the case.
hi,
I ma getting error like Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.Unit' in the following code. How to fix this.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadTab tab = new RadTab();
tab.Text = string.Format("New Page {0}", 1);
RadTabStrip1.Tabs.Add(tab);
RadPageView pageView = new RadPageView();
pageView.Height = "100px";
RadMultiPage1.PageViews.Add(pageView);
BuildPageViewContents(pageView, RadTabStrip1.Tabs.Count);
RadTabStrip1.SelectedIndex = 0;
RadTabStrip1.DataBind();
}
}
Here I am getting error. pageView.Height = "100px";
How to fix this?
I am working one Eclipse RCP project where I have got one situation that I wanted to set classpath at runtime. So initially, I can set the classpath
from project\lib\sample.jar file in order to avoid the compilation error. But once the Eclipse RCP application started, and click one update button, a new sample.jar file would be generated at workspace. Now I wanted to update the classpath for newly generated sample.jar from workspace. Which is the best option for setting such a runtime classpath ?
I'm a photographer and I have a requirement find a better method of storing my photos other than multiple USB2 drives via USB hubs.
Currently I use a Macbook Pro and 6 external drives connected via USB2 or FW800. 3 are a copy of the first three, kept up to day manually by running an rsync backup.
I'd like to run a FreeNAS or OpenFiler NAS box using 2TB drives mirrored via software RAID. But - I would like to have the flexibility of also plugging into the drive physically for the faster throughput when necessary.
So.
My question is, is there a file system that both *nix and Mac OSX will play nice with?
Many thanks,
Chris.
I'm maintaining a .Net 2.0 application using Visual Studio 2008. When the application was built, it was originally in Visual Studio 2003 and made use of the System.ComponentModel.Component class for data access. You can drag and drop commands, connections, etc onto the designer surface of the component.
In 2008, the data access classes don't "stick" to the component. I.e., the code for the command does not get generated in the class.
when did this change? 2005?
is there a replacement for this behavior, perhaps using the db pro edition?
Thanks.
Has anyone figured out how to scroll the contents of the Layout Editor when those contents overflow one "screen"? I'm talking about at design-time while using the ADT Layout Editor, not scrolling at run-time on a physical device (that works fine).
can any one help me
how to copy file from unix Windoes system to windows UNIX using ant?
Thanks in advance
EDIT
Let me explain in detail what I am looking for I want to copy file from windows to unix machine (correcting my previous question not from unix to windows) using ANT. I thought of using ftp task.
Before that as a check I tried to ftp unix sever from windows but it gave connection refused error(Do I need to provide my username and password,if that is the case what is the syntax).
But I am able to connect through putty which asks for my user name and password. Does putty uses a different protocol.
So if that is the case does ftp task works for me in ANT?. If not what task I need to use?
I'm new to JQuery -- not new to javascript.
Was able to open the OSX STYLE DIALOG using the hyperlink button provided in the demo index.html page, but would like to open it on the page load. I read a couple links on StackOverflow (http://stackoverflow.com/questions/1611727/how-do-i-invoke-a-simplemodal-osx-dialog-on-page-load), but still could not get it to work in the exact same index.html page. I finally resorted to a stopgap measure by programmatically invoking the button click of a hidden button element -- see following fragment:
onLoad="document.getElementById('load_OSX_Example').click();">
<input type="hidden" id="load_OSX_Example" value="" class='osx'>
<script type="text/javascript" language="javascript">
//#### open the OSX Modal ##########
$(document).ready(function(){
$("#osx-modal-content").modal();
});
</script>
So I have two questions:
How can you invoke the class='osx' using javascript/html programmatically?
Why won't this work using the $("#osx-modal-content").modal(); call in javascript (see fragment above)? I tried this in multiple browsers, and the only content that displayed on the screen was content of this tag: "div id="osx-modal-title", and there was no error in the jscript console.
I'm using System.Net.Mail to send email, like so :
MailMessage message = new MailMessage();
message.From = new MailAddress("[email protected]");
message.To.Add(new MailAddress("[email protected]"));
message.Subject = "Hello";
message.Body = "This is a nice body..";
SmtpClient client = new SmtpClient();
client.Send(message);
How can i know if the E-mail was sent, can i put in a if sentence to check it out ?
What would it look like then ?
I'm making a PM-system on my site. And I want to know ultimate db schema.
I have always just used only 1 table. But my users have started complained that the messages in their outbox suddently dissapers =D Thats because if the other users deletes it, the one who sent it wont see it to.
So im thinking of making another table with the same fields
So im thinking something like this:
privmsgs
id | to | from | subject | message | date
-- -- ---- ------- ------- ----
1 76 893 blabla. blabla. 20100404
sent_msgs
id | to | from | subject | message | date
-- -- ---- ------- ------- ----
1 76 893 blabla. blabla. 20100404
Whatya think?
Sorry for my bad english
We've an existing system which connects to the the back end via http (apache/ssl) and polls the server for new messages, needless to say we have scalability issues.
I'm researching on removing this polling and have come across BOSH/XMPP but I'm not sure how we should take the BOSH technique (using long lived http connection).
I've seen there are few libraries available but the entire thing seems bloaty since we do not need buddy lists etc and simply want to notify the clients of available messages.
The client is written in C/C++ and works across most OS so that is an important factor. The server is in Java.
does bosh result in huge number of httpd processes? since it has to keep all the clients connected, what would be the limit on that. we are also planning to move to 64 bit JVM/apache what would be the max limit of clients in that case.
any hints?
Hi
I am looking into a number of ways to implement a labelling system similar to the one in Gmail. Basically I have a Resource at the lowest level and I would like to provide a number of organisational groupings for that resource in the form of labels. If anyone has implemented something like that I would like to hear your views. My idea is to have within the Resource instance a List<Label>. I need to have an efficient mechanism in order to do very fast searches based on the labels or based on the resources.
Thanks
Dimitris
Hi
I am fairly new to iphone development. Right now, I am working on an iphone game that is being developed in cocos2d. But I want to create an iphone application that uses its GPS system. I searched a lot on net but didn't find much.
I want to know about:
What framework tou use like cocoa touch or cocos2d,etc?
Any linksk that could help me regarding this?
Any other relevant and helpful information?
Thanks
All the examples I've seen regarding a RESTful architecture have dealt with a single record. For example, a GET request to mydomain.com/foo/53 to get foo 53 or a POST to mydomain.com/foo to create a new Foo.
But what about multiple records? Being able to request a series of Foos by id or post an array of new Foos generally would be more efficient with a single API request rather than dozens of individual requests. Would you "overload" mydomain.com/foo to handle requests for both a single or multiple records? Or would you add a mydomain.com/foo-multiple to handle plural POSTs and GETs?
I'm designing a system that may potentially need to get many records at once (something akin to mydomain.com/foo/53,54,66,86,87) But since I haven't seen any examples of this, I'm wondering if there's something I'm just not getting about a RESTful architecture that makes this approach "wrong".
I'm writing a site in ASP.NET MVC that will have user accounts. As the site will be oriented towards discussion, I think I need a system for admins to be able to moderate users, just like we have here, on Stack Overflow. I'd like to be able to put a user into a "suspension", so that they are able to log in to the site (at which point they are greeted with a message, such as, "Your account has been suspended until [DATE]"), but are unable to do the functions that users they would normally be able to do.
What's the best way of implementing this?
I was thinking of creating a "Suspended" role, but the thing is, I have a few different roles for normal users themselves, with different privileges.
Have you ever designed a feature like this before? How should I do it? Thanks in advance.
Tycho is supposed to be a plug-in for maven for building eclipse plug-ins.
I have found various blogs and other articles about it, but the contained links to Tycho are all dead or not accessible for the general public, for example: http://www.sonatype.com/people/2009/04/tycho-040-roadmap/
The only thing I found is a project proposal on the eclipse site, but it doesn't reference any downloads: http://www.eclipse.org/proposals/tycho/
I found a svn repository, but it seems to be extremely dated:
http://svn.codehaus.org/m2eclipse/tycho/trunk/
So my question is: where do I get tycho from? Or is it dead and I should stop bothering?
I doubt it's dead, since I found out there is a talk about it on JAX2010 ...
Hello! I'm using fluentnhibernate with PostgreSQL. Fluentnhibernate is last version. PosrgreSQL version is 8.4.
My code for create ISessionFactory:
public static ISessionFactory CreateSessionFactory()
{
string connectionString = ConfigurationManager.ConnectionStrings["PostgreConnectionString"].ConnectionString;
IPersistenceConfigurer config = PostgreSQLConfiguration.PostgreSQL82.ConnectionString(connectionString);
FluentConfiguration configuration = Fluently
.Configure()
.Database(config)
.Mappings(m =>
m.FluentMappings.Add(typeof(ResourceMap))
.Add(typeof(TaskMap))
.Add(typeof(PluginMap)));
var nhibConfig = configuration.BuildConfiguration();
SchemaMetadataUpdater.QuoteTableAndColumns(nhibConfig);
return configuration.BuildSessionFactory();
}
When I'm execute code at line SchemaMetadataUpdater.QuoteTableAndColumns(nhibConfig); throw error: System.NotSupportedException: Specified method is not supported. Help me, please! I'm very need for solution.
Best regards
Right now I am planning to add a filter system to my site.
Examples:
(ID=apple, COLOR=red, TASTE=sweet, ORIGIN=US)
(ID=mango, COLOR=yellow, TASTE=sweet, ORIGIN=MEXICO)
(ID=banana, COLOR=yellow, TASTE=bitter-sweet, ORIGIN=US)
so now I am interested in doing the following:
SELECT ID FROM thisTable WHERE COLOR='yellow' AND TASTE='SWEET'
But my problem is I am doing this for multiple categories in my site, and the columns are NOT consistent. (like if the table is for handphones, then it will be BRAND, 3G-ENABLED, PRICE, COLOR, WAVELENGTH, etc)
how could I design a general schema that allows this?
Right now I am planning on doing:
table(ID, KEY, VALUE)
This allows arbitary number of columns, but for the query, I am using
SELECT ID FROM table WHERE (KEY=X1 AND VALUE=V1) AND (KEY=X2 AND VALUE=V2), .. which returns an empty set.
Can someone recommend a good solution to this? Note that the number of columns WILL change regularly
First of all I'll just put both these patterns in context
and describe their intent as in the GOF book:
Factory Method:
Define an interface
for creating an object, but let subclasses decide which class
to instantiate.
Factory Method lets a class defer instantiation to subclasses.
Abstract Factory:
Provide an interface
for creating families of related or dependent objects without
specifying their
concrete classes.
Points to note:
Abstract factory pattern adds a layer of
abstraction to the factory method pattern. The type of factory is not known to
the client at compile time, this information is passed to the client at runtime
(How it is passed is again dependent on the system, you may store this
information in configuration files and the client can read it on execution).
While implementing Abstract factory pattern, the
factory classes can have multiple factory methods.
In Abstract factory, a factory is capable of
creating more than one type of product (Simpilar products are grouped together in
a factory)
Sample implementation of factory method pattern
Let's see the class diagram first:
ProductFactory.cs
//
-----------------------------------------------------------------------
// <copyright
file="ProductFactory.cs" company="">
// TODO: Update copyright text.
// </copyright>
//
-----------------------------------------------------------------------
namespace FactoryMethod
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// TODO: Update summary.
/// </summary>
public abstract class ProductFactory
{
/// <summary>
/// </summary>
/// <returns>
/// </returns>
public abstract Product CreateProductInstance();
}
}
ProductAFactory.cs
//
-----------------------------------------------------------------------
// <copyright
file="ProductAFactory.cs" company="">
// TODO: Update copyright text.
// </copyright>
//
-----------------------------------------------------------------------
namespace FactoryMethod
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// TODO: Update summary.
/// </summary>
public class ProductAFactory:ProductFactory
{
public override Product CreateProductInstance()
{
return new ProductA();
}
}
}
//
-----------------------------------------------------------------------
// <copyright
file="ProductBFactory.cs" company="">
// TODO: Update copyright text.
// </copyright>
//
-----------------------------------------------------------------------
namespace FactoryMethod
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// TODO: Update summary.
/// </summary>
public class ProductBFactory:ProductFactory
{
public override Product CreateProductInstance()
{
return new ProductB();
}
}
}
//
-----------------------------------------------------------------------
// <copyright
file="Product.cs" company="">
// TODO: Update copyright text.
// </copyright>
//
-----------------------------------------------------------------------
namespace FactoryMethod
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// TODO: Update summary.
/// </summary>
public abstract class Product
{
public abstract string Name { get; set; }
}
}
//
-----------------------------------------------------------------------
// <copyright
file="ProductA.cs" company="">
// TODO: Update copyright text.
// </copyright>
//
-----------------------------------------------------------------------
namespace FactoryMethod
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// TODO: Update summary.
/// </summary>
public class ProductA:Product
{
public ProductA()
{
Name = "ProductA";
}
public override string Name { get; set; }
}
}
//
-----------------------------------------------------------------------
// <copyright
file="ProductB.cs" company="">
// TODO: Update copyright text.
// </copyright>
//
-----------------------------------------------------------------------
namespace FactoryMethod
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// TODO: Update summary.
/// </summary>
public class ProductB:Product
{
public ProductB()
{
Name = "ProductA";
}
public override string Name { get; set; }
}
}
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FactoryMethod
{
class Program
{
static void Main(string[] args)
{
ProductFactory pf = new
ProductAFactory();
Product product = pf.CreateProductInstance();
Console.WriteLine(product.Name);
}
}
}
Normal
0
false
false
false
false
EN-US
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
In Microsoft Windows, this works:
mnu := GetSystemMenu(h, false);
EnableMenuItem(mnu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
But this does not work:
mnu := GetSystemMenu(h, false);
EnableMenuItem(mnu, SC_MOVE, MF_BYCOMMAND or MF_GRAYED);
Hence I know how to disable the "Close" system menu item of a window, but not the "Move" item. How do I do that?
Update
Of course one alternative to using the very nice function EnableMenuItem, is to use SetMenuItemInfo:
FillChar(info, sizeOf(info), 0);
with info do
begin
cbSize := sizeOf(info);
fMask := MIIM_STATE;
fState := MFS_GRAYED;
end;
SetMenuItemInfo(mnu, SC_MOVE, false, info);
But this again works perfectly for SC_CLOSE, but not at all for SC_MOVE!
I have a basic type system type mismatch problem:
I have a class with a method
def Create(nodeItem : NodeItem) = {p_nodeStart.addEndNode(nodeItem)}
where p_nodeStart is NodeCache
class NodeCache[END_T<:BaseNode] private(node: Node) extends BaseNode {
def addEndNode(endNode : END_T) = {this.CACHE_HAS_ENDNODES.Create(endNode)}
and the error its giving me is:
error: type mismatch;
found : nodes.NodeItem
required: Nothing
def Create(nodeItem : NodeItem) = {p_nodeStart.addEndNode(nodeItem)}
while the NodeCache is defined as
object NodeTrigger {
def Create() {
val nodeTimeCache = NodeCache.Create[NodeItem](node)
and in object NodeCache
object NodeCache {
def Create[END_T<:BaseNode]() {
val nodeCache = new NodeCache[END_T](node);
Any ideas, how to fix the error?