Search Results

Search found 296 results on 12 pages for 'ricardo costa'.

Page 9/12 | < Previous Page | 5 6 7 8 9 10 11 12  | Next Page >

  • Why this friend function can't access a private member of the class?

    - by Alceu Costa
    I am getting the following error when I try to access bins private member of the GHistogram class from within the extractHistogram() implementation: error: 'QVector<double> MyNamespace::GHistogram::bins' is private error: within this context Where the 'within this context' error points to the extractHistogram() implementation. Does anyone knows what's wrong with my friend function declaration? Here's the code: namespace MyNamespace{ class GHistogram { public: GHistogram(qint32 numberOfBins); qint32 getNumberOfBins(); /** * Returns the frequency of the value i. */ double getValueAt(qint32 i); friend GHistogram * Gbdi::extractHistogram(GImage *image, qint32 numberOfBins); private: QVector<double> bins; }; GHistogram * extractHistogram(GImage * image, qint32 numberOfBins); }

    Read the article

  • Cookiless Session Is it a security

    - by Costa
    Hi http://msdn.microsoft.com/en-us/library/aa479314.aspx You have a user who successfully log in from a machine in Cybercafe, Hacker H able to sniffer the network and get the sessionID of the user, Can H use the sessionId and act as the user from another machine? Can H enter http://folder/(session id)/CreditCardInformation.aspx to know the credit card number of the user. Thanks

    Read the article

  • Best way to use Cradle with Express.js (CouchDB, Node.js)

    - by Costa
    I'm building my website ( http://tedxgramercy.jit.su ) with express.js and so far I've been using the http.request method in node to access couch, and that's been cool. I've learned lots about how http, couch, and node work, which is awesome. Anyways, I'm thinking of moving over to cradle now (Let me know if you have a strong opinion about this) and I'd like to know the "right" way to set this up. Should I... require() cradle and make a new connection to my db in each separate route? create my database connection once, and then just pass that connection by require()ing the connection in each route? (if so, how do I do that?) Thanks!!!

    Read the article

  • Need help configuring Castle-Windsor

    - by Jonathas Costa
    I have these base interfaces and providers in one assembly (Assembly1): public interface IEntity { } public interface IDao { } public interface IReadDao<T> : IDao where T : IEntity { IEnumerable<T> GetAll(); } public class NHibernate<T> : IReadDao<T> where T : IEntity { public IEnumerable<T> GetAll() { return new List<T>(); } } And I have this implementation inside another assembly (Assembly2): public class Product : IEntity { public string Code { get; set; } } public interface IProductDao : IReadDao<Product> { IEnumerable<Product> GetByCode(string code); } public class ProductDao : NHibernate<Product>, IProductDao { public IEnumerable<Product> GetByCode(string code) { return new List<Product>(); } } I want to be able to get IRead<Product> and IProductDao from the container. I am using this registration: container.Register( AllTypes.FromAssemblyNamed("Assembly2") .BasedOn(typeof(IReadDao<>)).WithService.FromInterface(), AllTypes.FromAssemblyNamed("Assembly1") .BasedOn(typeof(IReadDao<>)).WithService.Base()); The IReadDao<Product> works great. The container gives me ProductDao. But if I try to get IProductDao, the container throws ComponentNotFoundException. How can I correctly configure the registration?

    Read the article

  • Which is faster join

    - by Costa
    Hi Which is faster SELECT * FROM X INNER JOIN Y ON x.Record_ID = y.ForignKey_NotIndexed_NotUnique or SELECT * FROM X INNER JOIN Y ON y.ForignKey_NotIndexed_NotUnique = x.Record_ID

    Read the article

  • Numeric literals in sql server 2008

    - by costa
    What is the type that sql server assigns to the numeric literal: 2. , i.e. 2 followed by a dot? I was curious because: select convert(varchar(50), 2.) union all select convert(varchar(50), 2.0) returns: 2 2.0 which made me ask what's the difference between 2. and 2.0 type wise? Sql server seems to assign types to numeric literals depending on the number itself by finding the minimal storage type that can hold the number. A value of 1222333 is stored as int while 1152921504606846975 is stored as big int. thanks

    Read the article

  • Android save Checkbox State in ListView with Cursor Adapter

    - by Ricardo
    I cant find a way to save the checkbox state when using a Cursor adapter. Everything else works fine but if i click on a checkbox it is repeated when it is recycled. Ive seen examples using array adapters but because of my lack of experience im finding it hard to translate it into using a cursor adapter. Could someone give me an example of how to go about it. Any help appreciated. private class PostImageAdapter extends CursorAdapter { private static final int s = 0; private int layout; Bitmap bm=null; private String PostNumber; TourDbAdapter mDbHelper; public PostImageAdapter (Context context, int layout, Cursor c, String[] from, int[] to, String Postid) { super(context, c); this.layout = layout; PostNumber = Postid; mDbHelper = new TourDbAdapter(context); mDbHelper.open(); } @Override public View newView(Context context, final Cursor c, ViewGroup parent) { ViewHolder holder; LayoutInflater inflater=getLayoutInflater(); View row=inflater.inflate(R.layout.image_post_row, null); holder = new ViewHolder(); holder.Description = (TextView) row.findViewById(R.id.item_desc); holder.cb = (CheckBox) row.findViewById(R.id.item_checkbox); holder.DateTaken = (TextView) row.findViewById(R.id.item_date_taken); holder.Photo = (ImageView) row.findViewById(R.id.item_thumb); row.setTag(holder); int DateCol = c.getColumnIndex(TourDbAdapter.KEY_DATE); String Date = c.getString(DateCol); int DescCol = c.getColumnIndex(TourDbAdapter.KEY_CAPTION); String Description = c.getString(DescCol); int FileNameCol = c.getColumnIndex(TourDbAdapter.KEY_FILENAME); final String FileName = c.getString(FileNameCol); int PostRowCol = c.getColumnIndex(TourDbAdapter.KEY_Post_ID); String RowID = c.getString(PostRowCol); String Path = "sdcard/Tourabout/Thumbs/" + FileName + ".jpg"; Bitmap bm = BitmapFactory.decodeFile(Path, null); holder.Photo.setImageBitmap(bm); holder.DateTaken.setText(Date); holder.Description.setText(Description); holder.cb.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { CheckBox cBox = (CheckBox) v; if (cBox.isChecked()) { mDbHelper.UpdatePostImage(FileName, PostNumber); } else if (!cBox.isChecked()) { mDbHelper.UpdatePostImage(FileName, ""); } } }); return row; }; @Override public void bindView(View row, Context context, final Cursor c) { ViewHolder holder; holder = (ViewHolder) row.getTag(); int DateCol = c.getColumnIndex(TourDbAdapter.KEY_DATE); String Date = c.getString(DateCol); int DescCol = c.getColumnIndex(TourDbAdapter.KEY_CAPTION); String Description = c.getString(DescCol); int FileNameCol = c.getColumnIndex(TourDbAdapter.KEY_FILENAME); final String FileName = c.getString(FileNameCol); int PostRowCol = c.getColumnIndex(TourDbAdapter.KEY_Post_ID); String RowID = c.getString(PostRowCol); String Path = "sdcard/Tourabout/Thumbs/" + FileName + ".jpg"; Bitmap bm = BitmapFactory.decodeFile(Path, null); File x = null; holder.Photo.setImageBitmap(bm); holder.DateTaken.setText(Date); holder.Description.setText(Description); holder.cb.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { CheckBox cBox = (CheckBox) v; if (cBox.isChecked()) { mDbHelper.UpdatePostImage(FileName, PostNumber); } else if (!cBox.isChecked()) { mDbHelper.UpdatePostImage(FileName, ""); } } }); } } static class ViewHolder{ TextView Description; ImageView Photo; CheckBox cb; TextView DateTaken; } }

    Read the article

  • SSRS & asp.net - passing parameters from .net to ssrs in report viewer

    - by Ricardo Deano
    Hello all. I am about to embark in using a report viewer in my .net page. I have a page that will search for a catgory, upon a button click, the category chosen will pass into the parameter of report viewer. Now, given that I am a newbie to both SSRS and .net, I'd just like a bit of advice on how to tackle this. Should I make the report in SSRS first and include the parameters in this report or can I make the report without the parameters specified, then programmatically enter this in the codebehind? Basically, I know what I would like to do but not sure the best approach to take. If anyone can offer advice, I would be most grateful.

    Read the article

  • working python xml

    - by ricardo
    hello all, my question is the following, which is the best way of working XML (kml) with python?, especially script serializable. thanks for your attention and answers

    Read the article

  • downgrade mapserver

    - by ricardo
    hello all, a question, as I can uninstall and install mapserver an older version, since I is causing roughly following error and I think is the version of the same Warning: [MapServer Error]: msLoadSymbolSet(): First token must be SYMBOLSET, this doesn't look like a symbol file. in /var/www/obtra/vcauca.php on line 25 Warning: Failed to open map file obtra_1.map in /var/www/obtra/vcauca.php on line 25 Fatal error: Call to a member function getLayerByName() on a non-object in /var/www/obtra/vcauca.php on line 33 this in ubuntu 8.04 if it is not possible please where I can get an older version that I recommended to avoid mistakes and to update the system. thanks for your suggestions and answers

    Read the article

  • Binding menu items to a sitemap.

    - by Ricardo Deano
    Hello all..this is driving me nuts. I have a navigation menu I would like to display based upon user roles (using.net membership) After several hours and headaches (from banging my head against the desk) I was wondering if someone can point me in the error of my ways. Page: <body> <form runat="server"> <div class="page"> <div class="header"> <div class="loginDisplay"> <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false"> <AnonymousTemplate> <a href="~/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> </AnonymousTemplate> <LoggedInTemplate> Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>! [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/Open/Close.aspx"/> ] </LoggedInTemplate> </asp:LoginView> </div> <div class="clear hideSkiplink"> <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" IncludeStyleBlock="False" Orientation="Horizontal" DataSourceID="AugustSiteMap" /> <asp:SiteMapDataSource ID="AugustSiteMap" runat="server" ShowStartingNode="false"/> </div> </div> SiteMap: <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/Default.aspx" title="Home" description="Home"> <siteMapNode title="Open Pages" description="Open Pages"> <siteMapNode url="~/Open/Login.aspx" title="Login Page" description="Login Page" roles="*"/> <siteMapNode url="~/Open/Close.aspx" title="Thank you for using Valpak Data Solutions Online Reporting" description="Thank you for using Valpak Data Solutions Online Reporting" roles="*"/> </siteMapNode> <siteMapNode title="Logged In Open Pages" description="Logged In Open Pages"> <siteMapNode url="~/Landing.aspx" title="Landing Page" description="Landing Page" roles="*"/> <siteMapNode url="~/ContactUs.aspx" title="Contact Us" description="Contact Us" roles="*"/> </siteMapNode> <siteMapNode title="Restricted Pages" description="Resticted Pages"> <siteMapNode url="~/Restricted/ProductSearch.aspx" title=" Product Search" description=" Product Search" roles="*"/> <siteMapNode url="~/Restricted/ReportOutput.aspx" title="Report Output" description="Report Output" roles="Admin"/> </siteMapNode> </siteMapNode> </siteMap> Webconfig: <roleManager enabled="true" /> <siteMap defaultProvider="XmlSiteMapProvider" enabled="true"> <providers> <add name="XmlSiteMapProvider" description="AugustSiteMap" type="System.Web.XmlSiteMapProvider " siteMapFile="AugustSiteMap.sitemap" securityTrimmingEnabled="true" /> </providers> </siteMap> How can I ensure that when the user is logged in, the appropriate menu items are displayed on the Landing page? Please excuse my ignorance. Still new to all of this and my current method of 'trial and error' has seen me reach suicide levels this morning!

    Read the article

  • Using sql column names in hibernate createSQlquery result

    - by Ricardo
    Hi all, i have a couple of sql views with composite primary keys that i want to query, and since Hibernate makes it a pain to work with composite keyes, im using createSQLQuery. The problem is that this method can only return a List, and i need to refer to the colums by their index. Any chance i could do like jdbc and refer to the columns by their sql name insted of their index? thanks

    Read the article

  • How do I get my ActivityUnitTestCases to sync with the MessageQueue thread and call my Handler?

    - by Ricardo Gladwell
    I'm writing unit tests for a ListActivity in Android that uses a handler to update a ListAdapter. While my activity works in the Android emulator, running the same code in a unit test doesn't update my adapter: calls to sendEmptyMessage do not call handleMessage in my activity's Handler. How do I get my ActivityUnitTestCase to sync with the MessageQueue thread and call my Handler? The code for the Activity is somewhat like this: public class SampleActivity extends ListActivity implements SampleListener { List samples = new ArrayList(); public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sample_list); listView.setEmptyView(findViewById(R.id.empty)); } private final Handler handler = new Handler() { @Override public void handleMessage(Message msg) { // unit test never reaches here sharesAdapter = new SampleAdapter(SampleActivity.this, samples); setListAdapter(sharesAdapter); } }; public void handleSampleUpdate(SampleEvent event) { samples.add(event.getSample()); handler.sendEmptyMessage(0); } } The code for my unit test is somewhat like this: public class SampleActivityTest extends ActivityUnitTestCase<SampleActivity> { public SampleActivityTest() { super(SampleActivity.class); } @MediumTest public void test() throws Exception { final SampleActivity activity = startActivity(new Intent(Intent.ACTION_MAIN), null, null); final ListView listView = (ListView) activity.findViewById(android.R.id.list); activity.handleSampleUpdate(new SampleEvent(this)); // unit test assert fails on this line: assertTrue(listView.getCount() == 1); } }

    Read the article

  • What call from the Android Development Tools API should I use to poll project target loading?

    - by Ricardo Gladwell
    I'm writing my own eclipse plug-in that integrates with the Eclipse Android Development Tools (ADT). However, I'm getting a CoreException ("Project target not loaded yet.") thrown when I attempt to call IProject.build on an Android project as part of a unit test: IProject project = importProject(...); project.build(IncrementalProjectBuilder.FULL_BUILD, monitor); Should I be waiting for the project target to load before calling the above? If so, what call should I use to poll the project target loading status?

    Read the article

  • How to to icmps and traceroutes in Java

    - by Ricardo
    For some reason i cannot even phantom, Java does not have primitives for ICMPs and traceroute. Any idea how to overcome this? Basically im building code that should run in *nix and windows, and need a piece of code that will run in both platforms.. Thanks!

    Read the article

  • Redirecting user to a folder but show another domain

    - by Ricardo
    Hello, I am using htaccess to redirect people from a domain that is registered on my host to a folder. Ex: the user type www.my2nddomain.com and I redirect them to www.my1stdomain.com/folder. But I wanted to show the domain the user typed instead of the address with the folder on it. How do I do it? Thanks in advance!

    Read the article

  • Breadth-First in Prolog

    - by Ricardo
    What is the general idea of using breadth-first over the default depth-first search scheme in Prolog? Not taking infinite branches? Is there any general way to use breadth-first in Prolog? I've been googling around and I didn't find too much useful info for a novice.

    Read the article

  • SELECT TOP N With Two Variables

    - by Ricardo Deano
    Hello all. It's Tuesday morning and I am being thick as (I'm blaming my daughter waking up early this morning!) I have the following example in a SQL table Cust Group Sales A 1 15 A 1 10 A 1 5 A 2 15 A 2 10 A 2 5 B 1 15 B 1 10 B 1 5 B 2 15 B 2 10 B 2 5 What I would like to show is the top 2 products per customer, per group sorted descending by Sales i.e. Cust Group Sales A 1 15 A 1 10 A 2 15 A 2 10 B 1 15 B 1 10 B 2 15 B 2 10 I'm assuming I need to declare two variables, Cust and Group, I'm just not sure how to complete this in one fell swoop. Apologies for the thick question...no excuse. Thanks for any help.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12  | Next Page >