Daily Archives

Articles indexed Wednesday February 23 2011

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

  • C# Inconsistent Accessibility (Multiple Classes)

    - by MattP
    I am getting an Inconsistent Accessibility problem where I have one class that contains a List of another class namespace NS { public class Foo { public Foo() { this.bar = new List<Bar>(); } private List<Bar> bar; } public class Bar { public Bar() { } } } The error is property type NS.Bar is less accessible than property NS.Foo.Bar The structure to the application is each Foo consists of a Dynamic Array (List) of Bar. It's not ecommerce but the best example would be an eCommerce Store-Categories-Products in terms of how the data will be accessed.

    Read the article

  • IE div width + scrollbar

    - by Chris
    I have a modal UI in my web app that necessitates a fixed layout design. After much fussing, I decided absolutely positioned child elements was the way to go. However, I have one div that conditionally requires a vertical scrollbar (if there's too much content). When this scrollbar is added, the width of the div seems to vary between IE 7 and IE 8. IE8 standards mode: IE7 standards mode: I haven't even tested for IE 6, but I'm sure it's even funkier. What's the simplest, least painful way to address this to arrive at a consistent UI in all major browsers?

    Read the article

  • Sending email from Drupal contact form, but GMail marks it as "Forged"

    - by James Shields
    Hi, My Drupal site sends email to a GMail account, but the emails sent all go into the Spam folder, and GMail puts up a bar with the message "This message was likely forged and did not originate from your account." Although I can create a filter to prevent them going to Spam, I want to start sending newsletters, and I suspect they'll have the same problem. I suspect the problem is with the way I've set up either PHP or Drupal to send mail. As far as I know it's just using the sendmail function. I've set the from address to "info@..." where ... is the site domain. Any tips on how I can make set up my outgoing mail so it won't be refused by GMail (and presumably other major mail providers)? Thanks, James

    Read the article

  • Can't set element ID in JavaScript, it's always undefined

    - by Dylaan Alith
    Hi, I want to have a function that generates ID's on the fly for a given jquery object, if it doesn't have one already. These ID's should then be used in future requests. I came up with the code below, but it doesn't work. The ID's are never set. The commented out alert statement below always return undefined. I always pass code like $(this) or $(options.el) as a parameter to substitute 'el'. Initially, the elements do not have explicitly ID set in HTML. Any help would be appreciated, here's the code: getElementId: function(el) { if(undefined == el.attr('id')) { el.attr('id',"anim-"+Math.random().toString().substr(2)); } // alert(el.attr('id')); return el.attr('id'); },

    Read the article

  • C#: How to detect . in string and insert a space after it/How to insert space after n chars?

    - by Sam Gentile
    Suppose I have a long string like "4600airportburlingame150anzablvd.burlingamecalifornia94010". My code is breaking on this string. This is UNUSUAL. 99% of entries will NOT have a period. The CSS in the browser wraps IF there are spaces in the string and there isn't any here. How do I detect the period (".") and insert a space directly after it? Remember 99% of strings will NOT have a period in them. The code has to detect if it has a period and if so, do the insertion, otherwise not. If I determine a maximum string length, how do I insert a space at some length? Thanks

    Read the article

  • multi-row update table with "different" data

    - by kralco626
    I think the best way to explain this is to tell you what I have. I have two tables A and B both have columns Field1 and Field2. However Field 2 is not populated in table B I want to populate field 2 of table B with field 2 of table A where field 1 of table A matches field 1 of table B. something like update tableB set Field2 = tableA.field2 where tablea.field1 = tableb.field1. The reason this may seem so odd and obscure is that I'm tyring to do an inital data load form an old database to a new one. please let me know if you need clarification

    Read the article

  • MySQL Query Ranking

    - by eft0
    Hey there, I have this MySQL query for list a "Vote Ranking" for "Actions" and it work fine, but I want what the "id_user" doesn't repeat, like made a "DISTINCT" in this field. SELECT count(v.id) votos, v.id_action, a.id_user, a.id_user_to, a.action, a.descripcion FROM votes v, actions a WHERE v.id_action = a.id GROUP BY v.id_action ORDER BY votos DESC The result: votes act id_user 3 3 745059251 2 20 1245069513 2 23 1245069513 2 26 100000882722297 2 29 1245069513 2 44 1040560484 2 49 1257441644 2 50 1040560484 The expected result votes act id_user 3 3 745059251 2 20 1245069513 2 26 100000882722297 2 44 1040560484 2 49 1257441644 2 50 1040560484 Thanks in advanced!

    Read the article

  • Trying to edit an entity with data from dropdowns in MVC...

    - by user598352
    Hello! I'm having trouble getting my head around sending multiple models to a view in mvc. My problem is the following. Using EF4 I have a table with attributes organised by category. Couldn't post an image :-( [Have a table called attributes (AttributeTitle, AttributeName, CategoryID) connected to a table called Category (CategoryTitle).] What I want to do is be able to edit an attribute entity and have a dropdown of categories to choose from. I tried to make a custom viewmodel public class AttributeViewModel { public AttributeViewModel() { } public Attribute Attribute { get; set; } public IQueryable<Category> AllCategories { get; set; } } But it just ended up being a mess. <div class="editor-field"> <%: Html.DropDownList("Category", new SelectList((IEnumerable)Model.AllCategories, "CategoryID", "CategoryName")) %> </div> I was getting it back to the controller... [HttpPost] public ActionResult Edit(int AttributeID, FormCollection formcollection) { var _attribute = ProfileDB.GetAttribute(AttributeID); int _selcategory = Convert.ToInt32(formcollection["Category"]); _attribute.CategoryID = (int)_selcategory; try { UpdateModel(_attribute); (<---Error here) ProfileDB.SaveChanges(); return RedirectToAction("Index"); } catch (Exception e) { return View(_attribute); } } I've debugged the code and my _attribute looks correct and _attribute.CategoryID = (int)_selcategory updates the model, but then I get the error. Somewhere here I thought that there should be a cleaner way to do this, and that if I could only send two models to the view instead of having to make a custom viewmodel. To sum it up: I want to edit my attribute and have a dropdown of all of the available categories. Any help much appreciated!

    Read the article

  • Parallel Tasking Concurrency with Dependencies on Python like GNU Make

    - by Brian Bruggeman
    I'm looking for a method or possibly a philosophical approach for how to do something like GNU Make within python. Currently, we utilize makefiles to execute processing because the makefiles are extremely good at parallel runs with changing single option: -j x. In addition, gnu make already has the dependency stacks built into it, so adding a secondary processor or the ability to process more threads just means updating that single option. I want that same power and flexibility in python, but I don't see it. As an example: all: dependency_a dependency_b dependency_c dependency_a: dependency_d stuff dependency_b: dependency_d stuff dependency_c: dependency_e stuff dependency_d: dependency_f stuff dependency_e: stuff dependency_f: stuff If we do a standard single thread operation (-j 1), the order of operation might be: dependency_f -> dependency_d -> dependency_a -> dependency_b -> dependency_e \ -> dependency_c For two threads (-j 2), we might see: 1: dependency_f -> dependency_d -> dependency_a -> dependency_b 2: dependency_e -> dependency_c Does anyone have any suggestions on either a package already built or an approach? I'm totally open, provided it's a pythonic solution/approach. Please and Thanks in advance!

    Read the article

  • Having trouble with php and ajax search function

    - by Andy
    I am still quite new to php/ajax/mysql. In anycase, I'm creating a search function which is returning properly the data I'm looking for. In brief, I have a mysql database set up. A php website that has a search function. I'm now trying to add a link to a mysql database search rather than just showing the results. In my search.php, the echo line is working fine but the $string .= is not returning anything. I'm just trying to get the same as the echo but with the link to the mysql php record. Am I missing something simple? //echo $query; $result = mysqli_query($link, $query); $string = ''; if($result) { if(mysqli_affected_rows($link)!=0) { while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)) { echo '<p> <b>'.$row['title'].'</b> '.$row['post_ID'].'</p>'; $string .= "<p><a href='set-detail.php?recordID=".$row->post_ID."'>".$row->title."</a></p>"; } } else { echo 'No Results for :"'.$_GET['keyword'].'"'; }

    Read the article

  • Excel - Counting unique values that meet multiple criteria

    - by wotaskd
    I'm trying to use a function to count the number of unique cells in a spreadsheet that, at the same time, meet multiple criteria. Given the following example: A B C QUANT STORE# PRODUCT 1 75012 banana 5 orange 6 56089 orange 3 89247 orange 7 45321 orange 2 apple 4 45321 apple In the example above, I need to know how many unique stores with a valid STORE# have received oranges OR apples. In the case above, the result should be 3 (stores 56089, 89247 and 45321). This is how I started to try solving the problem: =SUM(IF(FREQUENCY(B2:B9,B2:B9)>0,1)) The above formula will yield the number of unique stores with a valid store#, but not just the ones that have received oranges or bananas. How can I add that extra criteria?

    Read the article

  • How to cancel click event of container div trigger when click elements which inside container in JQuery!?

    - by qinHaiXiang
    E.g <div class="container"> <div class="inside">I am not fire when click me</div> </div> $('.container').click(function(){ // container do something here }); but,when I click the div inside it also trigger the container's click event because the div is inside the container, so , I need a way to prevent the container event trigger when I click on the inside div! Thank you very much!!

    Read the article

  • Does every browser open a new HTTPSession

    - by user496934
    I am working on a webbased application which has JSP and servlets. In my application, I am binding some objects to sessions like the following code -- HttpSession session = p_req.getSession(); session.setAttribute(DOWNLOAD_With_WARNINGS, downloadMap); Later I am retrieving them using session.getAttribute. I would like to know if every time I open a new browser does it open a new HTTP session. Because , if I do a setAttribute with some value in one browser instance, that change is visible when I do a getAttribute using the other browser instance.

    Read the article

  • Can CSS change the apparent sequence of elements, e.g. using float or position?

    - by ChrisW
    Edit: answer to this question is easy, a simple example of float left and float right. I'd like to float some annotations to the left of a topic using HTML and CSS, for example the 'status' and 'author' annotations shown in the following mockup/image: For semantic reasons, perhaps: I prefer to use CSS instead of a table-based layout In the HTML, the status should appear after the corresponding heading For example: <h1>This is a section title</h1> <div class="status">approved</div> <div class="author">chris</div> <p>This is some text. Lorem ipsum.</p> <p>Lorem ipsum.</p> <h1>Different section title</h1> <div class="status">rejected</div> <p>Lorem ipsum.</p> I'd like the annotations to be after the heading in the HTML, because everything associated with (i.e. the contents of) a topic is usually whatever is after the topic's heading. However I'd like the annotations to be displayed before (to the left of) the heading, as illustrated above. Is this possible? What is the most semantic HTML, and corresponding CSS, that will render as shown above? Would you recommend a table-based layout instead? Even if that means putting the headings in a table cell? It may not be possible; this answer suggests it isn't possible ... but I don't know CSS well enough to say that for sure.

    Read the article

  • no ocijdbc10 in java.library.path

    - by B.Z.B
    Hey all, So I've been plagued by this issue, whenever I try to run my app in eclipse, I get this error. 2011-02-23 09:55:08,388 ERROR (com.xxxxx.services.factory.ServiceInvokerLocal:21) - java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path I've tried following the steps I found here with no luck. I've tried this on a XP VM as well as windows 7 (although in win 7 I get a different error, below) java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path I've made sure my oracle client was ok (by running TOAD) and I also re-added the classes12.jar / ojdbc14.jars to my WEB-INF/lib folder taken directly from my %ORACLE_HOME% folder (also re-added them to the lib path). I've also tried just adding the ojdbc14.jar without the classes12.jar. Any suggestions appreciated. In the XP VM I have my PATH variable set to C:\Program Files\Java\jdk1.6.0_24\bin;C:\ORACLE\product\10.2.0.1\BIN. I'm using Tomcat server 5.0

    Read the article

  • What's your favorite cross domain cookie sharing approach?

    - by Haoest
    I see iframe/p3p trick is the most popular one around, but I personally don't like it because javascript + hidden fields + frame really make it look like a hack job. I've also come across a master-slave approach using web service to communicate (http://www.15seconds.com/issue/971108.htm) and it seems better because it's transparent to the user and it's robust against different browsers. Is there any better approaches, and what are the pros and cons of each?

    Read the article

  • CSS for mobile sometimes reverts back to original

    - by Jessie
    So most of the time my stylesheets appear properly. The standard/original one always works flawlessly, however it seems sometimes the mobile one is disregarded when looked at from a mobile device I have them designated as follows: <link runat="server" href="CustomStyleSheets/Menu.css" rel="stylesheet" type="text/css" /> <link href="CustomStyleSheets/mobile.css" rel="stylesheet" type="text/css" media="only screen and (max-device-width: 799px)" /> I'm using a Droid X to view the page, in portrait mode, so the device width shouldn't be exceeding the max-width specified above, but sometimes, randomly, it still reverts back to the original css page. Any way to keep it from doing so?

    Read the article

  • Selecting rows with references across tables in SQLite 3

    - by ChristianK
    Hey there, I have a problem with a SQLite photo/album database. The database contains 3 tables: Albums id name hide -------------------------- 1 Holiday 2010 1 2 Day Trip 0 Photos id file ----------------- 1 photo1.jpg 2 photo2.jpg 3 photo3.jpg 4 photo4.jpg Relation (connects photos with albums) album photo ----------------- 1 1 1 2 2 3 2 1 A photo can be assigned to zero, one or several albums. Each album has a column 'hide' that indicates, whether the photos of this album should be ignored. I'm trying to find a SELECT query that returns all photos that are not assigned to an album + all the photos that are in albums which are not hidden (i.e. that have their 'hide' value set to 0). I came up with a query that selects photos in visible albums, but I don't know how to include the photos that are not assigned to an album. SELECT file FROM photos, albums, relation WHERE photos.id = relation.photo AND albums.id = relation.album AND albums.hide = 0 This query returns photo3.jpg and the required result would be photo3.jpg photo4.jpg because photo4.jpg is not assigned to album in the Relation table. Do you know how to solve this? Thank you very much for your help!

    Read the article

  • Windows 7 SP1 now available

    - by guybarrette
    I installed the SP1 for Windows 7 yesterday on two machines.  Short story: nothing to report, everything went fine. Looks like this is a “real” service pack meaning that what it does is install all the fixes and updates released since the Windows 7 release.  It does introduce a few new features.  For a complete list, check the “Notable Changes...” document found here. var addthis_pub="guybarrette";

    Read the article

  • Some PowerShell goodness

    - by KyleBurns
    Ever work somewhere where processes dump files into folders to maintain an archive?  Me too and Windows Explorer hates it.  Very often I find myself needing to organize these files into subfolders so that I can go after files without locking up Windows Explorer and my answer used to be to write a program in something like C# to do the job.  These programs will typically enumerate the files in a folder and move each file to a subdirectory named based on a datestamp.  The last such program I wrote had to use lower-level Win32 API calls to perform the enumeration because it appears the standard .Net calls make use of the same method of enumerating the directories that Windows Explorer chokes on when dealing with a large number of entries in a particular directory, so a simple task was accomplished with a lot of code. Of course, this little utility was just something I used to make my life easier and "not a production app", so it was in my local source folder and not source control when my hard drive died.  So... I was getting ready to re-create it and thought it might be a good idea to play with PowerShell a bit - something I had been wanting to do but had not yet met a requirement to make me do it.  The resulting script was amazingly succinct and even building the flexibility for parameterization and adding line breaks for readability was only about 25 lines long.  Here's the code with discussion following: param(     [Parameter(         Mandatory = $false,         Position = 0,         HelpMessage = "Root of the folders or share to archive.  Be sure to end with appropriate path separator"     )]     [String] $folderRoot="\\fileServer\pathToFolderWithLotsOfFiles\",       [Parameter(         Mandatory = $false,         Position = 1     )]     [int] $days = 1 ) dir $folderRoot|?{(!($_.PsIsContainer)) -and ((get-date) - $_.lastwritetime).totaldays -gt $days }|%{     [string]$year=$([string]$_.lastwritetime.year)     [string]$month=$_.lastwritetime.month     [string]$day=$_.lastwritetime.day     $dir=$folderRoot+$year+"\"+$month+"\"+$day     if(!(test-path $dir)){         new-item -type container $dir     }     Write-output $_     move-item $_.fullname $dir } The script starts by declaring two parameters.  The first parameter holds the path to the folder that I am going to be sorting into subdirectories.  The path separator is intended to be included in this argument because I didn't want to mess with determining whether this was local or UNC and picking the right separator in code, but this could be easily improved upon using Path.Combine since PowerShell has access to the full framework libraries.  The second parameter holds a minimum age in days for files to be removed from the root folder.  The script then pipes the dir command through a query to include only files (by excluding containers) and of those, only entries that meet the age requirement based on the last modified datestamp.  For each of those, the datestamp is used to construct a folder name in the format YYYY\MM\DD (if you're in an environment where even a day's worth of files need further divided, you could make this more granular) and the folder is created if it does not yet exist.  Finally, the file is moved into the directory. One of the things that was really cool about using PowerShell for this task is that the new-item command is smart enough to create the entire subdirectory structure with a single call.  In previous code that I have written to do this kind of thing, I would have to test the entire tree leading down to the subfolder I want, leading to a lot of branching code that detracted from being able to quickly look at the code and understand the job it performs. Overall, I have to say I'm really pleased with what has been done making PowerShell powerful and useful.

    Read the article

  • Speaking at Mix11

    - by Dennis Vroegop
    In April Microsoft will hold the next MIX event. MIX was usually targeted at web designers and developers but has grown over the years to be more a general conference focused on the web and devices. In other words: everything the normal consumer might encounter. It’s not your typical developers conference, although you’ll find many developers there as well. But next to the developers you’ll probably run into designers and user experience specialists as well. This year I am proud to say that I will be one of the people presenting there. Together with all the Surface MVP’s in the world (sounds impressive, but there are only 7 of us) we’ll host a panel discussion on all things Surface, NUI and everything else that matches those subjects. Here’s what the abstract says: The Natural User Interface (NUI) is a hot topic that generates a lot of excitement, but there are only a handful of companies doing real innovation with NUIs and most of the practical experience in the NUI style of design and development is limited to a small number of experts. The Microsoft Surface MVPs are a subset of these experts that have extensive real-world experience with Microsoft Surface and other NUI devices. This session is a panel featuring the Microsoft Surface MVPs and an unfiltered discussion with each other and the audience about the state of the art in NUI design and development. We will share our experiences and ideas, discuss what we think NUI will look like in the near future, and back up our statements with cutting-edge demonstrations prepared by the panelists involving combinations of Microsoft Surface 2.0, Kinect, and Windows Phone 7. We, as Surface MVPs think we are more than just Surface oriented. We like to think we are more NUI MVP’s. But since that’s not a technology with Microsoft you can’t actually become a NUI MVP so Surface is the one that comes the closest. We are currently working on the details of our session but believe me: it will blow you away. Several people we talked to have said this could potentially be the best session of Mix. Quite a challenge, but we’re up for it! Of course I won’t be telling you exactly what we’re going to do in Las Vegas but rest assured that when you visit our session you’ll leave with a lot of new ideas and hopefully be inspired to bring into practice what you’ve seen. Even if the technology we’ll show you isn’t readily available yet. So, if you are in Las Vegas between April 12th and 14th, please join Joshua Blake, Neil Roodyn, Rick Barraza, Bart Roozendaal, Josh Santangelo, Nicolas Calvi and myself for some NUI fun! See you in Vegas! Tags van Technorati: mix11,las vegas,surface,nui,kinecct

    Read the article

  • Best server OS for running up-to date software

    - by rjstelling
    I need to configure a server (*nix) that runs our (bespoke) CMS and Applications. In the bast I have defaulted to using Cent OS 5, but I find this difficult to upgrade the software to the versions we require. For example, we need PHP 5.3, but CentOS 5 has 5.2. Updating is fine but breaks something else (normally MySQL support in PHP). Eventually it will get to a situation where I can't upgrade because of missing dependancies and incompatible versions. Error: Missing Dependency: httpd = 2.2.3-43.el5.centos.3 is needed by package httpd-devel-2.2.3-43.el5.centos.3.i386 (updates) Is there a better alternative OS for hassle free updates, I need: Apache 2.2.17 (the development version for apxs) MySQL 5.5.8 PHP 5.3.5

    Read the article

  • Confused about SPF Record setup

    - by Ramon A.
    Hello, I'm confused on how I should set up SPF records for my multiple domains. Here is my configuration: the setup is: (a) domain1.com points to server1 (b) mail.domain1.com points to server2 (c) domain2.com is a vhost in server1 (d) domain3.com is a vhost in server1 (e) and so on.. I want the SPF record to be set up so that domain1.com, domain2.com, domain3.com are authorized to send emails using mail.domain1.com. I'm confused on wether to put the SPF record on each domain, or on the main server only.

    Read the article

  • Query Performance Degrades with High Number of Logical Reads

    - by electricsk8
    I'm using Confio Ignite8 to derive this information, and monitor waits. I have one query that runs frequently, and I notice that on some days there is an extremely high number of logical reads incurred, +300,000,000 for 91,000 executions. On a good day, the logical reads are much lower, 18,000,000 for 94,000 executions. The execution plan for the query utilizes clustered index seeks, and is below. StmtText |--Nested Loops(Inner Join, OUTER REFERENCES:([f].[ParentId])) |--Clustered Index Seek(OBJECT:([StructuredFN].[dbo].[Folder].[PK_Folders] AS [f]), SEEK:([f].[FolderId]=(8125)), WHERE:([StructuredFN].[dbo].[Folder].[DealId] as [f].[DealId]=(300)) ORDERED FORWARD) |--Clustered Index Seek(OBJECT:([StructuredFN].[dbo].[Folder].[PK_Folders] AS [p]), SEEK:([p].[FolderId]=[StructuredFN].[dbo].[Folder].[ParentId] as [f].[ParentId]), WHERE:([StructuredFN].[dbo].[Folder].[DealId] as [p].[DealId]=(300)) ORDERED FORWARD) Output from showstatistics io ... Table 'Folder'. Scan count 0, logical reads 4, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Any ideas on how to troubleshoot where these high logical reads come from on certain days, and others nothing?

    Read the article

  • RHEL 6 vs latest vanilla kernel differences?

    - by Yanko Hernández Álvarez
    What are the differences of the RHEL 6 kernel and the latest kernel.org one? I know RHEL is based on 2.6.32 with some features backported from newer kernels and that it also has other features that are not yet part of the latest vanilla kernel. Is there any comparison of the features of both kernels so I can tell how advanced is the RHEL kernel 6 vs. latest vanilla and vice versa?. It don't have to be the latest kernel at all, but the more recent the vanilla version, the better. What I want to know is: What features I lose/win if I change the RHEL kernel for the latest kernel.org’s one? What features are less matured/developed in the latest vanilla kernel than in RHEL’s (and vice versa)? (I guess KVM virtualization is one of them, but I'm not so sure.) What things (libraries / programs / etc) don’t interact as well with the latest vanilla kernel than with the RHEL’s one? In a related note: Is there ANY way to be as up to date (kernelwise) as possible (using RHEL 6) without loosing too much in the process? (Any way except doing the patching myself, I don’t have the necessary expertise) Any repo I don’t know of? Any alternative? Update: The srpm doesn't include patches (see comments), so that way is not possible. Clarification: I'm interested in how "old" the RHEL kernel gets as time goes by, and to know when the latest upstream kernel includes all the improvements included in the RHEL version.

    Read the article

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