Daily Archives

Articles indexed Sunday January 9 2011

Page 25/29 | < Previous Page | 21 22 23 24 25 26 27 28 29  | Next Page >

  • CSS - How to Style a Selected Radio Buttons Label?

    - by AnApprentice
    Hello, I want to add a style to a radio button's selected label: HTML: <div class="radio-toolbar"> <label><input type="radio" value="all" checked>All</label> <label><input type="radio" value="false">Open</label> <label><input type="radio" value="true">Archived</label> </div> CSS .radio-toolbar input[type="radio"] {display:none;} .radio-toolbar label { background:Red; border:1px solid green; padding:2px 10px; } .radio-toolbar label + input[type="radio"]:checked { background:pink !important; } Any ideas what I'm doing wrong?

    Read the article

  • Ruby on Rails Problem PotionStore

    - by David Schiefer
    Hello, I am trying to install the PotionStore on my Mac OS X 10.6 server with Ruby on Rails 3 installed. Upon launching the server on port 3000 and pointing safari to this address, I get this: NameError in Store/orderController#index uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn What does this mean? I'm not too advanced with Ruby on Rails, so this throws me a bit.

    Read the article

  • What are some topics you'd like to see covered in an 'Introduction to Network Security' book?

    - by seth.vargo
    I'm trying to put together a list of topics in Network Security and prioritize them accordingly. A little background on the book - we are trying to gear the text towards college students, as an introduction to security, and toward IT professionals who have recently been tasked with securing a network. The idea is to create a book that covers the most vital and important parts of securing a network with no assumptions. So, if you were a novice student interested in network security OR an IT professional who needed a crash course on network security, what topics do you feel would be of the upmost importance in such a text?

    Read the article

  • Total Size of NSMutableArray object

    - by sj wengi
    Hi Folks, I've got an NSMutableArray that holds a bunch of objects, what I'm trying to figure out is how much memory is the array using. After looking at a couple of places I know about the sizeof call, and when I make it I get 32 bits (which is the size of the NSMutableArray object it self). Example code: NSMutableArray *temp = [[NSMutableArray alloc]init]; [temp addObject:objectxyz]; [temp addObject:objectabc]; [temp addObject:object123]; now I want to know the size :) Thanks, Sj

    Read the article

  • Thread-Safe lazy instantiating using MEF

    - by Xaqron
    // Member Variable private static readonly object _syncLock = new object(); // Now inside a static method foreach (var lazyObject in plugins) { if ((string)lazyObject.Metadata["key"] = "something") { lock (_syncLock) { // It seems the `IsValueCreated` is not up-to-date if (!lazyObject.IsValueCreated) lazyObject.value.DoSomething(); } return lazyObject.value; } } Here I need synchronized access per loop. There are many threads iterating this loop and based on the key they are looking for, a lazy instance is created and returned. lazyObject should not be created more that one time. Although Lazy class is for doing so and despite of the used lock, under high threading I have more than one instance created (I track this with a Interlocked.Increment on a volatile static int and log it somewhere). The problem is I don't have access to definition of Lazy and MEF defines how the Lazy class create objects. I should notice the CompositionContainer has a thread-safe option in constructor which is already used. My questions: 1) Why the lock doesn't work ? 2) Should I use an array of locks instead of one lock for performance improvement ?

    Read the article

  • COMET chat application - IIS7 slows down over time

    - by Yaron
    I have built a chat application which uses this code to push messages to clients (web pages) and to monitor online users and their information. Basically, the code creates and manages a custom thread pool for maintaining the list of connected users & their state. The application was hosted on a shared hosting account (IIS6), and worked fine. After moving the site (ASP.Net App) to a dedicated virtual server it seems I have a problem where IIS7 gets slower and slower as time passes, and my only "solution" is to restart IIS. I am trying to look at the performance counters and have do idea on which one to look.

    Read the article

  • I'm annoyed with asp .net mvc action links? Is there something better in MVC3?

    - by Jonathon Kresner
    After almost 3 years with mvc I'm scratching my head. Is it just me, or does the way we specify links in asp .net mvc suck? @Html.ActionLink("Log Off", "LogOff", "Account") In the previews for mvc 1 we had the funky generic action links which gave us intellisense and compile checking, which I LOVED. I know they removed them because of performance issues and because you could not actually guarantee that the route would resolve all the time... However the default way of doing it just doesn't make me feel safe enough in a big application. I've also used T4Mvc with MVC2, to be honest, I didn't really like it. It's not part of the Mvc framework and frustrating to develop with especially with source control in big teams and continuous integration builds. I guess I could also import Mvc Futures and keep using the generic types (it's probably what I'll do). I'm just about to start a very big project and was wondering what other people are thinking? Is anyone else annoyed with the options or has a new solution? It seems like ActionLinks are the most basic & frequently used feature. Shouldn't there be a good out of the box solution, we're just about to hit revision 3 of this framework.

    Read the article

  • Android: How to declare global variables?

    - by niko
    Hi, I am creating an application which requires login. I created the main and the login activity. In the main activity onCreate method I added the following condition: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ... loadSettings(); if(strSessionString == null) { login(); } ... } The onActivityResult method which is executed when the login form terminates looks like this: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch(requestCode) { case(SHOW_SUBACTICITY_LOGIN): { if(resultCode == Activity.RESULT_OK) { strSessionString = data.getStringExtra(Login.SESSIONSTRING); connectionAvailable = true; strUsername = data.getStringExtra(Login.USERNAME); } } } The problem is the login form sometimes appears twice (the login() method is called twice) and also when the phone keyboard slides the login form appears again and I guess the problem is the variable strSessionString. Does anyone know how to set the variable global in order to avoid login form appearing after the user already successfully authenticates? Thanks!

    Read the article

  • Measure data transfer rate over tcp using c#

    - by publicENEMY
    i want to measure current download speed. im sending huge file over tcp. how can i capture the transfer rate every second? if i use IPv4InterfaceStatistics or similar method, instead of capturing the file transfer rate, i capture the device transfer rate. the problem with capturing device transfer rate is that it captures all ongoing data through the network device instead of the single file that i transfer. how can i capture the file transfer rate? im using c#.

    Read the article

  • Variable length argument list - How to understand we retrieved the last argument?

    - by hkBattousai
    I have a Polynomial class which holds coefficients of a given polynomial. One of its overloaded constructors is supposed to receive these coefficients via variable argument list. template <class T> Polynomial<T>::Polynomial(T FirstCoefficient, ...) { va_list ArgumentPointer; va_start(ArgumentPointer, FirstCoefficient); T NextCoefficient = FirstCoefficient; std::vector<T> Coefficients; while (true) { Coefficients.push_back(NextCoefficient); NextCoefficient = va_arg(ArgumentPointer, T); if (/* did we retrieve all the arguments */) // How do I implement this? { break; } } m_Coefficients = Coefficients; } I know that we usually pass an extra parameter which tells the recipient method the total number of parameters, or we pass a sentimental ending parameter. But in order to keep thing short and clean, I don't prefer passing an extra parameter. Is there any way of doing this without modifying the method signature in the example?

    Read the article

  • How can I view my remote desktop that is on a subnet

    - by Noremac
    I have my ubuntu machine at work and I'd like to use remote desktop to work from home. However the remote machine is on a subnet and not directly connected to the internet. I am able to remotely connect through ssh to a server, from which I then ssh to my remote machine. This has been beneficial, however I am currently working on a GUI application so just the command line doesn't work so well. Any ideas? I have tried using ssh with the -X flag on both sessions, but this doesn't work. I am trying to connect from Windows Vista through a Mac server (isn't it a great setup?).

    Read the article

  • Synology DS210j & online backup: what do people recommend?

    - by Dean
    I've just purchased a Synology DS210j for my home network and would like to backup this NAS online. I noticed that DiskStation Manager v2.3 provides various options including Amazon S3 and rsync: Does anybody have some real usage against cost statistics for Amazon's S3 service? How is sensitive data protected on Amazon S3? Are there any rsync online backup options? If so, what do people recommend? UPDATE: I am still unable to find any decent answers to the above questions, can anybody help me out?

    Read the article

  • Accounting setup in freeradius with mikrotik and the "always" module

    - by Matt
    I have a freeradius setup that is being used to provide authentication for users on a wireless network. The access points are all Mikrotik hardware and the users are connected 24/7. We've been using Daloradius with mysql and freeradius 2. The boss wants to use the accounting information and while this is all set up and appears to be working, I've found that not all the accounting information is present. Since our users may be connected for more than 24 hours at a time we keep this in here, it will reset some attributes daily so that the accounting packets work correctly. So he started poking around at this link: http://wiki.mikrotik.com/wiki/RouterOs_MySql_Freeradius#Configuring_RouterOs_for_Radius_.26_PPP.2A_AAA And was looking specifically at the following section. Since our users may be connected for more than 24 hours at a time we keep this in here, it will reset some attributes daily so that the accounting packets work correctly always fail { rcode = fail } always reject { rcode = reject } always ok { rcode = ok simulcount = 0 mpp = no } However, that link references freeradius 1 and I can't find this in the radius.conf file for freeradius 2. What does it do and could it be a reason I'm missing data? EDIT: I have found one issue. We have a backup freeradius server that is also receiving the accounting packets. Although they are replicating, it's only a master/slave configuration. If the slave receives accounting packets it won't replicate them back to the master. Although I suspect this might solve it, the boss is not convinced due to the always module. Is there anything special I need to configure in the mikrotik AP's or freeradius 2 for clients connected 24/7.

    Read the article

  • OpenBSD has open ports in default installation

    - by celil
    I have been considering replacing Ubuntu with OpenBSD to improve the security on my local server. I need to have ssh access to it, and I also need it to serve static web content - so the only ports I need open are 22 and 80. However, when I scan my server for open ports after installing OpenBSD 4.8, and enabling ssh and http at /etc/rc.conf httpd_flags="" sshd_flags="" I discovered that it had several other open ports: Port Scan has started… Port Scanning host: 192.168.56.102 Open TCP Port: 13 daytime Open TCP Port: 22 ssh Open TCP Port: 37 time Open TCP Port: 80 http Open TCP Port: 113 ident ssh (22) and http (80) should be open as I enabled httpd and sshd, but why are the other ports open, and should I worry about them creating additional security vulnerabilities? Should they be open in a default installation?

    Read the article

  • Installation of SQL Server 2008 r2 express - Service accounts

    - by Shimmy
    hello! I am in middle of installing SQL Server 2008 r2 express, where an existing instance has been installed long ago. I need to install a new instance. During the installation I reach a tab where I am supposed to enter accounts for "SQL Server Database Engine" and Browser. The browser is already selected, my question is about the 1st row. What account should I enter? I need to be able to perform SQL queries from SMSS and from my app, thru windows authentication.

    Read the article

  • Simple electric DC question. Current consumption

    - by Bobb
    Suppose you have DC power supply and a consumer connected to it (i.e. computer PSU and a hard drive). Suppose PSU which was supplied with the consumer has output 5V 1A. So I assume that the consumer should not consume more than 1A. Suppose the original PSU is broken now and I want to replace it with the one I have which is 5V 10A. My guess is that current is something which depends on the consumer. So if the consumer consumes normally 1A then it will not consume more than that even if it is connected to 10A PSU. In other word - am I right assuming that the consumer will not burn out being connected to a power supply with higher current output? P.S. my understanding is that voltage is something independent from the consumer. If you give it higher voltage it will burn (voltage is from PSU to the consumer). However current must be in opposite - consumer sucks as much current as it need not as much as PSU can provide (of course given that max PSU current is greater than the consumer needs)

    Read the article

  • How to know ".automaticDestinations-ms" files to which app relates?

    - by Timotei Dolean
    Hello! Does anyone know (Because on microsoft forums nobody answered me), how can I find what app has which automaticDestinations-ms file in %appdata%\microsoft\windows\recent\automaticdestinations ? That's the folder where Windows 7 stores its jump lists, and I want to know how to automatically/programmatic find the relation between each file and an application. At least, even manual I didn't found any pattern, just to look after file extensions in the files, because some programs open files with the same extension (like images), so this method it's not OK for all programs. Do you have any other idea? Maybe knowing the format of those files? Thanks.

    Read the article

  • CodePlex Daily Summary for Sunday, January 09, 2011

    CodePlex Daily Summary for Sunday, January 09, 2011Popular ReleasesEnhSim: EnhSim 2.2.10 BETA: 2.2.10 BETAThis 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 - Removed the part...TweetSharp: 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)AutoLoL: AutoLoL v1.5.2: Implemented the Auto Updater Fix: Your settings will no longer be cleared with new releases of AutoLoL The mastery Editor and Browser now have their own tabs instead of nested tabs The Browser tab will only show the masteries matching ALL filters instead of just one Added a 'Browse' button in the Mastery Editor tab to open the Masteries Directory The Browser tab now shows a message when there are no mastery files in the Masteries Directory Fix: Fixed the Save As dialog again, for ...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.StyleCop for ReSharper: StyleCop for ReSharper 5.1.14980.000: A considerable amount of work has gone into this release: 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 correct path ...VivoSocial: VivoSocial 7.4.1: New release with bug fixes and updates for performance.SSH.NET Library: 2011.1.6: Fixes CommandTimeout default value is fixed to infinite. Port Forwarding feature improvements Memory leaks fixes New Features Add ErrorOccurred event to handle errors that occurred on different thread New and improve SFTP features SftpFile now has more attributes and some operations Most standard operations now available Allow specify encoding for command execution KeyboardInteractiveConnectionInfo class added for "keyboard-interactive" authentication. Add ability to specify bo....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....NET Voice Recorder: Auto-Tune Release: This is the source code and binaries to accompany the article on the Coding 4 Fun website. It is the Auto Tuner release of the .NET Voice Recorder application.BloodSim: BloodSim - 1.3.2.0: - Simulation Log is now automatically disabled and hidden when running 10 or more iterations - Hit and Expertise are now entered by Rating, and include option for a Racial Expertise bonus - Added option for boss to use a periodic magic ability (Dragon Breath) - Added option for boss to periodically Enrage, gaining a Damage/Attack Speed buffAllNewsManager.NET: AllNewsManager.NET 1.2.1: AllNewsManager.NET 1.2.1 It is a minor update from version 1.2xUnit.net - Unit Testing for .NET: xUnit.net 1.7 Beta: xUnit.net release 1.7 betaBuild #1533 Important notes for Resharper users: Resharper support has been moved to the xUnit.net Contrib project. Important note for TestDriven.net users: If you are having issues running xUnit.net tests in TestDriven.net, especially on 64-bit Windows, we strongly recommend you upgrade to TD.NET version 3.0 or later. This release adds the following new features: Added support for ASP.NET MVC 3 Added Assert.Equal(double expected, double actual, int precision)...Json.NET: Json.NET 4.0 Release 1: New feature - Added Windows Phone 7 project New feature - Added dynamic support to LINQ to JSON New feature - Added dynamic support to serializer New feature - Added INotifyCollectionChanged to JContainer in .NET 4 build New feature - Added ReadAsDateTimeOffset to JsonReader New feature - Added ReadAsDecimal to JsonReader New feature - Added covariance to IJEnumerable type parameter New feature - Added XmlSerializer style Specified property support New feature - Added ...ASP .NET MVC CMS (Content Management System): Atomic CMS 2.1.2: Atomic CMS 2.1.2 release notes Atomic CMS installation guide N2 CMS: 2.1: N2 is a lightweight CMS framework for ASP.NET. It helps you build great web sites that anyone can update. Major Changes Support for auto-implemented properties ({get;set;}, based on contribution by And Poulsen) All-round improvements and bugfixes File manager improvements (multiple file upload, resize images to fit) New image gallery Infinite scroll paging on news Content templates First time with N2? Try the demo site Download one of the template packs (above) and open the proj...Mobile Device Detection and Redirection: 0.1.11.10: IMPORTANT CHANGESThis release changes the way some WURFL capabilities and attributes are exposed to .NET developers. If you cast MobileCapabilities to return some values then please read the Release Note before implementing this release. The following code snippet can be used to access any WURFL capability. For instance, if the device is a tablet: string capability = Request.Browser["is_tablet"]; SummaryNew attributes have been added to the redirect section: originalUrlAsQueryString If se...New Projects[OOBL] Projekt: Projekt iz kolegija Objektno Oblikovanje na Fakultetu Elektrotehnike i Racunarstva u Zagrebu.Aikido Glossary Reader: The Aikido Glossary Reader application makes it easier for Aikido students to search for Japanese terms used in martial arts training.AsyncFunc: AsyncFunc makes it easy to implement Event-based Asynchronous Pattern in .NET.BeijingAgricultureScience: ???????????BizTalk 5010 999 Generation: Create 5010 999 acknowledgement from the default 997 Generated by BizTalk ServerCheck if Knowledge Base fix is installed script: A handy script that checks if a knowledge base fix is installed or not.Coproject - rich project management: Coproject is a sample Silverlight application built on WCF RIA Services and Caliburn.Micro framework. It should demonstrate typical scenarios in business applications.DeskNote: DeskNote, makes taking and displaying a notes a lot easier. Have your notes on your desktop, write your notes in a text file and it will be automatically displayed on the desktop. DriveBackup: Are you tired of losing data? And do you sometimes forget to backup your data? Then this program is right for you, one-time setup with each new removable disk and after that Drive Backup instantly backs up your data in the background, without you pushing a button.ELSEngine XNA Game OS Engine: XNA Game Operating System Engine, designed to handle and make easy to use Interface, Interface assets, game screens, menus, controls, and more. Designed to be adaptable to XBOX or Windows, and to ANY style game.FermaProject: Team Ferma ProjectHalfNetworkNET: HalfNetworkNET makes it easier for <target user group> to <activity>. You'll no longer have to <activity>. It's developed in C++/CLILFS Record: LFS Record is a camera animation and video recording tool for Live for Speed users. It doesn't replace programs like Fraps 100%, but in most cases you'll find LFS Record allows a lot more freedom and control. It's developed in C# using WPF .net 4.MPC HC Web remote: A Web interface for Media Player Classic Home Cinema. Designed especialy for smart phones. Tested on Nokia 5800, but in theory it works on all smart phones with wifi & a browser.MSMS2CMP: Very simple application to swap particular strings (MSMS and CMPD number) in .mgf files (results from Mascot search engine used to identify proteins by mass spectrometry data). This might be a kind of example of using Regex and Text File I/OMy Now Playing to Twitter: A Simple WinForm Program that can get what user is playing in Winamp and send a status to Twitter. It's wrote in VB.Net but some source code is port of MiniTwitter(http://minitwitter.codeplex.com)and uses tagLib-sharp library(https://github.com/mono/taglib-sharp)RPM Header for .NET: RPM Header for .NET allows a developer to access the headers of RPM Package Manager files. It's developed in C#.SilverMenu: SilverMenu brings some of the menu functionality of Silverlight for Windows Phone 7 to the XNA world.Smartgrid Smartmeter GRYD: The GRYD smartgrid and Smartmeter project shows features and capabilities like Demand Response, Smart Home Appliance Load Curtailments, DMS integration with SCADA etc. GRYD, Gryd.org is to teach you the technology, this is only for personal use and not commercial use.WakeMeQt: WakeMeQt is a smart alarm for the Nokia n810 (and probably n800) internet tablets. Using a Nintendo Wii remote as the sensor it monitors your movements during sleep and chooses the optimal time to wake you. It's developed in C++ using the Qt framework.WPF SplitButton & MenuButton: This WPF SplitButton and MenuButton implementation aims to be more robust and visual attractive than the other WPF split buttons available on CodePlex and elsewhere. The code is based on David Anson's implementation made available on his blog.Y2XMas: Merry Chirstmas - Happy New Year 2011 software

    Read the article

  • Why does printf report an error on all but three (ASCII-range) Unicode Codepoints, yet is fine with all others?

    - by fred.bear
    The 'printf' I refer to is the standard-issue "program" (not the built-in): /usr/bin/printf I was testing printf out as a viable method of convert a Unicode Codepoint Hex-literal into its Unicoder character representation, I was looking good, and seemed flawless..(btw. the built-in printf can't do this at all (I think)... I then thought to test it at the lower extreme end of the code-spectrum, and it failed with an avalanche of errors.. All in the ASCII range (= 7 bits) The strangest thing was that 3 value printed normally; they are: $ \u0024 @ \u0040 ` \u0060 I'd like to know what is going on here. The ASCII character-set is most definitely part of the Unicode Code-point sequence.... I am puzzled, and still without a good way to bash script this particular converion.. Suggestions are welcome. To be entertained by that same avalanche of errors, paste the following code into a terminal... # Here is one of the error messages # /usr/bin/printf: invalid universal character name \u0041 # ...for them all, run the following script ( for nib1 in {0..9} {A..F}; do for nib0 in {0..9} {A..F}; do [[ $nib1 < A ]] && nl="\n" || nl=" " $(type -P printf) "\u00$nib1$nib0$nl" done done echo )

    Read the article

  • Grub Doesn't Load after Update

    - by Parris
    Hi Everyone, After I updated ubuntu (I believe it was most likely a kernel update) and restarted I selected ubuntu from the windows boot loader (I am using wubi). At this point I would usually land on the grub loader; however, I see something about NTFS file not found and a couple other screens flash then the computer restarts. I have tried pressing ESC right after to try and get some options, but I think grub is just not found or something... Not sure what is going on.. Any help would be much appreciated :). Thanks!

    Read the article

  • python - sys.argv and flag identification

    - by tekknolagi
    when I accept arguments how do I check if two show up at the same time without having a compound conditional i.e. #!/usr/bin/python import random, string import mymodule import sys z = ' '.join(sys.argv[2:]) q = ''.join(sys.argv[3:]) a = ''.join(sys.argv[2:]) s = ' '.join(sys.argv[1:]) flags = sys.argv[1:5] commands = [["-r", "reverse string passed next with no quotes needed."], ["-j", "joins arguments passed into string. no quotes needed."], ["--palindrome", "tests whether arguments passed are palindrome or not. collective."],["--rand","passes random string of 10 digits/letters"]] try: if "-r" in flags: if "-j" in flags: print mymodule.reverse(q) if not "-j" in flags: print mymodule.reverse(z) if "-j" in flags: if not "-r" in flags: print a if "--palindrome" in flags: mymodule.ispalindrome(z) if (not "-r" or not "-j" or not "--palindrome") in flags: mymodule.say(s) if "--rand" in flags: print(''.join([random.choice(string.ascii_letters+"123456789") for f in range(10)])) if not sys.argv[1]: print mymodule.no_arg_error if "--help" in flags: print commands except: print mymodule.no_arg_error i just want to be able to say if "-r" and "-j" in flags in no particular order: do whatever

    Read the article

  • Strange execution of get accesor in c#?

    - by Kenji Kina
    I set up a simple program just to test how the code inside a get accessor executes (since I had been having some issues in another project), and found something quite strange: class Program { static void Main(string[] args) { var test = new TestClass(); var testBool = test.TestBool; } } public class TestClass { private bool _testBool = true; public bool TestBool { get { if (_testBool) { Console.WriteLine("true!"); } else { Console.WriteLine("false! WTF!"); } _testBool = false; return _testBool; } } } I expected the output to be true! But what I got instead was true! false! WTF! Just what is going on here?

    Read the article

  • Ruby Nokogiri uninitialized constant

    - by donald
    `<main>': uninitialized constant Object::Nakogiri (NameError) I get that message when trying to run a simple code (ruby test.rb): require 'rubygems' require 'nokogiri' require 'open-uri' url = "http://www.walmart.com/cp/Baby-Days/1035659?povid=cat14503-env172199-module122910-lLinksptBABY" doc = Nakogiri::HTML(open(url)) puts doc.at_css("title").text I have the gem installed: ~/Code $ gem list --local | grep nokogiri nokogiri (1.4.4, 1.4.3.1)

    Read the article

  • Trimming a vector of strings

    - by dreamlax
    I have an std::vector of std::strings containing data similar to this: [0] = "" [1] = "Abc" [2] = "Def" [3] = "" [4] = "Ghi" [5] = "" [6] = "" How can I get a vector containing the 4 strings from 1 to 4? (i.e. I want to trim all blank strings from the start and end of the vector): [0] = "Abc" [1] = "Def" [2] = "" [3] = "Ghi" Currently, I am using a forward iterator to make my way up to "Abc" and a reverse iterator to make my way back to "Ghi", and then constructing a new vector using those iterators. This method works, but I want to know if there is an easier way to trim these elements. P.S. I'm a C++ noob. Edit Also, I should mention that the vector may be composed entirely of blank strings, in which case a 0-sized vector would be the desired result.

    Read the article

  • Multiple calls to /dev/stdin using python subprocess (*nix)

    - by Alex Leach
    Hi, I have a python subprocess call which I would like to link up to three pipes (two standard in and one standard out). I know that there is only one /dev/stdin, but there's all those other devices in /dev I don't know about, and don't know of any python os, sys or subprocess modules that will utilise them in a manner which allows me to give the device path to subprocess.Popen. The reason I ask is because I would like to pipe information from a mysql database or tar archive rather than a directory structure I currently have which has 28,000 directories in. The directory names alone uses a LOT of space! The alternative is to tar / gunzip the entire directory structure and manoeuvre through the compressed archive. With either solution, mysql or tar, I would still like to have two pipes into subprocess.Popen and one out, so that I can bypass the HDD. Any need for an example??

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29  | Next Page >