Daily Archives

Articles indexed Thursday April 1 2010

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

  • T-SQL String Functions: difference between using Left/Right and Substring and strange behaviour

    - by TheObserver
    I am using SQL Server 2008 & 2005 (Express). I'm trying to extract part of an alpha numeric string from a varchar field. RIGHT(str_field,3) yields null values but substring(str_field, len(str_field)-2, len(str_field)) gives the right value. left(str_field,7) gives the expected values. What gives? I would have thought that RIGHT(str_field,3) and substring(str_field, len(str_field)-2, len(str_field)) are equivalent expressions.

    Read the article

  • what causes a bad token on iPhone- NSLog(@"token:%@",[devToken description]); crashes

    - by Grant M
    I am getting a bad token passed to me in - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken this code crashes on my iPhone but not my clients. - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { NSLog(@"token:%@",[devToken description]); } I think something is wrong with my stored notifications settings on my iPhone but I can't find a way to delete them. deleting the app does not seem to do it.

    Read the article

  • Creating Bitmaps from ARGB strings (in actionscript-3)???

    - by ashenwraith
    Hi, in actionscript 3, what's the fastest way to dump your data (not from a file) into a bitmap for display? I have it working with setPixels and colored rects but that's way too slow/inefficient. Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data? What would be the best/fastest--should I start writing a byte encoder?

    Read the article

  • Inspecting Lucene.NET index with Luke want to replicate NHibernate.Search view

    - by Tim Peel
    Hi, I am trying to put together an index using terms, which I specify as a comma separated list. I want to replicate the display in Luke as seen here: http://ayende.com/Blog/archive/2009/05/03/nhibernate-search-again.aspx But my index value just shows as a single field with the comma separate list value. For example: Tags term,anotherterm When I search my index, it will return results if I search with "term" but will not return anything if I search with "anotherterm" I thought the indexing process would break the comma separate list apart into separate values but this does not seem to be the case. Anyone got any ideas? Thanks

    Read the article

  • Tip 13 : Kill a process using C#, from local to remote

    - by StanleyGu
    1. My first choice is always to try System.Diagnostics to kill a process 2. The first choice works very well in killing local processes. I thought the first choice should work for killing remote process too because process.kill() method is overloaded with second argument of machine name. I pass process name plus remote machine name and call the process.kill() method 3. Unfortunately, it gives me error message of "Feature is not supported for remote machines.". Apparently, you can query but not kill a remote process using Process class in System.Diagnostics. The MSDN library document explicitly states that about Process class: Provides access to local and remote processes and enables you to start and stop local system processes. 4. I try my second choice: using System.Management to kill a process running on a remote machine. Make sure add references to System.Management.dll and System.Management.Instrumentation.dll 5. The second choice works very well in killing a remote process. Just need to make sure the account running your program must be configured to have permission to kill a process running on the remote machine.  

    Read the article

  • C#: Exception to throw when a certain type was expected

    - by cbp
    I know this sort of code is not best practice, but nevertheless in certain situations I find it is a simpler solution: if (obj.Foo is Xxxx) { // Do something } else if (obj.Foo is Yyyy) { // Do something } else { throw new Exception("Type " + obj.Foo.GetType() + " is not handled."); } Anyone know if there is a built-in exception I can throw in this case?

    Read the article

  • Calling a running C# application from VBA

    - by Robert
    I have some VBA code that needs to talk to a running c# application. For what it's worth, the c# application runs as a service, and exposes an interface via .net remoting. I posted a question regarding a specific problem I'm having already (http://stackoverflow.com/questions/2556163/from-vb6-to-net-via-com-and-remoting-what-a-mess) but I think I may have my structure all wrong... So I'm taking a step back - what's the best way to go about doing this? One thing that's worth taking into account is that I want to call into the running application - not just call a precompiled DLL...

    Read the article

  • How do you host multiple public facing websites on a VPS?

    - by Petras
    We host about 30 websites using typical shared hosting plans using ASP.NET and SQL 2000/2005/2008. I am now wondering about hosting all of these websites using our own virtual private server such as http://www.crystaltech.com/vps.aspx This is clearly cheaper but comes with a lot of questions I need answers to: Is the risk of having to keep this VPS server up and running worth it? Until now, the host provider has managed the server and we have not had to worry about crashes, downtime, software patches etc. We are not server administrators, we are programmers, so this is not really our expertise. On the other hand, it may not be hard to learn. When we make a website live, we log in to a domain management control panel and change the primary and secondary name servers to point to our shared web host: Eg ns1.sharedwebhost.com and ns2.sharedwebhost.com These name servers are going to have to change when we have a VPS. I don’t understand anything about how to set this up. Is there some useful info anyone could direct me to? Or is there software we need to install to make the primary and secondary name servers work on our VPS? The control panel we have for shared hosting comes with DNS management like this: What software would I need to install to create this for each site we host at a VPS? The control panel we have for shared hosting also comes with a POP email interface that allows email addresses to be added easily: Is this something that can be easily set up at a VPS so clients can manage their own email addresses? Is there software we need to install to make this work?

    Read the article

  • how to read character from console in c++?

    - by tsubasa
    I'm struggling with reading characters from console in c++. Here is what I tried to do: char x; char y; char z; cout<<"Please enter your string: "; string s; getline(cin,s); istringstream is(s); is>> x >> y >> z; The problem is if the user enter something like this "1 20 100": x will get 1 y will get 2 z will get 0 What I want to get is x = 1; y = 20; z = 100; Anybody has suggestions?

    Read the article

  • JBoss Seam - Jetty - Virtualhosting

    - by Walter White
    Hi all, I am trying to cutback on the memory usage of my server and would like to optimize the architecture. I currently deploy 2 separate web applications to Jetty 6.1.22 that correspond to different virtualhosts. They have pretty much the same application stack except one has fewer components and are styled differently (content, images, css, etc.). If I change my design pattern over to EJB / EAR + 2 WARS embedded, will that lower the memory consumption? Will that give me a single instance of JBoss Seam, Quartz, and all of my components? They must use a different datasource. Thanks, Walter

    Read the article

  • RedDot with Lotus Notes support

    - by fredde
    Hi, First post here in SO. I have a question within the area of CMS (RedDot) and possible integration of some Lotus Notes functionality. I'm very fresh in both areas. From my short research (did not find very much material regarding RedDot) I got the following: Contents in RedDot CMS can be accessed (and modified?) via the RQL API. (basicly xml messages) There exists a API developed for Java (jRQL). Lotus Notes has a developer kit called Lotus Expeditor Toolkit. My vague question is something like this: Is it possible to integrate a some kind of "content approver/manager" or any other useful CMS functionality from Lotus Notes into the RedDot CMS system? In that case I was thinking of using the jRQL and Lotus Expediton Toolkit so that the back end is fully using Java. Or is there any better solution? Regards Fredrik

    Read the article

  • Monads and custom traversal functions in Haskell

    - by Bill
    Given the following simple BST definition: data Tree x = Empty | Leaf x | Node x (Tree x) (Tree x) deriving (Show, Eq) inOrder :: Tree x -> [x] inOrder Empty = [] inOrder (Leaf x) = [x] inOrder (Node root left right) = inOrder left ++ [root] ++ inOrder right I'd like to write an in-order function that can have side effects. I achieved that with: inOrderM :: (Show x, Monad m) => (x -> m a) -> Tree x -> m () inOrderM f (Empty) = return () inOrderM f (Leaf y) = f y >> return () inOrderM f (Node root left right) = inOrderM f left >> f root >> inOrderM f right -- print tree in order to stdout inOrderM print tree This works fine, but it seems repetitive - the same logic is already present in inOrder and my experience with Haskell leads me to believe that I'm probably doing something wrong if I'm writing a similar thing twice. Is there any way that I can write a single function inOrder that can take either pure or monadic functions?

    Read the article

  • How to update maven repository in eclipse?

    - by Stephane Grenier
    Assuming you're already using the m2eclipse plugin, what can you do it doesn't update the dependencies to the latest in your repo. For example, on the command line you can just add the -U flag as in: mvn clean install -U to force the dependencies to be updated. Is there something like this within eclipse since it doesn't always seem to pick up the latest updates.

    Read the article

  • Windows CE Silverlight Setup

    - by jadeWarlord
    Hi All, I have an embedded device,its includes windows CE 6.0 Build 3112.I want to run silverlight application on this device.I downloaded silverlight application,when I want to install it says "Silverlight is not valid application windows CE" so what can i do? Thx.

    Read the article

  • Problem with UITabBar + NavController in secondView viewDidLoad isn't called

    - by pbcoder
    My Application is a Tabbar with a navController in each of it's tabs. Now, the problem is to add a custom info button to the navController in the SecondView. I've created the App in InterfaceBuilder and entered the name of the nib to Load there. If I run my App now, the SecondView is shown, but the problem is, that the viewDidLoad is not called. http://www.freeimagehosting.net/image.php?9d8ed67dcc.png

    Read the article

  • Managing ip6tables (or an alternative firewall) remotely

    - by Matthew Iselin
    I'm working with IPv6 and have run into an issue configuring ip6tables on our main router in order to control what can come into the network. A default DROP rule in the FORWARD section has worked well (obviously leaving ESTABLISHED,RELATED as ACCEPT) to keep internal clients' open ports from being accessed. However, running an ip6tables command for every little change is unwieldy. Whilst we are able to continue creating rules manually, I'm wondering if there's some sort of management interface we could use to create the rules quickly and easily. We're looking to be able to save time working on our firewall as well as providing a simple method for modifying rules for those who will eventually replace us. I know webmin (heavily locked down on our network, naturally) has support for modifying iptables rules, but seemingly no support for ip6tables. Something similar would be fantastic. Alternatively, suggestions for a firewall solution apart from iptables/ip6tables which can be managed remotely wouldn't be out of order. A web interface for management is certainly preferable, even if it is just a wrapper with shiny buttons over the raw config files.

    Read the article

  • SQLAuthority News – MS Access Database is the Way to Go – April 1st Humor

    - by pinaldave
    First of all, today is April 1- April Fool’s Day, so I have written this post for some light entertainment. My friend has just sent me an email about why a person should go for Access Database. For a short background, I used to be an MS Access user once (I will not call myself MS Access DBA), and I must say I had a good time with Database at that time. As time passed by, I moved from MS Access to SQL Server. Well, as for my friend’s email, his reasons considering MS Access usage really made me laugh. MS Access may have a few points where it totally makes sense to use it. However, in the email that I received, there was not a single reason which was valid.  In fact, I thought it is an April 1st joke- just delivered a little earlier. Let us see some of the reasons from that email. Thanks to Mahesh Bhesania for sending this email to me. MS Access comes with lots of free stuff, e.g. MS Excel MS Access is the most preferred desktop database system MS Access can import data from MS Excel and SQL Server MS Access provides a real time database MS Access has a free IDE-to-VB Script MS Access fits well in your hard drive I actually think that the above points are either incorrect beliefs of some users, or someone just wrote them to give some laughter with such inaccurate data. And, for the same reason I decided to browse the Internet and do some research on MS Access database to verify my thoughts. While searching on this subject, I found the following two interesting statements from the site: Microsoft Access Database, Why Choose It? Other software manufacturers are more likely to provide interfaces to MS Access than any other desktop database system Microsoft Access consulting rates are typically lower for Access consultants compared to Oracle or SQL Server consultants The second one is may be the worst reason for you to switch to MS Access if you are already an SQL Server consultant. With this cartoon, have you ever felt like you were one of these chickens at some point in time? I guess that the moment might have just happened before the minute we say “I guess we were on the same page?” Does this mean we are IN the same table, or ON the same table?! (I accept bad joke!) It is All Fools’ Day after all, so just laugh! If you have something funny but non-offensive to share, just  leave your comment here. Reference: Pinal Dave (http://blog.SQLAuthority.com), Cartoon source unknown. Filed under: Software Development, SQL, SQL Authority, SQL Humor, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: MS ACCESS

    Read the article

  • SQLAuthority News – SQL Server Cheat Sheet from MidnightDBA

    - by pinaldave
    When I read the article from MidnightDBA (I should say MidnightDBAs because it is about Jen and Sean) regarding T-SQL for the Absentminded DBA, my natural reaction was that it is a perfect extension. A year ago around the same month, I had created SQL Server Cheatsheet. I have distributed a lot of copies of it since I produced it. In fact, while attending TechMela in Nepal today, I am getting many requests to get copies of SQL Server Cheatsheet. When I checked my RSS feed, I realized that Jen and Sean have a perfect cheat sheet for intermediate level developers. I would like to suggest to all of you to read their post and download the Absentminded DBA’s Cheat Sheet for IntermediateTSQL. It is available in two formats: PDF and Docx. I just love how the members of the community help each other grow. I am fortunate that I have received excellent feedback/corrections and criticism on my blog posts for so many times. Criticism and corrections, after all, are absolutely needed and make a better community as a whole. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: MVP, Pinal Dave, SQL, SQL Authority, SQL Download, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: SQL Cheat Sheet

    Read the article

  • Fluent NHibernate caching with automapping

    - by md1337
    I'm trying to understand how to configure Fluent NHibernate to enable 2nd-level caching for queries, entities, etc... There is very little information online on how to do that. I see it can be achieved by manually mapping the entities but I don't want that. I want to be able to cache all entities and not address the classes individually. How can I do that? Thanks.

    Read the article

  • funny behavior of jquery code

    - by user253530
    Funny thing is that if i delete the comment for alert(data[i].id) the code works. As it is in the example, the string is not concatenated thus i have no options in the select box. Hints? Help? var bookmarkingSites = ''; $.getJSON("php/socialbookmark-get-bookmarking-sites.php",function(data){ for(var i = 0; i < data.length; i++){ //alert( data[i].id); bookmarkingSites += '<option value = \"' + data[i].id + '\">' + data[i].title + '</option>'; } }); <some more code> -------> toAppend += '<td><select name="sb2" id="sb2">'+ '<option value="'+ data.results[i].bookmark +'">' + data.results[i].bookmark +'</option>' + bookmarkingSites + '</select></td>'; <some more code>

    Read the article

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