Daily Archives

Articles indexed Sunday May 16 2010

Page 8/75 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • paypal payment integration from asp.net page

    - by kacalapy
    can anyone detail the particulars that are required to send data collected from a asp.net web page using vb.net that has a bunch of text boxes for first name, last name, address... item price, quantity, total price... to paypal for processing and settlement? i have never worked with paypal so i am assuming paypal will get this info and generate a bill to send the user. thanks in advance

    Read the article

  • Is there a C# open-source search app which scales cheaply?

    - by domspurling
    I need to quickly replace a listings website which has the following characteristics: smallish database (10,000 items, < 1GB) < 10% of the items updated/created/removed daily most common activity is searching the whole dataset, returning 1-1000 items traffic peaks at 1m page impressions per day Scaling strategy for the existing app has been to separate read-only and read/write activity. Multiple slave databases are used for searching and writes are done to a master, which update the slaves using MS SQL replication. Since read activity is more common than write, this has proved to be a cheap way to do database load balancing, without true clustering. I now need to replace the app - are there any C# open-source apps which scale as neatly as this?

    Read the article

  • Multiple child in virtuemart

    - by handoyo
    Hi all,i want to ask. I'm intending to make custom build computer page with virtuemart. As example,customer can choose the processor,mainboard,optical drive,etc then sum the prices and display it.Is it possible to do it? How to do it? Thanks..

    Read the article

  • Fluent Nhibernate causes System.IndexOutOfRangeException on Commit()

    - by Moss
    Hey there. I have been trying to figure out how to configure the mapping with both NH and FluentNH for days, and I think I'm almost there, but not quite. I have the following problem. What I need to do is basically map these two entities, which are simplified versions of the actual ones. Airlines varchar2(3) airlineCode //PK varchar2(50) Aircraft varchar2(3) aircraftCode //composite PK varchar2(3) airlineCode //composite PK, FK referencing PK in Airlines varchar2(50) aircraftName My classes look like class Airline { string AirlineCode; string AirlineName; IList<Aircraft> Fleet; } class Aircraft { Airline Airline; string AircraftCode; string AircraftName; } Using FluentNH, I mapped it like so AirlineMap Table("Airlines"); Id(x => x.AirlineCode); Map(x => x.AirlineName); HasMany<Aircraft>(x => x.Fleet) .KeyColumn("Airline"); AircraftMap Table("Aircraft"); CompositeId() .KeyProperty(x => x.AircraftCode) .KeyReference(x => x.Airline); Map(x => x.AircraftName); References(x => x.Airline) .Column("Airline"); Using Nunit, I'm testing the addition of another aircraft, but upon calling transaction.Commit after session.Save(aircraft), I get an exception: "System.IndexOutOfRangeException : Invalid index 22 for this OracleParameterCollection with Count=22." The Aircraft class (and the table) has 22 properties. Anyone have any ideas?

    Read the article

  • Facebook Oauth 2.0 Token errors

    - by James
    The user clicks the URL that is generated via the code below. $url = 'https://graph.facebook.com/oauth/authorize?' . http_build_query(array('client_id' => FACEBOOK_APP_ID, 'redirect_uri' => 'http://fb.example.com/facebook', 'scope' => 'publish_stream,email,offline_access,user_location,user_hometown', 'display' => 'page')); Upon granting access to the application, and redirecting to http://fb.example.com/facebook I grab the following URL using cURL. $url = 'http://graph.facebook.com/oauth/access_token?' . http_build_query(array('client_id' => FACEBOOK_APP_ID, 'client_secret' => FACEBOOK_SECRET, 'redirect_uri' => 'http://fb.example.com/facebook', 'code' => $params['code'])); This returns the error below that I receive when grabbing the above URL. { "error": { "type": "OAuthException", "message": "Error validating verification code." } } Any ideas? Really getting stuck on this.

    Read the article

  • SwapBuffers causes redraw

    - by user146780
    I'm making a Win32 application with OpenGL in the main window (not using GLUT). I have my drawing code in WM_PAINT right now when I call swapBuffers it must be invalidating itself because it is constantly rerendering and using lots of cpu resources. How can I make it only render when it honestly receives WM_PAINT like when using GDI? Thanks

    Read the article

  • Windows 7 removes boot camp drivers on reboot

    - by beemzet
    I'm installing boot camp on 64 bit windows 7 home premium from a leopard disc. During installation I get a couple of errors saying that some driver publishers are not registered or something and I install them anyway. After reboot windows tries to repair something and reboots again. When I finally log in, there is no boot camp any more. Any ideas how to solve this? Thanks btw, I'm using Macbook Pro 15 inch Santa Rosa (late 2007)

    Read the article

  • jQuery - how to pass $(this) as an object?

    - by regan
    Hello! I'm trying to pass an object into a function but think there's a problem with $(this) not actually being valid at the point of passing it in. $('textarea#quote').live('bind',function(){ }).limit('10',$(this).parents('form').children().find('span#qc') ); The second parameter can be either a string or an object like $('span#qc'), but I also want to be able to pass in an object which references the current one. Why? Because I have several forms on same page, each containing textarea#quote, so depending on which form is selected I want to be able to reference a particular element within the same form. Anyone??

    Read the article

  • Where do I put the logic of my MFC program?

    - by Matthew
    I created an application core, in C++, that I've compiled into a static library in Visual Studio. I am now at the process of writing a GUI for it. I am using MFC to do this. I figured out how to map button presses to execute certain methods of my application core's main class (i.e. buttons to have it start and stop). The core class however, should always be sampling data from an external source every second or two. The GUI should then populate some fields after each sample is taken. I can't seem to find a spot in my MFC objects like CDialog that I can constantly check to see if my class has grabbed the data.. then if it has put that data into some of the text boxes. A friend suggested that I create a thread on the OnInit() routine that would take care of this, but that solution isn't really working for me. Is there no spot where I can put an if statement that keeps being called until the program quits? i.e. if( coreapp.dataSampleReady() ) { // put coreapp.dataItem1() in TextBox1 // set progress bar to coreapp.dataItem2() // etc. // reset dataSampleReady }

    Read the article

  • how to place last div into right top corner of partent div? (css)

    - by Radek
    can I somehow using css place the block2 in right top corner of block1? Note that block2 must be the (very) last inside html code of block1 or it could be placed after block1. I cannot make it the first element in block1 <html> <head> <style type="text/css"> .block1 {color:red;width:100px;border:1px solid green;} .block2 {color:blue;width:70px;border:2px solid black;position:relative;} </style> </head> <body> <div class='block1'> <p>text</p> <p>text2</p> <div class='block2'>block2</DIV> </div> </body> </html>

    Read the article

  • How do I add a custom view to a HorizontalScrollView?

    - by Sunian314
    So, I followed a tutorial for drawing stuff on android. I have created a Panel class that extends SurfaceView that I draw on using a thread. Now I want to put this Panel in a scroll view, specifically one that scrolls horizontally so that I can draw stuff wider than the screen. I would I go about doing that?

    Read the article

  • DoubleBuffering in Java

    - by DDP
    Hello there, I'm having some trouble implementing DoubleBuffer into my program. Before you faint from the wall of text, you should know that a lot of it is there just in case you need to know. The actual place where I think I'm having problems is in one method. I've recently looked up a tutorial on the gpwiki about double buffering, and decided to try and implement the code they had into the code I have that I'm trying to implement doublebuffer in. I get the following error: "java.lang.IllegalStateException: Component must have a valid peer". I don't know if it makes any difference if you know it or not, but the following is the code with the main method. This is just a Frame that displays the ChronosDisplay class inside it. I omitted irrelevant code with "..." public class CDM extends JFrame { public CDM(String str) { super("CD:M - "+str); try { ... ChronosDisplay theGame = new ChronosDisplay(str); ((Component)theGame).setFocusable(true); add(theGame); } catch(Exception e) { System.out.println("CDM ERROR: " +e); } } public static void main( String args[] ) { CDM run = new CDM("DP_Mini"); } } Here is the code where I think the problem resides (I think the problem is in the paint() method). This class is displayed in the CDM class public class ChronosDisplay extends Canvas implements Runnable { String mapName; public ChronosDisplay (String str) { mapName = str; new Thread(this).start(); setVisible(true); createBufferStrategy(2); } public void paint( Graphics window ) { BufferStrategy b = getBufferStrategy(); Graphics g = null; window.setColor(Color.white); try { g = b.getDrawGraphics(); paintMap(g); paintUnits(g); paintBullets(g); } finally { g.dispose(); } b.show(); Toolkit.getDefaultToolkit().sync(); } public void paintMap( Graphics window ) { TowerMap m = new TowerMap(); try { m = new TowerMap(mapName); for(int x=0; x<m.getRows()*50; x+=50) { for(int y = 0; y<m.getCols()*50; y+=50) { int tileType = m.getLocation(x/50,y/50); Image img; if(tileType == 0) { Tile0 t = new Tile0(x,y); t.draw(window); } ...// More similar if statements for other integers } catch(Exception e) ... } ...// Additional methods not shown here public void run() { try { while(true) { Thread.currentThread().sleep(20); repaint(); } } catch(Exception e) ... } } If you're curious (I doubt it matters), the draw() method in the Tile0 class is: public void draw( Graphics window ) { window.drawImage(img,getX(),getY(),50,50,null); } Any pointers, tips, or solutions are greatly appreciated. Thanks for your time! :D

    Read the article

  • Bad HD and robocopy

    - by acidzombie24
    After my HD gave me crc errors I wanted to copy one drive to another and picked up a new 1TB hd. I am using the command robocopy G: J: /MIR /COPYALL /ZB First it tried copying the file a few times (i didnt count, its not in my window anymore) and got an access denied error, error 5. Then it tried again and locked up. I tried copying that specific file (14mb) and windows says "cant read from source file or disk". I started robocopy again. Hopefully it will ignore it after a fail attempt or two but what options can i use to say if it doesnt work continue to the next file. It looked like that is what it was doing but for this last one it repeated more then 4times and locked up finally. I'm open to other copy solutions. I do prefer built in solutions. I am using windows 7 Also how might i do this without the /MIR option. Is /S /E good enough? flag reference here -edit- i see i can control retries with /R: but i am still open to alternative solutions.

    Read the article

  • software that list previously installed programs

    - by Nrew
    Is there a software that can detect and list previously installed programs on a computer? Or any method you know which I can use so that I could see what programs were previously installed assuming that those programs were only uninstalled using the add/remove programs in control panel. Or if you know a method which will also detect and list previously installed programs which are uninstalled using advanced uninstaller like revo.

    Read the article

  • how to place last div into right top corner of parent div? (css)

    - by Radek
    can I somehow using css place the block2 in right top corner of block1? Note that block2 must be the (very) last inside html code of block1 or it could be placed after block1. I cannot make it the first element in block1 <html> <head> <style type="text/css"> .block1 {color:red;width:100px;border:1px solid green;} .block2 {color:blue;width:70px;border:2px solid black;position:relative;} </style> </head> <body> <div class='block1'> <p>text</p> <p>text2</p> <div class='block2'>block2</DIV> </div> </body> </html>

    Read the article

  • Good Haskell coding standards

    - by Alexey Romanov
    Could someone provide a link to a good coding standard for Haskell? I've found this and this, but they are far from comprehensive. Not to mention that the HaskellWiki one includes such "gems" as "use classes with care" and "defining symbolic infix identifiers should be left to library writers only."

    Read the article

  • Bulk Insert of hundreds of millions of records

    - by Dave Jarvis
    What is the fastest way to insert 237 million records into a table that has rules (for distributing the data across 84 child tables)? First I tried inserts. No go. Then I tried inserts with BEGIN/COMMIT. Not nearly fast enough. Next, I tried COPY FROM, but then noticed the documentation states that the rules are ignored. (And it was having difficulties with the column order and date format -- it said that '1984-07-1' was not a valid integer; true, but a bit unexpected.) Some example data: station_id,taken,amount,category_id,flag 1,'1984-07-1',0,4, 1,'1984-07-2',0,4, 1,'1984-07-3',0,4, 1,'1984-07-4',0,4,T Here is the table structure (with one rule included): CREATE TABLE climate.measurement ( id bigserial NOT NULL, station_id integer NOT NULL, taken date NOT NULL, amount numeric(8,2) NOT NULL, category_id smallint NOT NULL, flag character varying(1) NOT NULL DEFAULT ' '::character varying ) WITH ( OIDS=FALSE ); ALTER TABLE climate.measurement OWNER TO postgres; CREATE OR REPLACE RULE i_measurement_01_001 AS ON INSERT TO climate.measurement WHERE date_part('month'::text, new.taken)::integer = 1 AND new.category_id = 1 DO INSTEAD INSERT INTO climate.measurement_01_001 (id, station_id, taken, amount, category_id, flag) VALUES (new.id, new.station_id, new.taken, new.amount, new.category_id, new.flag); I can generate the data into any format. Am looking for something that won't take four days. I originally had the data in MySQL (still do), but am hoping to get a performance increase by switching to PostgreSQL and am eager to use its PL/R extensions for stats. I was also thinking about using: http://pgbulkload.projects.postgresql.org/ Any help, tips, or guidance would be greatly appreciated. Thank you!

    Read the article

  • Getting Prepared/Planning

    - by The.Anti.9
    For the first time, I am trying to create a rather large .NET project. I think the largest one I have made so far was about 6 classes, but this one is already at 14. For the section I'm starting to work on, I'm having some trouble putting everything together in my head, which is what I normally do. I think it's just a little too complex for that. I want to plan it out, and I want some way to visualize it and be able to play with it and manipulate the structure easily. Is there any sort of (free) program I can use to do this?

    Read the article

  • ALTER TABLE without locking the table?

    - by Daniel
    When doing an ALTER TABLE statement in MySQL, the whole table is read-locked for the duration of the statement. If it's a big table, that means insert or update statements could be locked for a looooong time. Is there a way to do a "hot alter", like adding a column in such a way that the table is still updatable throughout the process? Mostly I'm interested in a solution for MySQL but I'd be interested in other RDBMS if MySQL can't do it. To clarify, my purpose is simply to avoid downtime when a new feature that requires an extra table column is pushed to production. Any database schema will change over time, that's just a fact of life. I don't see why we should accept that these changes must inevitably result in downtime; that's just weak.

    Read the article

  • How to use Visual Studio debugger visualizers built against a different framework version?

    - by michielvoo
    I compiled the ExpressionTreeVisualizer project found in the Visual Studio 2010 samples but when I try to use it in a .NET 3.5 project I get the exception below: Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft\Visual Studio 2010\Common7\Packages\Debugger\Visualizers\ExpressionTreeVisualizer.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. The sample project had the TargetFrameworkVersion set to v4.0 and after changing it to v3.5 and building it now works in my project. I changed the source code and project file and rebuilt it so that I now have two expression tree visualizers, one for v3.5 projects and one for v4.0 projects. Is there a better way? Thanks!

    Read the article

  • c# Properties.Settings.Default Doesn't work as expected

    - by Jack
    I've been working on a program to automate my backup checks with LogMeIn backup (a windows forms based program). I now need a way to store user settings, to save information easily. I've never worked with the Application/User settings that is somewhat "built-in" - and decided to try it, but ran into problems. I added four settings for now: IncludeCriteria (Specialized.StringCollection) ExcludeCriteria (Specialized.StringCollection) ReportPath (string) ReportType (int) But the behavior doesn't act as expected (go figure). After saving some values in my program, I go back into edit/view my settings values using the VS 2008 settings editor. None of my values are stored. While I think this may be because those values are just default values, wouldn't that be where they can be stored/read/changed? Here is my load form code (still very unrefined): private void setupForm() { txtPath.Text = BackupReport.Properties.Settings.Default.ReportPath == null ? "" : BackupReport.Properties.Settings.Default.ReportPath; if (BackupReport.Properties.Settings.Default.ReportType == 0) { radioHTML.Checked = true; } else radioExcel.Checked = true; if (BackupReport.Properties.Settings.Default.IncludeCriteria.Count > 0) { listIncludeCriteria.DataSource = Properties.Settings.Default.IncludeCriteria; //foreach (string s in Properties.Settings.Default.IncludeCriteria) // listIncludeCriteria.Items.Add(s); } if (BackupReport.Properties.Settings.Default.ExcludeCriteria.Count > 0) { listExcludeCriteria.DataSource = BackupReport.Properties.Settings.Default.ExcludeCriteria; //foreach (string s in Properties.Settings.Default.ExcludeCriteria) // listExcludeCriteria.Items.Add(s); } } listIncludeCriteria is just a listbox. When the user saves I call this method: private void saveSettings() { //var settings = BackupReport.Properties.Settings; if (txtPath.Text != "") { BackupReport.Properties.Settings.Default.ReportPath = txtPath.Text; } if (listIncludeCriteria.Items.Count > 0) { //BackupReport.Properties.Settings.Default.IncludeCriteria = (StringCollection)listIncludeCriteria.Items.AsQueryable(); foreach (var i in listIncludeCriteria.Items) { if (!isIncludeDuplicate(i.ToString())) BackupReport.Properties.Settings.Default.IncludeCriteria.Add(i.ToString()); } } if (listExcludeCriteria.Items.Count > 0) { //BackupReport.Properties.Settings.Default.ExcludeCriteria = (StringCollection)listExcludeCriteria.Items.AsQueryable(); foreach (var i in listExcludeCriteria.Items) { if (!isExcludeDuplicate(i.ToString())) Properties.Settings.Default.ExcludeCriteria.Add(i.ToString()); } } if (radioExcel.Checked == true) BackupReport.Properties.Settings.Default.ReportType = 1; else BackupReport.Properties.Settings.Default.ReportType = 0; BackupReport.Properties.Settings.Default.Save(); //Properties.Settings.Default.Save(); this.DialogResult = DialogResult.OK; this.Close(); } The wierd thing is when the form loads, the path I put in the first time seems to come up (ReportPath) - even the listBoxes are populated with a bunch of crap I put in - yet I cant find these values anywhere. Any help would be appreciated! Josh

    Read the article

  • Yet another bug of JSF?

    - by Nitesh Panchal
    Hello, Again i see that the @PostConstruct is firing every time even though no binding attribute is used. See this code :- <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core"> <h:head> <title>Facelet Title</title> </h:head> <h:body> <h:form> <c:forEach var="item" items="#{TestBean.listItems}"> <h:outputText value="#{item}"/> </c:forEach> <h:commandButton value="Click" actionListener="#{TestBean.actionListener}"/> </h:form> </h:body> </html> And this is the simplest possible bean in JSF :- package managedBeans; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; @ManagedBean(name="TestBean") @ViewScoped public class TestBean implements Serializable { private List<String> listItems; public List<String> getListItems() { return listItems; } public void setListItems(List<String> listItems) { this.listItems = listItems; } public TestBean() { } @PostConstruct public void init(){ System.out.println("Post Construct fired!"); listItems = new ArrayList<String>(); listItems.add("Mango"); listItems.add("Apple"); listItems.add("Banana"); } public void actionListener(){ System.out.println("Action Listener fired!"); } } Do you see any behaviour that should cause postconstruct callback to fire each time? I think JSF 2.0 is highly unstable. If it has to fire PostConstruct each and every time what purpose does @ViewScoped serve. Why not to use @RequestScoped only? I thought i have made some mistake in my application. But when i created this simplest possible in JSF, i still get this error. Am i not understanding the scopes of JSF? or are they not testing it properly? Further, if you remove c:forEach and replace it with ui:repeat, then it works fine. Waiting for replies to confirm whether it is bug or it is intentional to stop the programmers from using jstl?

    Read the article

  • Error when starting a tab activity in Android?

    - by ATDeveloper
    I followed the directions verbatim in this Android tutorial, copying/pasting the code from the site to my app. http://developer.android.com/resources/tutorials/views/hello-tabwidget.html However, when I try to run in the Android emulator, I get the error: "The application Hello Tab Widget has stopped unexpectedly. Please try again." I tried debugging by introducing a breakpoint in the first line of the onCreate method, but the error occurs before the breakpoint is even hit. Any idea of what is going wrong, or any other way I can debug this issue? I am using Eclipse.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >