Daily Archives

Articles indexed Tuesday June 8 2010

Page 23/122 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Beginners book for .net and c#?

    - by Nagaraj
    Hello. I know i am asking a silly question, the thing is I wanted to do a project where i am thinking to build a database with a front end using .net or c#. I am totally new to these languages. I thought posting here would give many experts advice. Can anyone tell me which book to prefer for it? (I would be glad if the book was a pdf online ) Thank you.

    Read the article

  • How to check whether given file is in PROPER word file format?

    - by shekhar
    Hi, I am developing one application using C# for processing MSWord files. My application gets hang when I pass invalid .doc file as an input. For example, if I have one foo.pdf file and I pass it to my application after changing its extension (foo.doc). Is it possible to check whether file is valid doc file before trying to open it? Please enlighten !!!! Thanks in advance

    Read the article

  • Attach an entity that is not new, perhaps having been loaded from another DataContext. LINQ to SQL -

    - by soldieraman
    Alright How I got this error I got one application sitting on a server 2 users accessing this application - doing some bulk data processing . eg. entering values and then the application is working with another system to extract values for them and then saving. I can't recreate the error The error logs show: The error happend at the same time in both the application Both happend on a Attach/Submit (but two different functions) There is no way they are using the same DataContext object as I save the DataContext in the HttpContext.Items My hunch / guess is: One datacontext was not refreshed i.e. the an object was created for the same item twice as it was new in both the forms. eg. Customer Number - a customer was created (as one couldn't be found) by one datacontext - the other one couldn't find it either (i am using compiled queries to find it in the datacontext) so it created another object and on attaching failed. The HttpContext.Items lost its value somehow (i am using a virtual pc as server - maybe something went wrong there) I am going more of the second as I can't recreate the error - but it just might be a timing (for attach/save) thing - also the error makes me think of the 2nd too.

    Read the article

  • How should I manage/declare dependencies between open source C# projects?

    - by munificent
    I've got a game (a roguelike to be specific) in C# that I'm in the process of cleaning up to open source. One step I'd like to take is splitting it into three distinct pieces: A simple package of utility classes, things like 2D arrays, vectors, etc. A terminal UI package that gives you a curses-like display. It depends on 1. The actual game, which uses 1 and 2. Right now, these are all separate projects in the same solution, but I'd kind of like to make them completely separate projects (in the "open source project" sense, not the "visual studio project" use of the term) with their own names and repos. I think, at the very least, #1 is generally useful even if you aren't building game, and I don't want someone to have to build an entire game just to get some handy functions. What I'm not sure about is how to handle the dependencies if I split up the solution. If someone decides they want to sync the game, how should I ensure they also get 1 and 2? Include the built dependent .dlls in the games repo? Just document, "you need these other projects and they must be in a path relative to the game like this". Just leave it all one giant solution and a single repo. Something I'm not thinking of?

    Read the article

  • Need to play flash videos on iphone

    - by Yannis
    Hi all, I am building this iphone app for a client and they have a large set of flash video files that they need to play/stream to the iphone. I understand that the iphone doesnt natively support flv playback but isnt there anything I can do to get around this problem? In case it helps, they are using the akamai flash player on their website to play these video files. Thanks in advance.

    Read the article

  • Issue with button text shifting

    - by Fizz
    I'm having this odd issue. I have these buttons where the button's text is shifted downward upon certain actions. For example, I have a spinner with choices and one of the choices makes some buttons invisible while others are made visible. When I choose these, the buttons made visible all have their text shifted downward. Nothing else is shifted, just the text on the buttons. I've tried this on 1.5 and it works fine, no text is shifted, but I have issues with 2.1 and I really cannot figure it out. Any ideas or help would be great. Thanks.

    Read the article

  • 100k+ Records and sp_xml_preparedocument

    - by Jonn
    I've been encountering a seeming deadlock with one of my tables and the only place I can trace it back to is a stored procedure that uses sp_xml_preparedocument on a list of data. The data inserted, btw, consists of a 100k+ records on average. Is it possible that it is causing the deadlock? What other pitfalls does using sp_xml_preparedocument have?

    Read the article

  • Wordpress sidebar classes

    - by Chris J. Lee
    There any way i could add a class for the specific order of widget item? i.e. the class name would be widgetorder-1 (for the first appearing widget), widgetorder-2 (for the widget appearing in the 2nd order), etc. I looked into filters but wasn't sure how that worked.

    Read the article

  • How to generate a window (widget) on button press in qt

    - by Ram
    I had designed some gui through Qt cretor on linux,these design consists of some fields, text edit , & some push buttons . Now my doubt is when i press on push button i want display aanother window . Is there any GUI option for this or any hard code.please let me know if any hard code............. waiting for answer Tanks in advance. Ram

    Read the article

  • Spring, Need to use a a bean declared in a ApplicationContextFactory servlet, in a DispatcherServlet

    - by Ernest
    Hello, i have a web.xml with these 2 servlet: <servlet> <servlet-name>ApplicationContextFactory</servlet-name> <servlet-class>com.bamboo.common.factory.ApplicationContextFactory</servlet-class> <load-on-startup>1</load-on-startup> </servlet> AND <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> I need to use these bean declared on the ApplicationContextFactory: <bean id="**catalogFacadeTarget**" class="com.bamboo.catW3.business.impl.CatalogFacadeImpl"> <property name="categoryDAO"><ref local="categoryDAOTarget"/></property> <property name="containerDAO"><ref local="containerDAOTarget"/></property> <property name="productDAO"><ref local="productDAOTarget"/></property> <property name="productOptionDAO"><ref local="productOptionDAOTarget"/></property> <property name="productStatusDAO"><ref local="productStatusDAOTarget"/></property> <property name="userDAO"><ref local="userDAOTarget"/></property> </bean> in the dispatcher-servlet like this: <bean name="welcome" class="com.bamboo.catW3.business.impl.Welcome"> <property name="successView"> <value>welcome</value> </property> <property name="catalogFacadeImpl"><ref local="**categoryDAOTarget**"/> </property> </bean> Is it posible some how? Thank you!

    Read the article

  • Powershell in CruiseControl.net to backup existing folder before deploying new version of the code

    - by Rihan Meij
    Hi I would like to zip a bunch of files (.exe and .dll) before I overwrite them with the new build. Is there a simple way to zip files without using some sort of dll? Just creating a folder with the build number / date time stamp will also work great. How do I pass parameters from the cruise control build process into my Powershell script that will do the work then? Is this a sustainable way to do things? Thanks

    Read the article

  • Managing logs/warnings in Python extensions

    - by Dimitri Tcaciuc
    TL;DR version: What do you use for configurable (and preferably captured) logging inside your C++ bits in a Python project? Details follow. Say you have a a few compiled .so modules that may need to do some error checking and warn user of (partially) incorrect data. Currently I'm having a pretty simplistic setup where I'm using logging framework from Python code and log4cxx library from C/C++. log4cxx log level is defined in a file (log4cxx.properties) and is currently fixed and I'm thinking how to make it more flexible. Couple of choices that I see: One way to control it would be to have a module-wide configuration call. # foo/__init__.py import sys from _foo import import bar, baz, configure_log configure_log(sys.stdout, WARNING) # tests/test_foo.py def test_foo(): # Maybe a custom context to change the logfile for # the module and restore it at the end. with CaptureLog(foo) as log: assert foo.bar() == 5 assert log.read() == "124.24 - foo - INFO - Bar returning 5" Have every compiled function that does logging accept optional log parameters. # foo.c int bar(PyObject* x, PyObject* logfile, PyObject* loglevel) { LoggerPtr logger = default_logger("foo"); if (logfile != Py_None) logger = file_logger(logfile, loglevel); ... } # tests/test_foo.py def test_foo(): with TemporaryFile() as logfile: assert foo.bar(logfile=logfile, loglevel=DEBUG) == 5 assert logfile.read() == "124.24 - foo - INFO - Bar returning 5" Some other way? Second one seems to be somewhat cleaner, but it requires function signature alteration (or using kwargs and parsing them). First one is.. probably somewhat awkward but sets up entire module in one go and removes logic from each individual function. What are your thoughts on this? I'm all ears to alternative solutions as well. Thanks,

    Read the article

  • Sinatra Gem install error

    - by lakshmanan
    I have been trying to install sinatra in a macbook running leopard system, and I am not able to do it. I get the following error. MacBook:rubygems-1.3.7 lakshmanan$ gem install sinatra WARNING: RubyGems 1.2+ index not found for: http://rubygems.org/ RubyGems will revert to legacy indexes degrading performance. Bulk updating Gem source index for: http://rubygems.org/ ERROR: While executing gem ... (NoMethodError) undefined method `gems' for #<Array:0x101901008> Please help. I reinstalled gems also. Still I get the same error.

    Read the article

  • lost session after redirect_to

    - by PeterWong
    I encountered a strange performance in my current project, which is about session. The strange part is it was normal in Safari but failed in other browsers (includes chrome, firefox and opera). There is a registration form for input of part of the key information (email, password, etc) and is submitted to an action called "create" This is the basic code of create action: @account = Account.new(params[:account]) if @account.save ApplicationController.current_account = @account session[:current_account] = ApplicationController.current_account session[:account] = ApplicationController.current_account.id email = @account.email Mailer.deliver_account_confirmation(email) flash[:type] = "success" flash[:notice] = "Successfully Created Account" redirect_to :controller => "accounts", :action => "create_step_2" else flash[:type] = "error" flash[:title] = "Oops, something wasn't right." flash[:notice] = "Mistakes are marked below in red. Please fix them and resubmit the form. Thanks." render :action => "new" end Also I created a before_filter in the application controller, which has the following code: ApplicationController.current_account = Account.find_by_id(session[:current_account].id) unless session[:current_account].blank? For Safari, there is no any problem. But for the other browsers, the session[:current_account] does not exist and so produced the following error message: RuntimeError in AccountsController#create_step_2 Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id Please could anyone help me?

    Read the article

  • How to link static libs (archives) to an empty dynamic lib with gcc4

    - by user360607
    Greetings all! I'm using gcc on linux to create a shared library. The library itself has no code but links to a couple of static libraries(archives) also built using gcc. I need to export the static libs' symbols through my shared library. What happens is that the resulting shared lib is too small and it actually does not contain any of the symbols provided by the static libs mentioned above. I also tried with a map of exported symbols but that did not help at all. Could any of you suggest a solution! 10x in advance

    Read the article

  • Anyone know exactly which JMS messages will be redelivered in CLIENT_ACKNOWLEDGE mode if the client

    - by user360612
    The spec says "Acknowledging a consumed message automatically acknowledges the receipt of all messages that have been delivered by its session" - but what I need to know is what it means by 'delivered'. For example, if I call consumer.receive() 6 times, and then call .acknowledge on the 3rd message - is it (a) just the first 3 messages that are ack'd, or (b) all 6? I'm really hoping it's option a, i.e. messages after the one you called acknowledge on WILL be redelivered, otherwise it's hard to see how you could prevent message lost in the event of my receiver process crashing before I've had a chance to persist and acknowledge the messages. But the spec is worded such that it's not clear. I get the impression the authors of the JMS spec considered broker failure, but didn't spend too long thinking about how to protect against client failure :o( Anyway, I've been able to test with SonicMQ and found that it implements (a), i.e. messages 'received' later than the message you call .ack on DO get redelivered in the event of a crash, but I'd love to know how other people read the standard, and if anyone knows how any other providers have implemented CLIENT_ACKNOWLEDGE? (i.e. what the 'de facto' standard is) Thanks Ben

    Read the article

  • jena ontology api

    - by laknath27
    i'm new to jena and protege.i did some stuff with these. i have some problems:: 1) Do i need to use sparql query to get the ontology classes,subclasses,property and values? or can do it with owl-api? can u show me the way? 2) how to get the data property values? 3) how to i load the ontology that define in my local machine and access the classes ? thanks:::

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >