Daily Archives

Articles indexed Thursday January 13 2011

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

  • Why are UDP messages from outside the network received but not delivered?

    - by Warren Pena
    I have an Ubuntu Server 10.04 application I've developed that receives messages over a UDP port. The ultimate purpose of this application is to receive messages sent from workers' 3G modems out in the field. If use netcat on either another ubuntu Server or my Vista laptop (both on the same LAN as my test machine) to send a message, the message arrives correctly and appears in my application. However, if I go out to my car and use its 3G modem to send a message from the same Vista laptop, it doesn't work. If I run tcpdump -A, I see the message arrive correctly, but it's never delivered to my application. Clearly, the OS is the one making the choice not to deliver the messages (else they wouldn't appear in tcpdump nor would my app receive them when coming from local machines). I have not installed any firewall software on this machine, nor am I aware of anything installed by default that would block the traffic. sudo iptables --list returns Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination I'm not too familiar with iptables, but it looks to me like that's telling it to not do anything. What could be going on that's preventing my messages from being delivered?

    Read the article

  • Can't get my OpenVpn client to connect

    - by Larry
    Hi Guys, I am trying to setup a test vpn between my home desktop and my laptop. So far I have got the server on the desktop to connect fine but I can not get my laptop to finish the connection. I have tried several different configurations and they all give me the same result. Obviously it has nothing to do with my Client configuration but possibly something on my laptop? Here is the message I get in the log when it stops then times out and restarts. Mon Oct 18 20:10:55 2010 UDPv4 link local: [undef] Mon Oct 18 20:10:55 2010 UDPv4 link remote: 74.190.29.236:1194 Mon Oct 18 20:11:55 2010 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity) Mon Oct 18 20:11:55 2010 TLS Error: TLS handshake failed here are my configurations server.ovpn port 1194 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh1024.pem server 10.8.0.1 255.255.255.252 ifconfig-pool-persist ipp.txt push "route 10.0.0.1 255.255.255.0" push "dhcp-option WINS 10.0.0.5" push "dhcp-option DNS 10.0.0.5" push "dhcp-option DOMAIN acme.com.local" keepalive 10 120 comp-lzo max-clients 1 persist-key persist-tun status openvpn-status.log verb 3 LArry.ovpn client proto udp dev tun remote doublel.hopto.org 1194 resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert client1.crt key client1.key comp-lzo verb 3 dev tun local 206.162.148.9 remote 134.28.54.2 ifconfig 192.168.99.1 192.168.99.2 route 10.0.0.0 255.0.0.0 192.168.99.2 I just need a simple vpn for one user. Am I headed down the right path? Thanks, Larry

    Read the article

  • How do I set up failover for a single web server using two ISPs?

    - by Travis
    I have one web server and two WAN connections (1 cable, 1 DSL). DNS is run offsite, and points to the IP address assigned by one of the ISPs. How can I have the second connection take over when the primary one fails? I have seen that it is possible to have two A records, each pointing to a different IP, but it has several problems. What's the real solution to this? I imagine this is a very common issue. Thanks in advance!

    Read the article

  • Software for failover across multiple external hosts

    - by Lin
    I have multiple webservers with the same content, hosted across different providers. However, I can't seem to find a nice, simple failover solution. Load-balancing software (Pound, HAProxy, etc.) are unnecessary, and I need the flexibility to manage over 100+ domains, so the paid DNS failover solutions I've found are too expensive. So far the simplest solution I've thought of is just to set a very low TTL (30min - 1hr) in each zone entry on my nameservers (running BIND). Then, continuously monitor each server, and temporarily remove failed servers from zone entries. But this seems like something that should be currently available. I only have root access to different VPSes running CentOS. Any suggestions? Thanks!

    Read the article

  • DNS Round-robin failover and load balancing

    - by Tom O'Connor
    Having read all of the questions and answers (1 2 3 and so on) on here relating to DNS load balancing, and Round-robin DNS, there's still a number of unanswered questions.. Large companies, and I'm looking at Google, Facebook and Twitter here, do present multiple A records. 1) If DNS loadbalancing/failover is so dodgy, why do large organisations do it? There seems to be very little mention of "DNS Pinning", despite this (PDF) paper about it. 2) Why is DNS Pinning so seldom mentioned? 3) Are there any concrete examples of which ISPs and so on actually do rewrite DNS TTLs? That said, I'm not entirely backing the side for using DNS for failover or any form of load balancing. For most networks, BGP diverse routing still seems to be a better fit. DNS rears it's ugly head again. :(

    Read the article

  • SSH public key authentication -- always require users to generate their own keypair?

    - by schinazi
    I was working with a partner today that I needed to upload files to my server using scp. I have passwords turned off in the server's SSH configuration, so I wanted them to use public key authentication. I generated the keypair for them on the server and gave them the private key and put the public key in the appropriate authorized_keys file. After a bunch of problems with them setting up their job, they finally got a more experienced sysadmin involved on their end, and he scolded me for handling the key generation this way. He said that by giving them a private key generated on my system, I had enabled them to do a brute-force attack against other keys generated on the same server. I even asked him "so if I have an account on a server, and I can log in with a password but I want to automate something and I generate a keypair on that system, does that then give me an attack vector for brute forcing other users' keys?" and he said yes. I've never heard of this, is it true? Can anyone point me to a discussion of this attack? Thanks in advance.

    Read the article

  • Re-Route Mail to a port other than 25

    - by Ken
    Is there a way to route mail to another port? I have an email account attached to my laptop that I'd like to be able to send and receive mail from. Due to mobility, I'll be passing through various networks that will probably block this port. My dynamic DNS provider allows me to utilize web-forwards for MX domains; is this possible? where I can web forward to a domain:port which is managed by my DNS provider when I traverse between networks. If not, is there a way? Of course i could use web-mail or relay-forwarding from my home server, but that's not geeky enough.

    Read the article

  • Windows Server 2008 R2 LDAPS

    - by Chad Moran
    I have a Server 2008 R2 server with ADDS installed. I'm trying to configure HP's ILO utility to connect to it over SSL. I installed the Active Directory Certificate Service, after doing so I'm still not able to connect to LDAP over SSL. I checked the event log and it's showing warnings with Event ID 36886 saying that there aren't default credentials yet. I'm not too sure why this is happening. I haven't done anything with ADCS other than installing the service do I need to create a certificate for the server?

    Read the article

  • Mouse pointer strange problem...

    - by pask
    Hi all, i have last ubuntu installed (10.10), but from an year and thousand updates, video drivers updates, an hundreds of tricks, the mouse pointer is showed like an UGLY square... These are the screenshots: http://www.albertopasca.it/temp/ubuntu_mouse_1.jpg http://www.albertopasca.it/temp/ubuntu_mouse_2.jpg I have no idea what to do to solve this problem. Anyone of you have an idea to solve it? thanks, A

    Read the article

  • How do I access a shared folder using credentials other than the ones I logged in with?

    - by George Sealy
    I have a lab full of Windows 7 machines, and a shared login (user360) that all my students use. I also have a shared folder that they can all have read/write access to (for moving files around easily). My problem is that I also want to be able to create a shared folder for each student for submitting assignments. I can set up a shared folder with permissions for just a single user, and not the 'user360' account. The problem is, when I'm logged in as user360, and I try to open the 'StudentA', Windows never asks me for alternate credentials, it just refuses access because the user360 account is not allowed access. Can anyone suggest a fix for this?

    Read the article

  • How do I exclude directories from my Windows 7 backup?

    - by mattalexx
    I'm setting up a backup for a friend's computer onto his USB drive. I was reading this article about the Windows 7 Backup and Restore feature. Everything looks okay, but for the life of me, I can't figure out how to get to this screen: I need to set up some excluded folders, since the backup media is a little smaller than the home folder. I need to exclude the replaceable 100 GB video directory.

    Read the article

  • Automatically repair network connection when it goes down.

    - by Spines
    Every hour or so my wireless router goes down, and everyone connected loses internet for a couple minutes. If I right click on my network connection and choose repair, I usually get internet back quicker. Is there a way I can automatically have it try to repair the connection once it goes down? Can I write a program to do this if there isn't a built in windows setting? BTW I'm using Windows XP. EDIT:My router is a Linksys WRT110 with Firmware Version: 1.0.04, and I have cable internet. The signal is 100%. I live in an apartment complex and there are about 15 other wifi networks visible to me, not sure if that has any effect.

    Read the article

  • CodePlex Daily Summary for Wednesday, January 12, 2011

    CodePlex Daily Summary for Wednesday, January 12, 2011Popular ReleasesGoogle URL Shortener API for .NET: Google URL Shortener API v1: According follow specification: http://code.google.com/apis/urlshortener/v1/reference.htmljGestures: a jQuery plugin for gesture events: 0.81: added event substitution for IE updated index.htmlStyleCop for ReSharper: StyleCop for ReSharper 5.1.14986.000: A considerable amount of work has gone into this release: Features: Huge focus on performance around the violation scanning subsystem: - caching added to reduce IO operations around reading and merging of settings files - caching added to reduce creation of expensive objects Users should notice condsiderable perf boost and a decrease in memory usage. Bug Fixes: - StyleCop's new ObjectBasedEnvironment object does not resolve the StyleCop installation path, thus it does not return the ...SQL Monitor - tracking sql server activities: SQL Monitor 3.1 beta 1: 1. support alert message template 2. dynamic toolbar commands depending on functionality 3. fixed some bugs 4. refactored part of the code, now more stable and more clean upFacebook C# SDK: 4.2.1: - Authentication bug fixes - Updated Json.Net to version 4.0.0 - BREAKING CHANGE: Removed cookieSupport config setting, now automatic. This download is also availible on NuGet: Facebook FacebookWeb FacebookWebMvcUmbraco CMS: Umbraco 4.6: The Umbraco 4.6 (codename JUNO) release contains many new features focusing on an improved installation experience, a number of robust developer features, and contains nearly 200 bug fixes since the 4.5.2 release. Improved installer experience Updated Starter Kits (Simple, Blog, Personal, Business) Beautiful, free, customizable skins included Skinning engine and Skin customization (see Skinning Documentation Kit) Default dashboards on install with hide option Updated Login timeout ...ArcGIS Editor for OpenStreetMap: ArcGIS Editor for OpenStreetMap 1.1 beta2: This is the beta2 release for the ArcGIS Editor for OpenStreetMap version 1.1. Changes from version 1.0: Multi-part geometries are now supported. Homogeneous relations (consisting of only lines or only polygons) are converted into the appropriate multi-part geometry. Mixed relations and super relations are maintained and tracked in a stand-alone relation table. The underlying editing logic has changed. As opposed to tracking the editing changes upon "Save edit" or "Stop edit" the changes a...Hawkeye - The .Net Runtime Object Editor: Hawkeye 1.2.5: In the case you are running an x86 Windows and you installed Release 1.2.4, you should consider upgrading to this release (1.2.5) as it appears Hawkeye is broken on x86 OS. I apologize for the inconvenience, but it appears Hawkeye 1.2.4 (and probably previous versions) doesn't run on x86 Windows (See issue http://hawkeye.codeplex.com/workitem/7791). This maintenance release fixes this broken behavior. This release comes in two flavors: Hawkeye.125.N2 is the standard .NET 2 build, was compile...Phalanger - The PHP Language Compiler for the .NET Framework: 2.0 (January 2011): Another release build for daily use; it contains many new features, enhanced compatibility with latest PHP opensource applications and several issue fixes. To improve the performance of your application using MySQL, please use Managed MySQL Extension for Phalanger. Changes made within this release include following: New features available only in Phalanger. Full support of Multi-Script-Assemblies was implemented; you can build your application into several DLLs now. Deploy them separately t...EnhSim: EnhSim 2.3.0: 2.3.0This release supports WoW patch 4.03a at level 85 To use this release, you must have the Microsoft Visual C++ 2010 Redistributable Package installed. This can be downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84 To use the GUI you must have the .NET 4.0 Framework installed. This can be downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992 - Changed how flame shoc...AutoLoL: AutoLoL v1.5.3: A message will be displayed when there's an update available Shows a list of recent mastery files in the Editor Tab (requested by quite a few people) Updater: Update information is now scrollable Added a buton to launch AutoLoL after updating is finished Updated the UI to match that of AutoLoL Fix: Detects and resolves 'Read Only' state on Version.xmlTweetSharp: TweetSharp v2.0.0.0 - Preview 7: Documentation for this release may be found at http://tweetsharp.codeplex.com/wikipage?title=UserGuide&referringTitle=Documentation. Note: This code is currently preview quality. Preview 7 ChangesFixes the regression issue in OAuth from Preview 6 Preview 6 ChangesMaintenance release with user reported fixes Preview 5 ChangesMaintenance release with user reported fixes Third Party Library VersionsHammock v1.0.6: http://hammock.codeplex.com Json.NET 3.5 Release 8: http://json.codeplex.comExtended WPF Toolkit: Extended WPF Toolkit - 1.3.0: What's in the 1.3.0 Release?BusyIndicator ButtonSpinner ChildWindow ColorPicker - Updated (Breaking Changes) DateTimeUpDown - New Control Magnifier - New Control MaskedTextBox - New Control MessageBox NumericUpDown RichTextBox RichTextBoxFormatBar - Updated .NET 3.5 binaries and SourcePlease note: The Extended WPF Toolkit 3.5 is dependent on .NET Framework 3.5 and the WPFToolkit. You must install .NET Framework 3.5 and the WPFToolkit in order to use any features in the To...sNPCedit: sNPCedit v0.9d: added elementclient coordinate catcher to catch coordinates select a target (ingame) i.e. your char, npc or monster than click the button and coordinates+direction will be transfered to the selected row in the table corrected labels from Rot to Direction (because it is a vector)Ionics Isapi Rewrite Filter: 2.1 latest stable: V2.1 is stable, and is in maintenance mode. This is v2.1.1.25. It is a bug-fix release. There are no new features. 28629 29172 28722 27626 28074 29164 27659 27900 many documentation updates and fixes proper x64 build environment. This release includes x64 binaries in zip form, but no x64 MSI file. You'll have to manually install x64 servers, following the instructions in the documentation.VivoSocial: VivoSocial 7.4.1: New release with bug fixes and updates for performance.UltimateJB: Ultimate JB 2.03 PL3 KAKAROTO + HERMES + Spoof 3.5: Voici une version attendu avec impatience pour beaucoup : - La version PL3 KAKAROTO intégre ses dernières modification et intégre maintenant le firmware 2.43 !!! Conclusion : - UltimateJB203PSXXXDEFAULTKAKAROTO=> Pas de spoof mais disponible pour les PS3 suivantes : 3.41_kiosk 3.41 3.40 3.30 3.21 3.15 3.10 3.01 2.76 2.70 2.60 2.53 2.43 - UltimateJB203PS341_HERMES => Pas de spoof mais version hermes 4b - UltimateJB203PS341HERMESSPOOF35X => hermes 4b + spoof des firmwares 3.50 et 3.55 au li....NET Extensions - Extension Methods Library for C# and VB.NET: Release 2011.03: Added lot's of new extensions and new projects for MVC and Entity Framework. object.FindTypeByRecursion Int32.InRange String.RemoveAllSpecialCharacters String.IsEmptyOrWhiteSpace String.IsNotEmptyOrWhiteSpace String.IfEmptyOrWhiteSpace String.ToUpperFirstLetter String.GetBytes String.ToTitleCase String.ToPlural DateTime.GetDaysInYear DateTime.GetPeriodOfDay IEnumberable.RemoveAll IEnumberable.Distinct ICollection.RemoveAll IList.Join IList.Match IList.Cast Array.IsNullOrEmpty Array.W...EFMVC - ASP.NET MVC 3 and EF Code First: EFMVC 0.5- ASP.NET MVC 3 and EF Code First: Demo web app ASP.NET MVC 3, Razor and EF Code FirstVidCoder: 0.8.0: Added x64 version. Made the audio output preview more detailed and accurate. If the chosen encoder or mixdown is incompatible with the source, the fallback that will be used is displayed. Added "Auto" to the audio mixdown choices. Reworked non-anamorphic size calculation to work better with non-standard pixel aspect ratios and cropping. Reworked Custom anamorphic to be more intuitive and allow display width to be set automatically (Thanks, Statick). Allowing higher bitrates for 6-ch...New ProjectsASP.NET MVC Scaffolding: Scaffolding package for ASP.NETAstor: OData Explorer: OData ExplorerBasic Users Community: A simple user community with threads and posts.Bukkit Server Manager: BSM makes server managing easy we have multiple type and database support including: MySql, SQLite types: VPS, Dedicated, Home PCCh4CP: Chamber 4 control programDotNetNuke Telerik Library: A set of Telerik wrappers for DotNetNuke module developers to utilize which aren't yet included as of 5.6.1. Eventually this will be offloaded to the core. Enjoy Life: our fypFolderSizeChecker: It suppose to check the size of big folders in specific partition and help user to find the most disk usage location. (It's simple project so please don't expect big and complex algorithms)HomeTeamOnline: This is project of HomeTeamOnlineICSWorld: This is project of ICSWorldIMAP Client for .NET 4.0 using LumiSoft: Develop an IMAP client using this sample project based on the LumiSoft .NET open source project. This project compiles in .NET 4.0 and demonstrates how to pull email using IMAP. The purpose of the project is for email auto processing.MUIExt (Multilingual User Interface Extender): MUIExt makes it easier for SharePoint 2010 users to create multilingual sites. You'll no longer have to live with the MUI limitations or have to manage variations. It's developed in csharp.Phoenix Service Bus: The goal of this pServiceBus is to provide an API and Service Components that would make implementing an ESB Infrastructure in your environment. It's developed in C#, and also have API written for Javascript Clients PhotoSnapper: Home project just to rename photos or .mov files in a folder starting from from a user defined number.redditfier: A windows application to notify redditors with new posts.SharePoint Field Updater: Automatically update sub fields according to a lookup field. For example: Updating field "Contact" will automatically put "Contact Email" and "Address" in the appropriate text fields.TXLCMS: emptyUmbraco Spark engine: Spark macro engine for UmbracoUrdu Translation: Urdu Translation Project WFTestDesign: BizUnit WF is based on BizUnit solution that allows user to define a test using WorkFlow UI, custom activities designed in this extension and general Workflow activities.It's enable also to use breakpoint in test. It's developed in C#.WPF Date Range Slider: A WPF Date Range Slider user control written with C# to allow your users to choose a range of dates using a double thumbed slider control.WPMind Framework for WP7: This project is used to provide some Windows Phone 7 controls for Windows Phone 7 Silverlight developer. Please join us if you are interested in this project.

    Read the article

  • TDD - A question about the approach

    - by k25
    I have a question about TDD. I have always seen the recommendation that we should first write unit tests and then start writing code. But I feel that going the other way is much more comfortable (for me) - write code and then the unit tests, because I feel we have much more clarity after we have written the actual code. If I write the code and then the tests, I may have to change my code a little bit to make it testable, even if I concentrate much on creating a testable design. On the other hand, if I write the tests and then the code, the tests will change pretty frequently as and when the code shapes up. My questions are: 1) As I see a lot of recommendations to start writing tests and then move on to coding, what are the disadvantages if I do it the other way - write code and then the unit tests? 2) Could you please point me to some links that discuss about this or recommend some books (TDD)?

    Read the article

  • Visual Database Design Application

    - by tshauck
    Hi, I'm getting to the point where the applications I write need a little more structure during the planning phase. So I'd like to use some sort of visual tool to design the tables and relationships. I'm on a mac and have tried mysql workbench, but I find it buggy and a bit bloated for my intended use. Is something that I could design in that has a nice interface and is primarily a tool for visual design? Thanks

    Read the article

  • Google CDN - using http vs https

    - by HorusKol
    All the examples of accessing google's CDN use https:// in the URL (including on Google itself) - but this has caused a problem when testing in Safari (certificate problem and also different domain). <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> I have switched to calling it over http instead, but just wondering if this is a mistake or security issue?

    Read the article

  • Collision filtering by object, team

    - by Bill Zimmerman
    Hi, I am looking for a good method to determine which objects will be considered for collision with other objects. My current idea is that each object has the following properties: alwaysCollidesWith = [list of objects that will always trigger a collision check] neverCollidesWith = [lost of objects that will never be considered] teamCollidesWith = [list of objects that will be checked, provided they belong to a different team] For example: -projectiles never have to be checked for collisions with other projectiles -players are always checked for collisions with players, regardless of team -projectiles are only considered for collisions if they collide with another teams players Does anyone see any weaknesses with this approach? Can anyone recommend a better approach?

    Read the article

  • Print "1 followed by googolplex number of zeros" [closed]

    - by Rajan
    Assuming we are not concerned about running time of the program (which is practically infinite for human mortals), we want to print out in base 10, the exact value of 10^(googolplex), one digit at a time (mostly zeros). Describe an algorithm (which can be coded on current day computers), or write a program to do this. Since we cannot practically check the output, so we will rely on collective opinion on the correctness of the program. NOTE : I do not know the solution, or whether a solution exists or not. The problem is my own invention. To those readers who think this is not a CS question... kindly reconsider. This is difficult and bit theoretical but definitely CS.

    Read the article

  • Test existence of xml attribute in as3

    - by matb
    Hi, What is the best method to test the existence of an attribute on an XML object in ActionScript 3 ? http://martijnvanbeek.net/weblog/40/testing_the_existance_of_an_attribute_in_xml_with_as3.html is suggesting to test using if ( node.@test != node.@nonexistingattribute ) and I saw comments suggesting to use: if ( node.hasOwnProperty('@test')) { // attribute qtest exists } But in both case, tests are case sensitive. From the XML Specs : "XML processors should match character encoding names in a case-insensitive way" so I presume attribute name should also be match using a case-insensitive comparison. Thank you

    Read the article

  • Cygwin command not found bad characters found in .bashrc 357\273\277

    - by mytwocents
    Hello, I'm new to Cygwin, I just installed it and attempted to set some simple environment variables. However, when I open the command shell, I get the error "#357\273\277 command not found" I found an article that discusses what the problem is and how to "discover" the hidden bad character: http://mblog.lib.umich.edu/DataDiscussions/archives/2010/01/index.html but I don't know how to resolve the issue by removing the character (which I validated was a problem in my .bashrc file using the od command). I attempted to change the preferences view in Notepad++ to UTF-8 and ANSI to no avail, but the file was not altered at all. Any help would be appreciated...

    Read the article

  • is (StringComparison.)Ordinal the same as InvariantCulture for testing equality?

    - by Tim Lovell-Smith
    From what I read so far, it sounds like these StringComparison types are meant to differ in how they do sorting of strings, if so, does that mean that it does'nt matter which StringComparison you use when doing an equality comparison? string.Equals(a, b, StringComparison....) Extra credit: does it make a difference to the answer if we compare OrdinalIgnoreCase and InvariantCultureIgnoreCase? What is the answer then? Please provide supporting argument and/or references.

    Read the article

  • Layout problem: how to place something on top and bottom?

    - by chow
    I want create a layout, with a horizontal LinearLayout(s) on top and bottom, a ListView fill in middle. How can I define the main.xml. I tried to create a layout with horizontal LinearLayout on top, TextView on bottom, a ListView fill in middle; is ok. But after I modified the bottom TextView to LinearLayout, the bottom LinearLayout disappear. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:textSize="12px" android:text="something here" android:layout_width="50px" android:layout_height="wrap_content" /> <TextView android:textSize="12px" android:text="something here" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="bottom" > <ListView android:id="@+id/listbody" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <LinearLayout android:orientation="horizontal" android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:layout_height="wrap_content" android:layout_width="0dip" android:layout_weight="1" android:textSize="12px" android:text="50%" /> <TextView android:layout_height="wrap_content" android:layout_width="0dip" android:layout_weight="1" android:textSize="12px" android:text="50%" /> </LinearLayout> </LinearLayout> </LinearLayout> Anybody can tell advise? Please help.

    Read the article

  • Boost tuple + transform

    - by JH
    Is it possible to do the following. Say my boost tuple has <String, int> I would like to use std::transform + mem_fun to insert only the String element in a corresponding vector. Is it possible or are we required to use a loop and push_back(get<0) Ie the following doesn't like to compile... (unknown types...) result.resize(storage.size()) std::transform(storage.begin(), storage.end(), result.begin(), std::mem_fun(&boost::get<0>)); Here is an example (trying one of the comments): #include <boost/tuple/tuple.hpp> #include <vector> #include <string> #include <algorithm> int main(int argc, char**argv) { std::vector< boost::tuple<std::string, int> > storage; std::vector< std::string> result; result.resize(storage.size()); std::transform(storage.begin(), storage.end(), result.begin(), &boost::get<0, boost::tuple<std::string, int> >); return 0; } Output: g++ test.cpp /usr/include/boost/tuple/detail/tuple_basic.hpp: In instantiation of `boost::tuples::cons<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, TT>': /usr/include/boost/tuple/detail/tuple_basic.hpp:151: instantiated from `boost::tuples::element<0, boost::tuples::cons<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, TT> >' test.cpp:14: instantiated from here /usr/include/boost/tuple/detail/tuple_basic.hpp:329: error: `boost::tuples::cons<HT, TT>::tail' has incomplete type /usr/include/boost/tuple/detail/tuple_basic.hpp:329: error: invalid use of template type parameter test.cpp: In function `int main(int, char**)': test.cpp:14: error: no matching function for call to `transform(__gnu_cxx::__normal_iterator<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>*, std::vector<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::allocator<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, __gnu_cxx::__normal_iterator<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>*, std::vector<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::allocator<boost::tuples::tuple<std::string, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, __gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, <unresolved overloaded function type>)'

    Read the article

  • De-dupe a list of hundreds of thousands of first name/last name/address/date of birth

    - by Darren
    I have a large data set which I know contains many dupicate records. Basically I have data on first name, last name, different address components and date of birth. I think the best way to do this is to use the name and date of birth as chances are if these things match, it's the same person. There are probably lots of instances where there are slight differences in spelling (like typos missing a single letter) or use of name (ie: some might have a middle initial in first name column) which would be good to account for, but I'm not sure how to approach this. Are there any tools or articles on going about this process? The data is all in a MySQL database and I have a basic proficiency in SQL.

    Read the article

  • How to select from tableA sum of grouped numbers from tableB above their sums average in Oracle?

    - by Nazgulled
    I have data like this: tableA.ID --------- 1 2 3 tableB.ID tableB.NUM -------------------- 1 10 1 15 2 18 3 12 2 15 3 13 1 12 I need to select tableA IDs where the sum of their NUMs in tableB is above the average of all tableA IDs sums. In other words: SUM ID=1 -> 10+15+12 = 37 SUM ID=2 -> 18+12+15 = 45 SUM ID=3 -> 12+13 = 25 AVG ALL IDs -> (37+45+25)/3 = 35 The SELECT must only show ID 1 and 2 because 37 35, 45 35 but 25 < 35. This is my current query which is working fine: SELECT tableA.ID FROM tableA, tableB WHERE tableA.ID = tableB.ID HAVING SUM(tableB.NUM) > ( SELECT AVG(MY_SUM) FROM ( SELECT SUM(tableB.NUM) MY_SUM FROM tableA, tableB WHERE tableA.ID = tableB.ID GROUP BY tableA.ID ) ) GROUP BY tableA.ID But I have a feeling there might be a better way without all those nested SELECTs. Perhaps 2, but 3 feels like too much. I'm probably wrong though. For instance, why can't I do something simple like this: SELECT tableA.ID FROM tableA, tableB WHERE tableA.ID = tableB.ID HAVING SUM(tableB.NUM) > AVG(SUM(tableB.NUM)) GROUP BY tableA.ID Or this: SELECT tableA.ID, SUM(tableB.NUM) MY_SUM FROM tableA, tableB WHERE tableA.ID = tableB.ID HAVING MY_SUM > AVG(MY_SUM) GROUP BY tableA.ID

    Read the article

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