Daily Archives

Articles indexed Tuesday June 15 2010

Page 14/118 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Can PHP and Oracle pass complex types to each other?

    - by RenderIn
    I want to pass/bind an array of (key1, key2) to an Oracle PL/SQL stored procedure using PHP. I'm able to bind primitive types and arrays of primitive types, but haven't found a way to pass complex datatypes back and forth. Is this unsupported? So far I've been having to pass along multiple arrays -- one for each subtype in my complex type -- and then depend on their indexes to reconstitute them in the procedure.

    Read the article

  • ASP.NET MVC NullReferenceException when inheriting from a Base Controller

    - by rockinthesixstring
    I've got a base controller that I inherit all of my Controllers from. It's job is to basically set caching and error handling as well as check for mobile browsers. My UI works fine, but my Unit Tests are failing. Imports System.Web.Mvc <HandleError()> _ <CompressFilter()> _ <OutputCache(Duration:=30, VaryByParam:="id")> _ Public Class BaseController : Inherits System.Web.Mvc.Controller Protected Overrides Function View(ByVal viewName As String, ByVal masterName As String, ByVal model As Object) As System.Web.Mvc.ViewResult Dim ismobile As Nullable(Of Boolean) = Request.Browser.IsMobileDevice If ismobile Then Return MyBase.View(viewName, "Mobile", model) Else Return MyBase.View(viewName, "Site", model) End If End Function End Class The error I'm getting in my Unit test is on Dim ismobile As Nullable(Of Boolean) = Request.Browser.IsMobileDevice saying Object Reference Not Set To An Instance Of An Object.

    Read the article

  • monitoring streaming server and display throughput

    - by I__
    Scenario: laptop (running RHEL 5.3 / 5.4) with Wi-Fi allowing incoming connections (the laptop is the DHCP server and default gateway of any device that connects to it). The laptop has a streaming server installed (my app). I need to program an app that could monitor this link (device / streaming server) and display the throughput. More importantly, I need this app to be able to throttle the throughput. Think WANem but as an app, or netlimiter but (way) simpler and for RHEL. If you need clarifications, let me know. is there a library that could help me? i've done mostly windows business applications programming, and i have no clue about this stuff. please help me to get started!

    Read the article

  • DirectX Resource Leak

    - by srand
    At the end of my DirectX application I get "The Direct3D device has a non-zero reference count, meaning some objects were not released.". The application is large and not written by me, how can I go about debugging what resources are not being released?

    Read the article

  • Multiple layouts in rails [Newbie Q]

    - by BriteLite
    Hi. As a newb, I decided to build a "home inventory" application. I am now stuck on how to programmatically select a layout based on what type of item it is when viewing it in a browser. According to my planning, so far I should have created a few models to represent types of items I can find in my home: Furniture, Electronics and Books. class Book < ActiveRecord::Base end class Furniture < ActiveRecord::Base end class Electronic < ActiveRecord::Base end Now the Books model has things like isbn, pages, address, and category. Furniture model has things like color, price, address, and category. Electronics has things like name, voltage, address, and category. Here is where I got confused. I know the property address is going to be the same for all of them. I also know that, I will need to create multiple "layouts" for 3 different types of items to show the different properties of said items with appropriate graphics and stylesheets. But how will I go about deciding which category the item is so I can determine which layout to render. According to me, this is how I will do it: class DisplayController < ApplicationController def display @item = Params[:item] if @item.category = "electronics" render :layout => 'electronics' end end In my routes.rb map.display ':item', :controller => 'display', :action => 'display' I only seem to have one concern with this, I probably will add a lot of categories later on and think there should be a more DRY-esque way of dealing, rather than hardcoding them. I understand that I need to add into my layout html tags to display relevant information for that particular category. ----Questions---- Is this the right way to approach this type of problem. Will this approach be compatible when I decide to add a gem like *thinking_sphinx* to run search. What issues do you see with my approach and how can I make it better. I was reading something about "Polymorphic Assoc", does that apply in this case, since category exist for all items? Also, I was trying to get a routes to render a URL like "http://localhost/living-room-tv"

    Read the article

  • Python IDE built into Visual Studio 2008?

    - by Thomaschaaf
    Hi I develop in Visual Studio 2008 a lot and would like to find an addin like vsphp which enables intellisense and debugging in Visual Studio. Is IronStudio what I am looking for? As far as I understand IronStudio is a Plugin for .NET. If there is no Plugin for Visual Studio 2008 whats a great IDE for a python newbee who loves Visual Studio (hate netbeans and eclipse sorry just don't feel the love) Also if IronPython Studio is an IDE do I want the Isolated or Integrated Version? I don't seem to understand the name. I installed integrated and got this: http://dl.getdropbox.com/u/5910/Jing/2009-02-11_1750.png :( no console like here: http://www.codeplex.com/IronPythonStudio

    Read the article

  • android close application

    - by Arutha
    I've two different activities. The first launches the second one. In the second activity I call System.exit(0) in order to force the application to close but the first activity is automatically displayed instead of come back to the home screen. How can I avoid this feature ?

    Read the article

  • routing mvc on the web

    - by generic_noob
    Hi, I was wondering if anyone could possibly provide me some advice on how i could improve the routing (and/or architecture) to each 'section' of my application. (I'm writing in PHP5, and trying to use strict MVC) Basically, I have a generic index page for the app, and that will spew out boilerplate stuff like jquery and the css etc. and it also generates the main navidation for the entire site, but i'm unsure about the best approach to connect the 'main menu' items(hyperlinks) with their associated controllers. Up until now I have been appending strings into the url and using a 'switch' statement to branch to the correct controller(and view) by extracting the strings back out of '$GET[]' to let it execute the code for the corrosponding action. for instance if i had a basic crud system for customer data, the url to edit a customers details would look like 'www.example.com/index.php?page=customer&action=edit&id=4'. I'm worried that there is a security concern by doing it this way, and i'm not sure of an alternative to branch the main 'index.php' file to the correct controller for each action once the user has clicked the link. Would it be better to use mod_rewrite to disguise the controllers names? or to create a similar system to the ASP MVC framework, where there is a seperate routing system where each url is filtered to get the associated controller? Cheers!

    Read the article

  • Access/update Telerik RadGrid item values in code-behind before ODS event handler

    - by Brent
    Hi there, I need to update some of the values of the item being edited in my code-behind based on some values in a custom Edit Form on our Rad Grid. Can I access the item (and update some values) from one of the Grid's event handlers? Currently I'm storing the values in temporary variables and then injecting the new values in the ObjectDataSource's Inserting/Updating event handlers, but it would be much nicer if I could do it all in one spot. (I can't do it all in the ObjectDataSource event handlers as I can't access the controls inside my Grid's Edit Form.) I've been playing with the ExtractValues and UpdateValues methods of the GridEditableItem object, but I'm not having any luck. Any tips would be greatly appreciated :)

    Read the article

  • Looking for a "light" compositing manager for GNOME

    - by detly
    I have an HP Pavilion DM3 (graphics is nVidia GeForce G105M), running Debian Squeeze with GNOME 2.30. My preference for DE is Gnome + Metacity + Nautilus. I'd like to use Docky, but it requires compositing. So I'm looking for a relatively "light" compositing manager. I realise that "light" is ambiguous, but I basically want something that won't chew through my notebook's batteries because of CPU or GPU usage. I know that Metacity is capable of compositing, but as far as I'm aware it's still testing. Some people report that it's smooth and lightweight, others claim that it eats up processor time. I've also seen references to a problem with nVidia, but no actual details. I'm not averse to Compiz, but I haven't used it before and I don't know what to expect in terms of "weight." And maybe there's something else I haven't heard of. So can anyone recommend anything? Or dispel my idea that Metacity is not the right tool for the job? (Originally posted on GNOME forums.)

    Read the article

  • Extract dates from filename

    - by Newbie
    I have a situation where I need to extract dates from the file names whose general pattern is [filename_]YYYYMMDD[.fileExtension] e.g. "xxx_20100326.xls" or x2v_20100326.csv The below program does the work //Number of charecter in the substring is set to 8 //since the length of YYYYMMDD is 8 public static string ExtractDatesFromFileNames(string fileName) { return fileName.Substring(fileName.IndexOf("_") + 1, 8); } Is there any better option of achieving the same? I am basically looking for standard practice. I am using C#3.0 and dotnet framework 3.5 Edit: I have like the solution and the way of answerig of LC. I have used his program like string regExPattern = "^(?:.*_)?([0-9]{4})([0-9]{2})([0-9]{2})(?:\\..*)?$"; string result = Regex.Match(fileName, @regExPattern).Groups[1].Value; The input to the function is : "x2v_20100326.csv" But the output is: 2010 instead of 20100326(which is the expected one). Can anyone please help.

    Read the article

  • Including non-Python files with setup.py

    - by cool-RR
    How do I make setup.py include a file that isn't part of the code? (Specifically, it's a license file, but it could be any other thing.) I want to be able to control the location of the file. In the original source folder, the file is in the root of the package. (i.e. on the same level as the topmost __init__.py.) I want it to stay exactly there when the package is installed, regardless of operating system. How do I do that?

    Read the article

  • Session Issue only in IE for an ASP .NET application

    - by Siva
    We have migrated our Asp .NET application from Windows 2000 server to Windows 2003 Server when we access the site from Internet explorer we are facing some cache issues like when we click on logout its redirecting to homepage instead of login page but when i try to navigate inside its not allowing me i.e. its throwing me the user id and password is wrong.. i am facing this issue only in IE if i access the same page from Firefox i am not gettiing these kind of issue.. Is this problem related to some IIS settings or some code change is required? please help me in solving this issue...

    Read the article

  • Cruise control merging problem

    - by Maddy
    Hi all, I am using cruise control which generated a particular output which is in text file format.So with the help of nant i am copying this file to another .xml of the same name in some other folder structure and i am using the file merge task which merges this output with my log files.I am also able to see this output merged in my webdashboard.Now i want this same output i.e .xml to be attached in may mail too.So is there anyway i can get this done??At present i dont get anything attached in my mail i.e no errors or warnings attached. Thanks and regards Maddy

    Read the article

  • Is the FoldLeft function available in R?

    - by JSmaga
    Hi, I would like to know if there is an implementation of the foldLeft function (and foldRight?) in R. The language is supposed to be "rather" functional oriented and hence I think there should be something like this, but I could not find it in the documentation. To me, foldLeft function applies on a list and has the following signature: foldLeft[B](z : B)(f : (B, A) => B) : B It is supposed to return the following result: f(... (f(f(z, a0), a1) ...), an) if the list is [a0, a1, ..., an]. (I use the definition of the Scala List API) Does anybody know if such a function exists in R?

    Read the article

  • Adjacency List Tree Using Recursive WITH (Postgres 8.4) instead of Nested Set

    - by Koobz
    I'm looking for a Django tree library and doing my best to avoid Nested Sets (they're a nightmare to maintain). The cons of the adjacency list model have always been an inability to fetch descendants without resorting to multiple queries. The WITH clause in Postgres seems like a solid solution to this problem. Has anyone seen any performance reports regarding WITH vs. Nested Set? I assume the Nested set will still be faster but as long as they're in the same complexity class, I could swallow a 2x performance discrepancy. Django-Treebeard interests me. Does anyone know if they've implemented the WITH clause when running under Postgres? Has anyone here made the switch away from Nested Sets in light of the WITH clause?

    Read the article

  • Redirect subdomain to subdomain on new domain

    - by Ali
    Hello, I own 2 domains sio-india.org and sio-india.com What i want to do is redirect all the subdomains from 1st domain to 2nd domain. eg. home.sio-india.org to home.sio-india.com but i dont want to redirect sio-india.org to sio-india.com and also dont want to redirect www.sio-india.org to www.sio-india.com Please help I am using this code in htaccess but it is not working. RewriteCond %{HTTP_HOST} ^(.*)sio-india\.org$ [NC] RewriteRule ^(.*)$ http://%1sio-india.com/$1 [R=301,L] Please hepl me I am stuck.

    Read the article

  • Visual C# Express 2010: how to set language to C# 2.0

    - by luqui
    I am using Visual C# Express 2010 to develop an application for the Unity3D game engine, which only supports C# 2.0. That is, I am only using it to edit code, but the compilation is done by Unity. I'm wondering if there is a way to configure Visual C# to edit C# 2.0, so that, for example, it yells if I (out of habit) try to use a var declaration or foo => bar function. Thanks!

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >