Daily Archives

Articles indexed Sunday May 16 2010

Page 2/75 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • sqlite, UPDATE OR REPLACE

    - by acidzombie24
    I do something like UPDATE OR REPLACE someTable SET a=1, b=2 WHERE c=3 I expect if it doesnt exist it will be inserted into the DBs. But nothing happens and i get no errors. How can i insert data, replace it if it already exist and use a where for the condition (instead of replacing BC of a unique ID)

    Read the article

  • How to learn to program C the right way

    - by sfactor
    i have been programming in C/C++ for my academic courses a lot and was under the impression i had a pretty good grasp of it. but lately i had to work in a bluetooth application that had a server and client implementation in a Linux box and an embedded system. i learned bluez bluetooth API, socket/network programming and coded it. however i ran into a lot of problems with memory leaks and segmentation faults and other memory related errors along the way.as the code grew more complex i all but lost control of the pointers and threads and sockets. this got me wondering that i had a lot to learn that they didn't say in the basic C/C++ books. so i wanted to ask for the resources that are available that'll help be code better in a professional way in C/C++ .especially for the Linux/Mac environment (gcc compiler).

    Read the article

  • Scala 2.8: use Java annotation with an array parameter

    - by yournamehere
    I'm trying to implement an JavaEE Session Bean with Scala 2.8. Because it's a Remote Session Bean, i have to annotate it with the following Java Annotation: @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Remote { Class[] value() default {}; } I only found this example for scala 2.7. In Scala 2.7, its possible to define the session bean like this: @Remote {val value = Array(classOf[ITest])} class MyEJB ... How can i use this annotation the same way with Scala 2.8? I already tried many different versions, all resulting in "annotation argument needs to be a constant", "illegal start of simple expression". All of these definitions don't work: @Remote{val value = Array(classOf[PersonScalaEJB])} @Remote(val value = Array(classOf[PersonScalaEJB])) @Remote(Array(classOf[PersonScalaEJB]))

    Read the article

  • Welcome

    - by 13DaysaWeek
    Greetings! Let me start with an introduction.  My name is Chris House.  I'm a consultant with Digineer, a management and technology consultant firm in the Twin Cities of Minneapolis/St. Paul, Minnesota.  My particular area of focus is on middle tier technologies such as BizTalk, WCF, etc. I'm looking forward to sharing some of the interesting tidbits I come across during the course of my work.

    Read the article

  • Enterprise SharePoint 2010 Hosting, SharePoint Foundation 2010 Hosting, SharePoint Standard 2010 Hos

    - by Michael J. Hamilton, Sr.
    Enterprise SharePoint 2010 Hosting, SharePoint Foundation 2010 Hosting, SharePoint Standard 2010 Hosting, Michigan Sclera, a Microsoft Hosted Services Provider Partner, is offering key Service Offerings around the Microsoft SharePoint Server 2010 stack. Specifically – if you’re looking for SharePoint Foundation, SharePoint Standard or Enterprise 2010 hosting provisions, checkout the Service Offerings from Sclera Hosting (www.sclerahosting.com) and compare with some of the lowest prices available on the web today. I wanted to post this so you could shot around and compare. There are a couple of the larger on demand hosting agencies (247hosting, and fpweb hosting) – that charge outrageous fees  - like $350 a month for SharePoint Foundation 2010 hosting. The most incredible part? This is on a shared domain name – not the client’s domain. It’s hosting on something like .sharepointsites.com">.sharepointsites.com">http://<yourSiteName>.sharepointsites.com – or something crazy like that. Sclera Hosting provides you on demand – SharePoint Foundation, SharePoint Server Standard/Enterprise – 2010 RTM bits – within minutes of your order – ON YOUR DOMAIN – and that is a major perk for me. You have complete SharePoint Designer 2010 integration; complete support for custom assemblies, web parts, you name it – this hosting provider gives you more bang for buck than any provider on the Net today. Now – some teasers – I was in a meeting this week and I heard – SharePoint Foundation – 2010 RTM bits – unlimited users, 10 GB content database quota, full SharePoint Designer 2010 integration/support, all on the client’s domain – sit down and soak this up - $175.00 per month – no kidding. Now, I do not know about you – but – I have not seen a deal like that EVER on the Net – so – get over to www.sclerahosting.com – or email the Sales Team at Sclera Design, Inc. today for more details. Have a great weekend!

    Read the article

  • HTC Desire Data Plan Only in Australia. Possible?

    - by James
    I am moving to Australia, and want to get an HTC Desire and ideally pay for a data plan only, using skype for my calls. Is this possible with one of the providers down there and what will it ultimately cost including skype and all fees per month? Are there cheaper alternatives?

    Read the article

  • Using JQuery to insert new cells in a table row?

    - by Michael Smith
    I know that JQuery is a very powerful library and was just wondering if it had the following capability that I really need. Lets say I need to insert new cells into a table row, I know how to do this basic task, but I need to insert my cells in a highly unusual way due to some of the requirements that are needed for the new cells. I need to be able to insert cells a certain distance into the row, For example, if a row was 1000pixels wide, is there a feature in JQuery that would allow me to insert the cell 250pixels into the row and have a cell width of 50pixels and insert another cell 500pixels into the row with a cell width of 100pixels. I know how to set a cells width using JQuery, just not distance into a row. The values wont ever be the exact same as above though because they are actually read from a database, so for example, one cell would have the following values: CELL_01 $start=100; $finish=150; the above would mean a new cell is needed that needs to be inserted 100pixels into the row and has a width of 50pixels, I just cant seem to find a way to implement this feature into my application. How could I accomplish this task? Sorry for such a strange question, but i just cant seem to get this working. Thanks!

    Read the article

  • How to save, retrieve and draw an image in webapplication using Java and PostgreSQL?

    - by spderosso
    Given an object X; I want this object to have an image. The image must be stored in the database. I can't store the path, the actual image must be in the database. My question can be answered by answering the following subquestions: a). What type of field should I put in the database? (e.g VARCHAR) b) What type of object should I use for storing and manipulating the image (at an object layer)? (e.g java.awt.Image) c) How do I create an object of the type selected (answer of question b) from the data obtained from the database? d) How do I save an object of the type selected (answer of question b) to the database? e) How do I draw the image on a web page? I am using PostgreSQL, Java and it is a web application. Thanks!

    Read the article

  • Is there a .def file equivalent on Linux for controlling exported function names in a shared library

    - by morpheous
    I am building a shared library on Ubuntu 9.10. I want to export only a subset of my functions from the library. On the Windows platform, this would be done using a module definition (.def) file which would contain a list of the external and internal names of the functions exported from the library. I have the following questions: How can I restrict the exported functions of a shared library to those I want (i.e. a .def file equivalent) Using .def files as an example, you can give a function an external name that is different from its internal name (useful for prevent name collisions and also redecorating mangled names etc) On windows I can use the EXPORT command (IIRC) to check the list of exported functions and addresses, what is the equivalent way to do this on Linux?

    Read the article

  • AssemblyResolve event is not firing during compilation of a dynamic assembly for an aspx page.

    - by John
    This one is really pissing me off. Here goes: My goal is to load assemblies at run-time that contain embedded aspx,ascx etc. What I would also like is to not lock the assembly file on disk so I can update it at run-time without having to restart the application (I know this will leave the previous version(s) loaded). To that end I have written a virtual path provider that does the trick. I have subscribed to the CurrentDomain.AssemblyResolve event so as to redirect the framework to my assemblies. The problem is that the when the framework tries to compile the dynamic assembly for the aspx page I get the following: Compiler Error Message: CS0400: The type or namespace name 'Pages' could not be found in the global namespace (are you missing an assembly reference?) Source Error: public class app_resource_pages__version_1_0_0_0__culture_neutral__publickeytoken_null_default_aspx : global::Pages._Default, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandle I noticed that if I load the assembly with Assembly.Load(AssemblyName) or Assembly.LoadFrom(filename) I dont get the above error. If I load it with Assembly.Load(byte[]) (so as to not lock it), the exception is thrown but my AssemblyResolve handler, when called is returning the assembly correctly (it is called once). So I am guessing that it is called once when the framework parses the asp markup but not when it tries to create the dynamic assembly for the aspx page.

    Read the article

  • WebDriver with firefox-x11 on Mac

    - by binil
    I am trying to run a headless test for a web application using WebDriver on Mac OS X 10.6.3. My plan is to run firefox-x11 with Xvfb, but WebDriver is unable to launch firefox-x11. My code is: System.setProperty("webdriver.firefox.bin", "/opt/local/bin/firefox-x11-devel-standalone"); WebDriver browser = new FirefoxDriver(); try { browser.get("http://google.com"); } finally { browser.close(); } but this fails with: org.openqa.selenium.WebDriverException: Unable to start firefox cleanly. Exit value: 1 Ran from: [/opt/local/bin/firefox-x11-devel-standalone, --verbose, -silent] System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.3', java.version: '1.6.0_17' Driver info: driver.version: firefox at org.openqa.selenium.firefox.FirefoxBinary.copeWithTheStrangenessOfTheMac(FirefoxBinary.java:200) at org.openqa.selenium.firefox.FirefoxBinary.startProfile(FirefoxBinary.java:83) at org.openqa.selenium.firefox.FirefoxBinary.clean(FirefoxBinary.java:264) at org.openqa.selenium.firefox.FirefoxLauncher.startProfile(FirefoxLauncher.java:66) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.<init>(NewProfileExtensionConnection.java:45) at org.openqa.selenium.firefox.internal.ExtensionConnectionFactory.connectTo(ExtensionConnectionFactory.java:44) When I manually launch /opt/local/bin/firefox-x11-devel-standalone from the terminal, it seems to work fine despite some harmless errors shown. So, I tried to patch the org.openqa.selenium.firefox.FirefoxBinary.copeWithTheStrangenessOfTheMac(ProcessBuilder) method to ignore the errors and exit value of 1. Now it proceeds further, but fails with: Caused by: org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/opt/local/bin/firefox-x11-devel-standalone) on port 7055; process output follows: Xlib: extension "RANDR" missing on display "/tmp/launch-tElCRZ/org.x:0". Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! (firefox-bin:88837): Gtk-CRITICAL **: gtk_widget_has_screen: assertion `GTK_IS_WIDGET (widget)' failed ?Xlib: extension "RANDR" missing on display "/tmp/launch-tElCRZ/org.x:0". Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! (firefox-bin:88877): Gtk-CRITICAL **: gtk_widget_has_screen: assertion `GTK_IS_WIDGET (widget)' failed ? System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.3', java.version: '1.6.0_17' Driver info: driver.version: firefox at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.connectToBrowser(NewProfileExtensionConnection.java:60) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.<init>(NewProfileExtensionConnection.java:49) at org.openqa.selenium.firefox.internal.ExtensionConnectionFactory.connectTo(ExtensionConnectionFactory.java:44) ... 4 more Caused by: org.openqa.selenium.firefox.NotConnectedException: Failed to start up socket within 45000 at org.openqa.selenium.firefox.internal.AbstractExtensionConnection.connectToBrowser(AbstractExtensionConnection.java:143) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.connectToBrowser(NewProfileExtensionConnection.java:58) ... 6 more Has anyone got WebDriver to work with firefox-x11? This post seems to suggest that one person had got it working, but it does not contain much details.

    Read the article

  • Error when running rake db:create

    - by Amy
    Hi, I am trying to setup an ror app but I keep getting this error. Any ideas as to what may be causing the problem? /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' /home/projects/testproject/lib/tasks/more_tasks.rake:3 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:9 /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `each' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:9 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /home/projects/testproject/Rakefile:10 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19

    Read the article

  • Cannot Access Rails Server From Outside LAN

    - by Mike
    Hello All This is my first post here. I have a rails server I'm running on a dedicated server that I have jail shell access to. I can start up a rails server and access it just fine using the text-based browser elinks running in that jail shell using both internal and public IP's. However, I cannot access the rails server from outside that chrooted environment. Does anyone have any ideas as to what might be going on? Any help would be appreciated. Thanks.

    Read the article

  • iPhone apps: Webapps or native?

    - by jpartogi
    Hi all, I am planning to create an iPhone apps version for our online webapps. I am still new to iPhone apps development so I don't know whether to choose iPhone native or a webapps that runs on iPhone browser. The requirement is actually pretty basic. The iPhone apps need to submit data and get data from the database that is also used by the webapps. User would have the same access to the webapps, only I want this specific to iPhone, as the user experience would be different using a webapps and iPhone apps. I am also interested to sell the application on Apple store. Based on your experience, what would be better for this kind of requirement, iPhone native or webapps? What are the drawbacks building a native iPhone apps and webapps that runs on iPhone browser? Also, am I only limited to Objective-C to build a native iPhone apps? Or is there any other framework for that? Please be gentle on me, I am not starting a flamewar.

    Read the article

  • LINQ-to-SQL and SQL Compact - database file sharing problem

    - by Eye of Hell
    Hello. I'm learing LINQ-to-SQL right now and i have wrote a simple application that define SQL data: [Table( Name = "items" )] public class Item { [ Column( IsPrimaryKey = true, IsDbGenerated = true ) ] public int Id; [ Column ] public string Name; } I have launched 2 copy of application connected to the same .sdf file and tested if all database modifications in one application affects another application. But strange thing arise. If i use InsertOnSubmit() and DeleteOnSubmit() in one application, added/removed items are instantly visible in other application via 'select' LINQ queue. But if i try to modify 'Name' field in one application, it is NOT visible in other applicaton until it reconnects the database :(. The test code i use: var Items = from c in db.Items where Id == c.Id select c; foreach( var Item in Items ) { Item.Name = "new name"; break; } db.SubmitChanges(); Can anyone suggest what i'm doing wrong and why InsertOnSubmit()/DeleteOnSubmit works and SubmitChanges() don't?

    Read the article

  • add row to a BindingSource gives different autoincrement value from whats saved into DB

    - by Ruben Trancoso
    I have a DataGridView that shows list of records and when I hit a insert button, a form should add a new record, edit its values and save it. I have a BindingSource bound to a DataGridView. I pass is as a parameter to a NEW RECORD form so // When the form opens it add a new row and de DataGridView display this new record at this time DataRowView currentRow; currentRow = (DataRowView) myBindindSource.AddNew(); when user confirm to save it I do a myBindindSource.EndEdit(); // inside the form and after the form is disposed the new row is saved and the bindingsorce position is updated to the new row DataRowView drv = myForm.CurrentRow; avaliadoTableAdapter.Update(drv.Row); avaliadoBindingSource.Position = avaliadoBindingSource.Find("ID", drv.Row.ItemArray[0]); The problem is that this table has a AUTOINCREMENT field and the value saved may not correspond the the value the bindingSource gives in EDIT TIME. So, when I close and open the DataGridView again the new rowd give its ID based on the available slot in the undelying DB at the momment is was saved and it just ignores the value the BindingSource generated ad EDIT TIME, Since the value given by the binding source should be used by another table as a foreingKey it make the reference insconsistent. There's a way to get the real ID was saved to the database?

    Read the article

  • Entity Framework with File-Based Database

    - by Dave Swersky
    I am in the process of developing a desktop application that needs a database. The application is currently targeted to SQL Express 2005 and works wonderfully. However, I'm not crazy about having this dependency on SQL Express and would prefer to use a small file-based database. My problem is that I am using Entity Framework. I have tried both SQL Compact and SQLite, and they both have bizarre problems with EF v1. I get errors creating the Model, invalid models when it does get created... it's a nightmare. I'm about ready to give up and write a data layer and repository in the good-old-school Connection/Command pattern. Not my favorite plan... Is there a lightweight, file-based database out there that plays well with EF? OR Is there a better ORM tool that I should use instead of EF with my lightweight DB?

    Read the article

  • Where can I find boost::fusion articles, examples, guides, tutorials?

    - by Kyle
    I am going to go ahead and shamelessly duplicate this question because the accepted answer is essentially "nope, no guides" and it's been nearly a year now since it's been asked. Does anyone know of any useful articles, guides, tutorials, etc. for boost::fusion besides the barebones documentation on boost.org? (which I'm sure is great as a reference after one has learned the library.) I'm completely open to, say, a link to a book on Amazon. Searched for it myself just now but all I came up with was green tea. The top links on Google aren't much better.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >