Daily Archives

Articles indexed Sunday May 30 2010

Page 16/72 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • In Android OS or Java, what's the difference between a character sequence and a string????

    - by K-RAN
    For the API (Android SDK API version 8) functions whose definitions list character sequence parameters, I can feed the function String instead. Best part is that they work the same way, no hassle, no warnings. Is there a difference between the two types? And more importantly, is there an inherent danger if I send the function a String instead of a character sequence??? Thanks for any clarifications!!! :D

    Read the article

  • What is a good motivating example for dataflow concurrency?

    - by Alex Miller
    I understand the basics of dataflow programming and have encountered it a bit in Clojure APIs, talks from Jonas Boner, GPars in Groovy, etc. I know it's prevalent in languages like Io (although I have not studied Io). What I am missing is a compelling reason to care about dataflow as a paradigm when building a concurrent program. Why would I use a dataflow model instead of a mutable state+threads+locks model (common in Java, C++, etc) or an actor model (common in Erlang or Scala) or something else? In particular, while I know of library support in the languages above (and Scala and Ruby), I don't know of a single program or library that is a poster child user of this model. Who is using it? Why do they find it better than the other models I mentioned?

    Read the article

  • A C# Version of DotNetNuke

    Did you hear the news? You can get DotNetNuke in C# now! What? Say it aint so, DotNetNuke has abandoned VB.NET? Well not quite, the release and production version of DotNetNuke is still in VB.NET, though a kind soul has spent some time lately converting...(read more)...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • javascript - multiple dependent/cascading/chained select boxes on same form

    - by Aaron
    I'm populating select box options via jquery and json but I'm not sure how to address multiple instances of the same chained select boxes within my form. Because the select boxes are only rendered when needed some records will have ten sets of chained select boxes and others will only need one. How does one generate unique selects to support the auto population of secondary select options? Here's the code I'm using, and I thank you in advance for any insight you may provide. <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function populateACD() { $.getJSON('/acd/acd2json.php', {acdSelect:$('#acdSelect').val()}, function(data) { var select = $('#acd2'); var options = select.attr('options'); $('option', select).remove(); $.each(data, function(index, array) { options[options.length] = new Option(array['ACD2']); }); }); } $(document).ready(function() { populateACD(); $('#acdSelect').change(function() { populateACD(); }); }); </script> <?php require_once('connectvars.php'); $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $squery = "SELECT ACD1ID, ACD1 from ACD1"; $sdata = mysqli_query($dbc, $squery); // Loop through the array of ACD1s, placing them into an option of a select echo '<select name="acdSelect" id="acdSelect">'; while ($row = mysqli_fetch_array($sdata)) { echo "<option value=" . $row['ACD1ID'] . ">" . $row['ACD1'] . "</option>\n"; } echo '</select><br /><br />'; <select name="acd2" id="acd2"> </select> acd2json.php <?php $dsn = "mysql:host=localhost;dbname=wfn"; $user = "acd"; $pass = "***************"; $pdo = new PDO($dsn, $user, $pass); $rows = array(); if(isset($_GET['acdSelect'])) { $stmt = $pdo->prepare("SELECT ACD2 FROM ACD2 WHERE ACD1ID = ? ORDER BY ACD2"); $stmt->execute(array($_GET['acdSelect'])); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); } echo json_encode($rows); ?>

    Read the article

  • Visual Studio 2005 and SQL Express 2008

    Hi all, We are having some issues applying the patch for VS 2005 standard: http://www.microsoft.com/downloads/details.aspx?FamilyID=e1109aef-1aa2-408d-aa0f-9df094f993bf&displaylang=en This works fine in profesional edition, but not a machine running standard. We have checked it has all the pre-resequites but no luck at all. The error is saying the patch cannot be applied because another patch is missing, but again, we have checked and checked and checked. Now, the KB article: http://support.microsoft.com/kb/954961 Says Pro and Team editions, no mention of Standard. Judging by how simple it has been to apply this patch to VS 05 pro, and this KB article, we are starting to come to the conlcusion that it is the version. Anyone had this issue? Try as we might we cant find any work around

    Read the article

  • How to force TTPhotoViewController reload image URL in iPhone?

    - by Teerasej
    Hi, everyone. I feel good when I use Three20 framework to create a good iPhone application if you didn't try it before, just go here to try. but the I want your help me to force TTPhotoViewController to reload the image after it initialized. At the moment, it seems load the exist image before and didn't active to viewDidLoad. Could you help me? or give me any advice?

    Read the article

  • iphone sdk 3.0 requirements...

    - by Muhammad Adnan
    I have Mac OS X 10.5.8 and wanted to get its compatible iphone sdk version. i got iphone sdk 3.2 but lllater find out it requires 10.6.2 which i can't get for some reason. i just wanted to know where can i get (exact link if pssible) compatible version of iphone sdk for mac 10.5.8 ... no matter its iphone sdk 3.0 or 3.1 3.2... pls guide.. t hanks

    Read the article

  • Create a popup window in Mediawiki

    - by Karthick
    I am customising the mediawiki for our internal portal. I need to open a popup window on clicking a link in the wikitext. This popup would take information from the mysql database and display a movie clip or a document or something. Anyone knows how this can be done?

    Read the article

  • get all form selected lable

    - by erfaan
    i need to jquery script for show or append all selected lable of chekbox , radio button , options from form to views in page . like andvanced search form , after submit show your selected options in top of result list .

    Read the article

  • Xml files stop being served by IIS6 after allowing .net to process the .xml extension

    - by Brian Surowiec
    I added a route into my site to allow for a sitemap and everything worked fine in IIS7 but once I deployed the route stopped working. Since the live server is running IIS6 I needed to put a new mapping in for .xml to be processed by .net and then it started to work. My issue though is on every other xml file on the site now. I keep getting a 404 error when trying to view xml files, but the sitemap.xml route works. Is this a routing issue or an IIS setup issue? Here are my routes if it will help routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Gallery-Group-View", "Projects/{groupId}", new { controller = "Gallery", action = "GalleryList", groupId = "" }); routes.MapRoute( "Gallery-List-View", "Projects/{groupId}/{galleryId}", new { controller = "Gallery", action = "GalleryView", groupId = "", galleryId = "" }); routes.MapRoute( "Sitemap", "Sitemap.xml", new { controller = "XML", action = "Sitemap" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } );

    Read the article

  • Help required in adding new methods, properties into existing classes dynamically

    - by Bepenfriends
    Hi All, I am not sure whether it is possible to achieve this kind of implementation in Dot Net. Below are the information Currently we are on an application which is done in COM+, ASP, XSL, XML technologies. It is a multi tier architecture application in which COM+ acts as the BAL. The execution steps for any CRUD operation will be defined using a seperate UI which uses XML to store the information. BAL reads the XML and understands the execution steps which are defined and executes corresponding methods in DLL. Much like EDM we have our custom model (using XML) which determines which property of object is searchable, retrievable etc. Based on this information BAL constructs queries and calls procedures to get the data. In the current application both BAL and DAL are heavily customizable without doing any code change. the results will be transmitted to presentation layer in XML format which constructs the UI based on the data recieved. Now I am creating a migration project which deals with employee information. It is also going to follow the N Tier architecture in which the presentation layer communicates with BAL which connects to DAL to return the Data. Here is the problem, In our existing version we are handling every information as XML in its native form (no converstion of object etc), but in the migration project, Team is really interested in utilizing the OOP model of development where every information which is sent from BAL need to be converted to objects of its respective types (example employeeCollection, Address Collection etc). If we have the static number of data returned from BAL we can have a class which contains those nodes as properties and we can access the same. But in our case the data returned from our BAL need to be customized. How can we handle the customization in presentation layer which is converting the result to an Object. Below is an example of the XML returned <employees> <employee> <firstName>Employee 1 First Name</firstName> <lastName>Employee 1 Last Name</lastName> <addresses> <address> <addressType>1</addressType> <StreetName>Street name1</StreetName> <RegionName>Region name</RegionName> <address> <address> <addressType>2</addressType> <StreetName>Street name2</StreetName> <RegionName>Region name</RegionName> <address> <address> <addressType>3</addressType> <StreetName>Street name3</StreetName> <RegionName>Region name</RegionName> <address> <addresses> </employee> <employee> <firstName>Employee 2 First Name</firstName> <lastName>Employee 2 Last Name</lastName> <addresses> <address> <addressType>1</addressType> <StreetName>Street name1</StreetName> <RegionName>Region name</RegionName> <address> <address> <addressType>2</addressType> <StreetName>Street name2</StreetName> <RegionName>Region name</RegionName> <address> <addresses> </employee> </employees> If these are the only columns then i can write a class which is like public class Address{ public int AddressType {get;set;}; public string StreetName {get;set;}; public string RegionName {get;set;}; } public class Employee{ public string FirstName {get; set;} public string LastName {get; set;} public string AddressCollection {get; set;} } public class EmployeeCollection : List<Employee>{ public bool Add (Employee Data){ .... } } public class AddressCollection : List<Address>{ public bool Add (Address Data){ .... } } This class will be provided to customers and consultants as DLLs. We will not provide the source code for the same. Now when the consultants or customers does customization(example adding country to address and adding passport information object with employee object) they must be able to access those properties in these classes, but without source code they will not be able to do those modifications.which makes the application useless. Is there is any way to acomplish this in DotNet. I thought of using Anonymous classes but, the problem with Anonymous classes are we can not have methods in it. I am not sure how can i fit the collection objects (which will be inturn an anonymous class) Not sure about datagrid / user control binding etc. I also thought of using CODEDom to create classes runtime but not sure about the meory, performance issues. also the classes must be created only once and must use the same till there is another change. Kindly help me out in this problem. Any kind of help meterial/ cryptic code/ links will be helpful.

    Read the article

  • A good extension to JSF that adheres to JSF2.0?

    - by Riz
    Hi, I have been looking for a JSF extension (Richfaces, IceFaces, and more) but all seem to be according to JSF1.x and ones for JSF2.0 are still alpha or in development and most of the documentation assumes you're using JSF1.2. Is there any production well known extension available?

    Read the article

  • iPhone Address Book - Actual Addresses

    - by Programasaurus
    I'm trying to retrieve all the addresses from the address book and display them in a tableview, but I am having trouble understanding the structure of the dictionary for which street addresses are returned. Does anyone know of a tutorial or relevant code snippet for extracting the street address(es) of contacts in the AddressBook?

    Read the article

  • Compute weighted averages for large numbers

    - by Travis
    I'm trying to get the weighted average of a few numbers. Basically I have: Price - 134.42 Quantity - 15236545 There can be as few as one or two or as many as fifty or sixty pairs of prices and quantities. I need to figure out the weighted average of the price. Basically, the weighted average should give very little weight to pairs like Price - 100000000.00 Quantity - 3 and more to the pair above. The formula I currently have is: ((price)(quantity) + (price)(quantity) + ...)/totalQuantity So far I have this done: double optimalPrice = 0; int totalQuantity = 0; double rolling = 0; System.out.println(rolling); Iterator it = orders.entrySet().iterator(); while(it.hasNext()) { System.out.println("inside"); Map.Entry order = (Map.Entry)it.next(); double price = (Double)order.getKey(); int quantity = (Integer)order.getValue(); System.out.println(price + " " + quantity); rolling += price * quantity; totalQuantity += quantity; System.out.println(rolling); } System.out.println(rolling); return totalQuantity / rolling; The problem is I very quickly max out the "rolling" variable. How can I actually get my weighted average? Thanks!

    Read the article

  • Does the Microsoft SQL Server native client support IDBAsynchNotify?

    - by Aaron Klotz
    I'm working on some OLE DB code that runs queries on MS SQL Server via ICommand::Execute. I'm converting this code to operate asynchronously by setting the DBPROPVAL_ASYNCH_INITIALIZE property on the command before executing. I'd prefer to register a IDBAsynchNotify sink so that my code can be notified of events, as opposed to polling or blocking via ISSAsynchStatus. The documentation for ICommand::Execute does not show IConnectionPointContainer as an acceptable riid parameter, but the same document, when discussing the DB_S_ASYNCHRONOUS return code, suggests that it is possible to request an IConnectionPointContainer interface that I could use to register my event sink. When I call ICommand::Execute, passing IID_IConnectionPointContainer as the riid parameter, I receive the E_NOINTERFACE error. I also tried setting the DBPROP_IConnectionPointContainer property before Execute but I received the same results. If I have to, I'll use ISSAsynchStatus, but I'd much rather use IDBAsynchNotify. Is it possible?

    Read the article

  • linq select m:n user:groups

    - by cduke
    Hi guys, I've got three tables: cp_user (id, name) cp_group (id, name) cp_usergroup (user_id, group_id) the classical m:n stuff. Assume the following Data: cp_user 1, Paul 2, Steven cp_group 1, Admin 2, Editor cp_usergroup 1, 1 1, 2 2, 2 So Paul is in the Admin AND Editor group, while Steven is just in the Editor group. I want to generate a list like that from the database: Paul Admin Paul Editor Steven Editor Any suggestions? Thanks! Clemens

    Read the article

  • How can I create an automatic svn tagging script?

    - by Eran Betzalel
    I want to create a simple script that tags the latest revision to the tags folder, for example: for Trunk directory head revision 114, it will create a tag of this directory to the Tags directory which goes by the name "r114". I don't really care of what scripting language it'll use (as long as it runs on windows). I tried creating such script using SVN CLI tool, but it failed connecting to a SSL repository. How can I achieve that?

    Read the article

  • Custom constructors for models in Google App Engine (python)

    - by Nikhil Chelliah
    I'm getting back to programming for Google App Engine and I've found, in old, unused code, instances in which I wrote constructors for models. It seems like a good idea, but there's no mention of it online and I can't test to see if it works. Here's a contrived example, with no error-checking, etc.: class Dog(db.Model): name = db.StringProperty(required=True) breeds = db.StringListProperty() age = db.IntegerProperty(default=0) def __init__(self, name, breed_list, **kwargs): db.Model.__init__(**kwargs) self.name = name self.breeds = breed_list.split() rufus = Dog('Rufus', 'spaniel terrier labrador') rufus.put() The **kwargs are passed on to the Model constructor in case the model is constructed with a specified parent or key_name, or in case other properties (like age) are specified. This constructor differs from the default in that it requires that a name and breed_list be specified (although it can't ensure that they're strings), and it parses breed_list in a way that the default constructor could not. Is this a legitimate form of instantiation, or should I just use functions or static/class methods? And if it works, why aren't custom constructors used more often?

    Read the article

  • Is it possible to use Boehm garbage collector only for the part of the program?

    - by bialix
    I've read article in LinuxJournal about Boehm-Demers-Weiser garbage collector library. I'm interesting to use it in my library instead of my own reference counting implementation. I have only one question: is it possible to use gc only for my shared library and still use malloc/free in the main application? I'm not quite understand how gc checks the heap so I'm worrying about performance of gc in that case and possible side effects.

    Read the article

  • Direct2D window black when not in focus

    - by Saul Rennison
    Hi all, I have a Direct2D window which paints fine when in focus; however, when focus moves to another window (same application or another), the entire window goes black. I pinned the issue down to the use of ID2D1HwndRenderTarget::Clear. This function is vital to my application as without it, painting becomes rather... weird. Is there a way an un-focused Direct2D window can paint as normal (note: WM_PAINT is being called as usual, as is Clear, BeginPaint, etc. all without error) Thanks in advance.

    Read the article

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