Daily Archives

Articles indexed Thursday January 13 2011

Page 20/37 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How can I build my SQL query from these tables?

    - by vee
    Hi All, I'm thinking of building query from these 2 tables (on SQL Server 2008). I have 2 tables as shown below: Table 1 MemberId . MemberName . Percentage . Amount1 00000001 AAA 1.0 100 00000002 BBB 1.2 800 00000003 ZZZ 1.0 700 Table 2 MemberId . MemberName . Percentage . Amount2 00000002 BBB 1.5 500 00000002 BBB 1.6 100 00000002 BBB 1.6 150 The result I want is MemberId . MemberName . Percentage . Amount . NettAmount 00000001 AAA 1.0 100 100 00000002 BBB 1.2 800 50 <-- 800-(500+100+150) 00000002 BBB 1.5 500 500 00000002 BBB 1.6 650 650 00000003 ZZZ 1.0 700 700 50 comes from 800 in Table1 minus sum of Amount2 in table2 for MemberID=00000002 Plz someone help me to build the query to reach this result. Thank you in advance.

    Read the article

  • C#, Manage concurrency in database access

    - by Goul
    Hi there, I have written a while ago an application used by multiple users to handle trades creation. I haven't done development for some time now and can't remember how I managed the concurrency between the users and so would have liked your advices in term of design. The application was as follow: - One heavy client per user - A single database - Access to the database for each user to insert/update/delete trades - A grid in the application reflecting the trades table. That grid being updated each time someone changes a deal. My questions: 1- Do you confirm I shouldn't care about the connection to the database for each application. Considering that there is a singleton in each, I would expect on connexion per client with no issue. 2- How preventing the concurrency of the accesses? I guess I should lock when modifying the data, however don't remember how to. 3- How to have the grid automatically updated whenever the database is (by another user for example)? Thank you in advance for your help!

    Read the article

  • Using TFS Team Build 2010 to deploy to Dev site and create packages for Staging and Production sites

    - by Kb
    I am trying to configure a TFS Team Build 2010 to perform automatic deployment to development environment and creation of deployment packages for staging and production environment. In the field for MSBuildArguments in the build definition I have: /p:DeployOnBuild=True <br/> /p:DeployTarget=MsDeployPublish <br/> /p:MSDeployPublishMethod=RemoteAgent <br/> /p:CreatePackageOnPublish=True <br/> /p:DeployIISAppPath=devwebsitename<br/> /p:MsDeployServiceUrl=http://deployserver/MsDeployAgentService<br/> /p:UserName=username<br/> /p:Password=password<br/> Automatic deployment of dev web site is ok and I get a package for the web site generated How can I (the same build) get deploy packages for the other environments : Staging and Production? Or am I missing som basic concept here?

    Read the article

  • Silverlight Handle App MouseLeftButtonDown?

    - by user492488
    Hi All, In my silverlight project I have a Context Menu (right click menu) that I want to close it if I click anywhere outside it. I add handler to the click event on App: AddHandler App.Current.RootVisual.MouseLeftButtonDown, AddressOf HideMenu But the problem that: it does not enter the Handler when I click on any other command, or click on the same control that have the context menu, it is enter only when I click on an empty area outside the menu. Thanks.

    Read the article

  • how to get child nodes in xsl

    - by ppp
    here my code- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="ArrayOfLinkEntity" name="bindLink"> <ul> <xsl:for-each select="LinkEntity[ParentLinkId=0]"> <li> <xsl:variable name="linkId" select="LinkId"/> <xsl:variable name="child" select="count(/ArrayOfLinkEntity/LinkEntity[ParentLinkId=$linkId])"/> <xsl:value-of select="$child"/> <xsl:choose> <xsl:when test="($child &gt; 0)"> <a href="#" data-flexmenu="flexmenu1" onclick="javascript:setPageLinkId({$linkId});"> <xsl:value-of select="LinkTitle"/> <img src="../images/down.gif" border="0"/> </a> </xsl:when> <xsl:otherwise > <a href="#" onclick="javascript:setPageLinkId({$linkId});"> <xsl:value-of select="LinkTitle"/> </a> </xsl:otherwise> </xsl:choose> </li> </xsl:for-each> </ul> </xsl:template> </xsl:stylesheet> but I am getting $child=0 always.but there exists children. my xml structure- <ArrayOfLinkEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <LinkEntity> <EntityId>00000000-0000-0000-0000-000000000000</EntityId> <LinkId>1</LinkId> <SequenceNo>1</SequenceNo> <ParentLinkId>0</ParentLinkId> <LinkTitle>Home</LinkTitle> <SubLink /> </LinkEntity> ... </ArrayOfLinkEntity> What should I do? Please suggest.

    Read the article

  • Android.mk - How to assemble and link ARM assembler files

    - by Kim
    Hi, I have some *.cpp source files and some *.s ARM assembler files I want to assemble and link in my Android.mk file (by running ndk-build script). My Android.mk file looks like this: LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_ARM_MODE := arm LOCAL_MODULE := libTestJNI LOCAL_SRC_FILES := Test.cpp TestAS_gas4.s LOCAL_CFLAGS := -DHAVE_CONFIG_H -DFPM_ARM -ffast-math -O3 -DOPT_ARM LOCAL_LDLIBS += -llog include $(BUILD_SHARED_LIBRARY) Unfortunately the .s file is not recognized. ndk-build says: Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup make: ** No rule to make target /cygdrive/c/projects/TestAS_gas4.s', needed by/cygdrive/c/projects/obj/local/armeabi/objs-debug/libTestJNI/TestAS_gas4.o'. Stop. In a "normal" makefile I would have to assemble by using "as" in a rule. How is it done in the Android.mk files? /Kim

    Read the article

  • Is there anything wrong with my Factory class?

    - by Alex
    class PieceFactory { @SuppressWarnings("rawtypes") public Piece createPiece(String pieceType) throws Throwable{ Class pieceClass = Class.forName(pieceType); Piece piece = (Piece) pieceClass.newInstance(); return piece; } } I'm not all used to handling exceptions yet therefore I'm just throwing them, but everywhere I use a method that uses this factory it tells me I have to throw exceptions like throwable. For example, in one of my classes I have a method that instantiates a lot of objects using the method that uses the factory. I can use the method in that class by just throwing the exception, however it won't work if I try to pass a reference to that class to another class and then use the method from there. Then it forces me to try catch the exception. I probably don't need a factory but it seemed interesting and I'd like to try to use patterns. The reason I created the factory was that I have 6 subclasses of Piece and I wan't to use a method to instantiate them by passing the type of subclass I want as an argument to the method.

    Read the article

  • IPv6: Should I have private addresses?

    - by AlReece45
    Right now, we have a rack of servers. Every server right now has at least 2 IP addresses, one for the public interface, another for the private. The servers that have SSL websites on them have more IP addresses. We also have virtual servers, that are configured similarly. Private Network The private range is currently just used for backups and monitoring. Its a gigabit port, the interface usage does not usually get very high. There are other technologies we're considering using that would use this port: iSCSI (implementations usually recommends dedicating an interface to it, which would be yet another IP network), VPN to get access to the private range (something I'd rather avoid) dedicated database servers LDAP centralized configuration (like puppet) centralized logging We don't have any private addresses in our DNS records (only public addresses). For our servers to utilize the correct IP address for the right interface (and not hard code the IP address) probably requires setting up a private DNS server (So now we add 2 different dns entries to 2 different systems). Public Network Our public range has a variety of services include web, email, and ftp. There is a hardware firewall between our network and the "public" network. We have (relatively secure) method to instruct the firewall to open and close administrative access (web interfaces, ssh, etc) for our current IP address. With either solution discussed, the host-based firewalls will be configured as well. The public network currently runs at a dedicated 20Mbps link. There are a couple of legacy servers with fast-ethernet ports, but they are scheduled for decommissioning. All of the other production boxes have at least 2 Gigabit Ethernet ports. The more traffic-heavy servers have 4-6 available (none is using more than the 2 Gigabit ports right now). IPv6 I want to get an IPv6 prefix from our ISP. So at least every "server" has at least one IPv6 interface. We'll still need to keep the IPv4 addressees up and available for legacy clients (web servers and email at the very least). We have two IP networks right now. Adding the public IPv6 address would make it three. Just use IPv6? I'm thinking about just dumping the private IPv4 range and using the IPv6 range as the primary means of all communications. If an interface starts reaching its capacity, utilize the newly free interfaces to create a trunk. It has the advantage that if either the public or private traffic needs to exceed 1Gbps. The traffic for each interface is already analyzed on a regular basis to predict future bandwidth use. In the rare instances where bandwidth unexpected peaks: utilize QoS to ensure traffic (like our limited SSH access) is prioritized correctly so the problem can be corrected (if possible, our WAN is the bottleneck right now). It also has the advantage of not needing to make an entry for every private address. We may have private DNS (or just LDAP), but it'll be much more limited in scope with less entries to duplicate. Summary I'm trying to make this network as "simple" as possible. At the same time, I want to make sure its reliable, upgradeable, scalable, and (eventually) redundant. Having one IPv6 network, and a legacy IPv4 network seems to be the best solution to me. Regarding using assigned IPv6 addresses for both networks, sharing the available bandwidth on one (more trunked if needed): Are there any technical disadvantages (limitations, buffers, scalability)? Are there any other security considerations (asides from firewalls mentioned above) to consider? Are there regulations or other security requirements (like PCI-DSS) that this doesn't meet? Is there typical software for setting up a Linux network that doesn't have IPv6 support yet? (logging, ldap, puppet) Some other thing I didn't consider?

    Read the article

  • Advice on new hardware firewall for a small company server-environment

    - by Mestika
    Hi everyone, My companies currently hardware firewall (an old ZyXEL ZyWALL firewall) and is indeed requiring an update to a new firewall. It is a small company with a similar small server-environment, so the need for a huge, complex and expensive solution isn’t there but a more “straight-forward” firewall, that can provide the necessary security to our systems and block unwanted elements from the core server and only accept access through our one server which is used as an “gateway” between the Internet and our internal network. I haven’t that much experience with hardware firewalls so I’m requesting any good advice and/or knowledge on which products will be suited for our specific need. If you need more information about the specific needs we require, please let me know and I’ll provide them to you. Sincerely - Mestika

    Read the article

  • Windows XP Map drive failed

    - by bajohns
    Greetings, I have a Windows Web Server 2008 VPS and two client machines. One is a Windows 7 box and the other XP. I configured one folder as a share on the 2008 box and attempted to mount it on each of the clients. The catch is it won't work with XP. Same username/password but I get Access granted on the Win 7 but for XP I get: Failure Reason: Unknown user name or bad password. Status: 0xc000006d Any ideas? If this duplicates any other question please refer me but I cannot seem to find the answer.

    Read the article

  • Difference between Xen PV, Xen KVM and HVM?

    - by JP19
    Hi, I know that Xen is usually better than OpenVZ as the provider cannot oversell in Xen. However, what is the difference between Xen PV, Xen KVM and HVM (I was going through this provider's specs? Which one is better for what purposes and why? Edit: For an end-user who will just be hosting websites, which is better? From efficiency or other point of view, is there any advantage of one over the other?

    Read the article

  • Mod_rewrite on Alias directory

    - by crunchline
    I am moving from a WIMP setup to a WAMP setup. My images are on a separate drive. I need a default image served, when a file is not found. Currently it returns a 404 on images not found in the /images directory, and the 404.jpg is displayed for files not found on all the other directories. I tried changing [L] to [PT] but that did not do anything. in httpd.conf Alias /images "D:/images" in .htaccess RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ^.*\.(gif|jpg|png)$ /404.jpg [L]

    Read the article

  • How do I create certificates for both ends of an stunnel connection?

    - by unixman83
    Hi. I am using stunnel to authenticate RDP (Remote Desktop) and I need to verify that a client possesses the proper credentials. So people cannot brute force into the machine. I am also using a bad (outdated) version of RDP that has security vulnerabilities, so stunnel is a must. I will preshare the necessary .pem's between machines. What are the openssl commands I need to create the right .pem files on both the client and on the server? What files need to be shared?

    Read the article

  • Excel formula: can MATCH recognise 'n'&"01", or 'n'&"02 "

    - by Mike
    I have an Excel sheet (source) that has simple ID numbers in column A (01 to 40000). In another sheet (child) I have these same ID numbers in column A but with either an additional 01 or 02 added on; e.g. 0101 or 0102, 250001 or 250002, etc. Therefore this list of ID numbers is nearly twice as long. In column B there are figures. I'm trying to extract the data from column B in the child sheet, and based on whether it has a "01" or a "02" place the figure into either column B or C of the source sheet. My idea is to use INDEX/MATCH, but I'm not sure how the match would be written to take into account the NOT EXACT MATCH of the lookup value. MATCH(A1&"01",child!A1:A100000,). Any tips and links greatly appreciated. Mike.

    Read the article

  • How to avoid tilde ~ in Bash prompt?

    - by Jirka
    Hello! I have set my prompt in bash in a such way that I can use it directly in scp command: My current PS1 string: PS1="\h:\w\n$" And the prompt looks like this: lnx-hladky:/tmp/plugtmp $ What I don't like at all is the fact that $HOME directory is displayed as tilde. Can this be avoided? It's causing problems when switching between different users. Example: lnx-hladky:~/DOC $ Documentation says: \w : the current working directory, with $HOME abbreviated with a tilde \W: the basename of the current working directory, with $HOME abbreviated with a tilde Is there any possibility to avoid $HOME being abbreviated with a tilde? I have found one way around but I feel like it's overcomplicated: PROMPT_COMMAND='echo -ne "\e[4;35m$(date +%T)\e[24m$(whoami)@$(hostname):$(pwd)\e[m\n"' PS1=$ Can anyone propose a better solution? I have a feeling it's not quite OK to run so many commands just to get prompt. (date,whoami,hostname,pwd). Thanks a lot! Jirka

    Read the article

  • Internet Explorer 8 only running as process not application

    - by Lord Peter
    Internet Explorer 8 on XP SP3 starts without browser window. Task manager doesn't show application, but iexplore.exe is listed twice in process window. Process Explorer reports "no visible windows found for this process" when I try to "bring to front" in the iexplore.exe properties dialog. Have reinstalled (twice), full scanned with MBAM/MSSE/SpyBot etc, re-registered ieproxy.dll (another Google-inspired tip!), run without addons (-extoff switch), and still same problem. Recently uninstalled VMWare Player and wondered whether problem related to VM network adapter somehow, but Firefox still works perfectly. This is one of my home machines, not critical, and it is backed up, so I will restore if I have to. But any and all suggestions will be gratefully received. It would be nice to understand what might have happened, and perhaps others may benefit from any knowledge that comes to light.

    Read the article

  • is there a tool that will let me take 'functional screenshots'?

    - by subpixel
    It's one thing to grab screenshots of web sites and return to them for design and interface ideas and inspiration. But increasingly I've found that when I want to examine something that previously caught my eye, the actual web site has since been altered, so I can no longer learn from the code. I wonder: is there a tool available that would allow me to save interfaces in a format that would retain the html/css? Thanks

    Read the article

  • Is there a webproxy via email?

    - by mafutrct
    This is probably a bit weird, and I don't think it exists yet. I'm basically asking for a program that, upon receiving a request via email, downloads a html page and sends it via email, possibly changing the links inside the page into outgoing emails to this program asking for another page. This is certainly one of the most crude ways of accessing the web, and obviously fails at anything beyond the most basic stuff. But it may still be useful to those that can send email, but can't access the web due to company policy or whatever reason. In the (likely) case this does not exist, I'd be interested to write such a proxy.

    Read the article

  • How to learn programming in Kindergarten?

    - by Kinder
    Last time I asked for peer review on a new language called KinderScript, which its Code Division Multiple Access succinct style looked like white noise that saturated two police reviewer's narrow band. The question has only 1 hour life with 38 views shortly after the shouting of shut-up-leave-now. Ok, That's totally off topic. That is not the question. I'm asking a peer review on the design of KinderScript [1], within the context of an intriguing: "How to learn programming in kindergarten?" [1] http://code.google.com/p/ac-me/downloads/detail?name=kinder.pdf&can=2&q= Thanks for any feedback. No police please. I choose this forum to ask because here has not only many professional but also many new leaners. Both views are appreciated.

    Read the article

  • Saving Dragged Dropped items position on postback in asp.net [closed]

    - by Deeptechtons
    Ok i saw many post's on how to serialize the value of dragged items to get hash and they tell how to save them. Now the question is how do i persist the dragged items the next time when user log's in using the has value that i got eg: <ul class="list"> <li id="id_1"> <div class="item ui-corner-all ui-widget ui-widget-content"> </div> </li> <li id="id_2"> <div class="item ui-corner-all ui-widget ui-widget-content"> </div> </li> <li id="id_3"> <div class="item ui-corner-all ui-widget ui-widget-content"> </div> </li> <li id="id_4"> <div class="item ui-corner-all ui-widget"> </div> </li> </ul> which on serialize will give "id[]=1&id[]=2&id[]=3&id[]=4" Now think that i saved it to Sql server database in a single field called SortOrder. Now how do i get the items to these order again ? the code to make these sort is below,without which people didn't know which library i had used to sort and serialize <script type="text/javascript"> $(document).ready(function() { $(".list li").css("cursor", "move"); $(".list").sortable(); }); </script>

    Read the article

  • Should I start making connections even if I'm not ready for a job yet?

    - by James
    The first job is always the hardest to get and I'm not exception. I'm 23 years old and I have no college degree but planned on going to college this year if all goes well (CS of course). I'm self-studying java right now. I know most of the topics related to the language besides the more advanced topics and I'm beginning to look at open source projects. I would like to find a job (at least a part time job) after a year or two when I'll gain more experience and learn more about java technologies and other technologies that interest me. Finding a job will be a bit difficult because most of the people (or a lot of them at least) at my current age already have 2 years or more of experience, so I will be somewhat disadvantaged. Should I start building connections and joining websites such as linkedin ? I never bothered to look into it because I'm not much of a social network person. If I start contributing to open source projects and create personal projects for 2 years could I apply for jobs that require 1-2 years of experience? Does this experience count ?

    Read the article

  • How to set up router with DSL?

    - by NightwishFan
    I have a Verizon DSL connection. I am new to being the one who has to maintain the net. We have the Verizon modem and plugged into it is a belkin router. I did not alter the configuration on either of the devices. We get a net connection, though I have issues joining any form of online game. Some refuse to connect, others are slow. I have read that perhaps I need to use the modem in "bridge mode" to the wireless router? Would that fix my issues? Or do I just have to open ports or something similar. I really have no clue what could be the problem. Could someone advice me how to get this working with Ubuntu?

    Read the article

  • good/bad idea to use email address in php session variable? [closed]

    - by Stephan Hovnanian
    I'm developing some additional functionality for a client's website that uses the email address as a key lookup variable between various databases (email marketing system, internal prospect database, and a third shared DB that helps bridge the gap between the two). I'm concerned that storing a visitor's email address as a $_SESSION variable could lead to security issues (not so much for our site, but for the visitor). Anybody have suggestions or experience on whether this is okay to do, or if there's another alternative out there?

    Read the article

  • how to do partial updates in OpenGL?

    - by Will
    It is general wisdom that you redraw the entire viewport on each frame. I would like to use partial updates; what are the various ways can do that, and what are their pros, cons and relative performance? (Using textures, FBOs, the accumulator buffer, any kind of scissors that can affect swapbuffers etc?) A scenario: a scene with a fair few thousand visible trees; although the textures are mipmapped and they are drawn via VBOs roughly front-to-back with so on, its still a lot of polys. Would streaming a single screen-sized texture be better than throwing them at the screen every frame? You'd have to redraw and recapture them only on camera movement or as often as your wind model updates or whatever, which need not be every frame.

    Read the article

  • C# XML export for Excel table using XmlDocument

    - by Mark
    I am trying to write the following into an XML document: <head> <xml> <x:ExcelWorkbook> <x:ExcelWorksheets> <x:ExcelWorksheet> other code here </x:ExcelWorksheet> </x:ExcelWorksheets> </x:ExcelWorkbook> </xml> </head> However, if I use the following code, it strips out the 'x:'. System.Xml.XmlDocument document = new System.Xml.XmlDocument(); System.Xml.XmlElement htmlNode = document.CreateElement("html"); htmlNode.SetAttribute("xmlns:o", "urn:schemas-microsoft-com:office:office"); htmlNode.SetAttribute("xmlns:x", "urn:schemas-microsoft-com:office:excel"); htmlNode.SetAttribute("xmlns", "http://www.w3.org/TR/REC-html40"); document.AppendChild(htmlNode); System.Xml.XmlElement headNode = document.CreateElement("head"); htmlNode.AppendChild(headNode); headNode.AppendChild( document.CreateElement("xml")).AppendChild( document.CreateElement("x:ExcelWorkbook"))).AppendChild( document.CreateElement("x:ExcelWorksheets")).AppendChild( document.CreateElement("x:ExcelWorksheet")).InnerText="other code here"; How can I stop this from happening? Thanks!

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >