Search Results

Search found 47818 results on 1913 pages for 'super cat'.

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

  • awk and cat - How to ignore multiple lines?

    - by Filipe YaBa Polido
    I need to extract Voip log from a D-Link router, so I've setup a little python script that executes a command in this router via telnet. My script does a "cat /var/log/calls.log" and returns the result, however... it also sends non-important stuff, like the BusyBox banner, etc... How can I ignore lines from 1 to 6 and the last 2 ? This is my current output: yaba@foobar:/stuff$ python calls.py BusyBox v1.00 (2009.04.09-11:17+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. DVA-G3170i/PT # cat /var/call.log 1 ,1294620563,2 ,+351xxx080806 ,xxx530802 ,1 ,3 ,1 DVA-G3170i/PT # exit And I just need: 1 ,1294620563,2 ,+351xxx080806 ,xxx530802 ,1 ,3 ,1 (it can have multiple lines) So that I can save it to a CSV and later to a sql db. Thanks, and sorry my bad english.

    Read the article

  • Methods in super that will be subclassed anyway (Cocoa)

    - by Michael Matheus
    Sorry if this is a repost but I couldn't quite search for it because I can't explain it in a few words. I have a super class with lots of methods but they will always (not all of them) be subclassed. From the super I need to access (read only) those methods. I could either leave the methods in super empty or I could just not type them in super but call them anyway like so [self myMethod] and it will call my subclassed method even if it doesn't exist in super. This works but Xcode gives me an error though. 'superclass' may not respond to '-subclassmethod' What should I do?

    Read the article

  • Why does cat not use options the way I expect UNIX programs to use switches?

    - by Chas. Owens
    I have been a UNIX user for more years than I care to think about, and in that time I have been trained to expect that when contradictory switches are given to a program the last one wins. Recently I have noticed that cat -bn file and cat -nb file both use the -b option (number blank lines) over the -n option (number all lines). I get this behavior on both BSD and Linux, so I don't think it is an implementation quirk. Is this something that is specified somewhere and am I just crazy for expecting the first example to number all lines?

    Read the article

  • Mapping Cassandra Super Columns

    - by Laubstein
    Hello dudes, I guess everybody that played with Cassandra already read this article. I trying to create my schema on CassandraCli, but I am having a lot of problems, can someone guide me to the right way? I am trying to create a similar structure like the Comments column family from the article. In CassandraCli terminal I type: create column family posts with column_type = ‘Super’ and comparator = ‘AsciiType’ and subcomparator = TimeUUIDType; It works fine, there is no doc telling me that if I add a column_metadata attribute those will be for the super columns cause my column family is of type super, i can’t find if it is true so: create column family posts with column_type = ‘Super’ and comparator = ‘AsciiType’ and subcomparator = ‘TimeUUIDType’ and column_metadata = [{column_name:'body'}]; I am trying to create the same as the comment column family of the article, but when i try to populate set posts['post1'][timeuuid()][body] = ‘Hello I am Goku!’; i got: Invalid UUID string: body I guess because i chose the subcomparator be of type timeuuid and the body is a string, it should be a timeuuid, so HOW my columns inside the super column which is the type timeuuid could holds columns with string type names as the comments of the article are created? Thanks

    Read the article

  • Super constructor must be a first statement in Java constructor [closed]

    - by Val
    I know the answer: "we need rules to prevent shooting into your own foot". Ok, I make millions of programming mistakes every day. To be prevented, we need one simple rule: prohibit all JLS and do not use Java. If we explain everything by "not shooting your foot", this is reasonable. But there is not much reason is such reason. When I programmed in Delphy, I always wanted the compiler to check me if I read uninitializable. I have discovered myself that is is stupid to read uncertain variable because it leads unpredictable result and is errorenous obviously. By just looking at the code I could see if there is an error. I wished if compiler could do this job. It is also a reliable signal of programming error if function does not return any value. But I never wanted it do enforce me the super constructor first. Why? You say that constructors just initialize fields. Super fields are derived; extra fields are introduced. From the goal point of view, it does not matter in which order you initialize the variables. I have studied parallel architectures and can say that all the fields can even be assigned in parallel... What? Do you want to use the unitialized fields? Stupid people always want to take away our freedoms and break the JLS rules the God gives to us! Please, policeman, take away that person! Where do I say so? I'm just saying only about initializing/assigning, not using the fields. Java compiler already defends me from the mistake of accessing notinitialized. Some cases sneak but this example shows how this stupid rule does not save us from the read-accessing incompletely initialized in construction: public class BadSuper { String field; public String toString() { return "field = " + field; } public BadSuper(String val) { field = val; // yea, superfirst does not protect from accessing // inconstructed subclass fields. Subclass constr // must be called before super()! System.err.println(this); } } public class BadPost extends BadSuper { Object o; public BadPost(Object o) { super("str"); this. o = o; } public String toString() { // superconstructor will boom here, because o is not initialized! return super.toString() + ", obj = " + o.toString(); } public static void main(String[] args) { new BadSuper("test 1"); new BadPost(new Object()); } } It shows that actually, subfields have to be inilialized before the supreclass! Meantime, java requirement "saves" us from writing specializing the class by specializing what the super constructor argument is, public class MyKryo extends Kryo { class MyClassResolver extends DefaultClassResolver { public Registration register(Registration registration) { System.out.println(MyKryo.this.getDepth()); return super.register(registration); } } MyKryo() { // cannot instantiate MyClassResolver in super super(new MyClassResolver(), new MapReferenceResolver()); } } Try to make it compilable. It is always pain. Especially, when you cannot assign the argument later. Initialization order is not important for initialization in general. I could understand that you should not use super methods before initializing super. But, the requirement for super to be the first statement is different. It only saves you from the code that does useful things simply. I do not see how this adds safety. Actually, safety is degraded because we need to use ugly workarounds. Doing post-initialization, outside the constructors also degrades safety (otherwise, why do we need constructors?) and defeats the java final safety reenforcer. To conclude Reading not initialized is a bug. Initialization order is not important from the computer science point of view. Doing initalization or computations in different order is not a bug. Reenforcing read-access to not initialized is good but compilers fail to detect all such bugs Making super the first does not solve the problem as it "Prevents" shooting into right things but not into the foot It requires to invent workarounds, where, because of complexity of analysis, it is easier to shoot into the foot doing post-initialization outside the constructors degrades safety (otherwise, why do we need constructors?) and that degrade safety by defeating final access modifier When there was java forum alive, java bigots attecked me for these thoughts. Particularly, they dislaked that fields can be initialized in parallel, saying that natural development ensures correctness. When I replied that you could use an advanced engineering to create a human right away, without "developing" any ape first, and it still be an ape, they stopped to listen me. Cos modern technology cannot afford it. Ok, Take something simpler. How do you produce a Renault? Should you construct an Automobile first? No, you start by producing a Renault and, once completed, you'll see that this is an automobile. So, the requirement to produce fields in "natural order" is unnatural. In case of alarmclock or armchair, which are still chair and clock, you may need first develop the base (clock and chair) and then add extra. So, I can have examples where superfields must be initialized first and, oppositely, when they need to be initialized later. The order does not exist in advance. So, the compiler cannot be aware of the proper order. Only programmer/constructor knows is. Compiler should not take more responsibility and enforce the wrong order onto programmer. Saying that I cannot initialize some fields because I did not ininialized the others is like "you cannot initialize the thing because it is not initialized". This is a kind of argument we have. So, to conclude once more, the feature that "protects" me from doing things in simple and right way in order to enforce something that does not add noticeably to the bug elimination at that is a strongly negative thing and it pisses me off, altogether with the all the arguments to support it I've seen so far. It is "a conceptual question about software development" Should there be the requirement to call super() first or not. I do not know. If you do or have an idea, you have place to answer. I think that I have provided enough arguments against this feature. Lets appreciate the ones who benefit form it. Let it just be something more than simple abstract and stupid "write your own language" or "protection" kind of argument. Why do we need it in the language that I am going to develop?

    Read the article

  • Skinning with DotNetNuke 5 Super Stylesheets Layouts - 12 Videos

    In this video tutorial we demonstrate how to use Super Stylesheets in DotNetNuke for quickly and easily designing the layout of your DotNetNuke skin.Super Stylesheets are ideal for both beginner and experienced skin designers, the advantage of Super Stylesheets is that you can easily create a skin layout which works in all browsers without the need to learn complex CSS techniques.We show you how to build a skin from the very beginning using Super Stylesheets.The videos contain:Video 1 - Introduction to the Super Stylesheets DNN Layouts and Initial SetupVideo 2 - Setting Up the Skin Layout Template CodeVideo 3 - Using the ThreeCol-Portal Layout Template for a SkinVideo 4 - How to Add Tokens to the SkinVideo 5 - Setting Background Colors for Content Panes and Creating CSS ContainersVideo 6 - How to Create a Footer Area and Reset the Default StylesVideo 7 - How to Style the Text in the Content, Left and Right PanesVideo 8 - SEO Skin Layouts for DotNetNuke TokensVideo 9 - Creating Several Skin Layouts Using the Layout TemplatesVideo 10 - Further Layout Templates and MultiLayout TemplatesVideo 11 - SEO Layout Template SkinsVideo 12 - Final SEO Positioning of the Skin CodeSkinning with DotNetNuke Super Stylesheets - DNN Layouts Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • bounding java generics by 'super' keyword

    - by mohsenof
    Why I can use 'super' just with wildcards and not with type parameters? for example why in Collection interface they've not written toArray method like this interface Collection"<"T{ public "< S super T S[] toArray(S[] a){ } } (sorry, I don't know how to deal with "<")

    Read the article

  • Python: query a class's parent-class after multiple derivations ("super()" does not work)

    - by henry
    Hi, I have built a class-system that uses multiple derivations of a baseclass (object-class1-class2-class3): class class1(object): def __init__(self): print "class1.__init__()" object.__init__(self) class class2(class1): def __init__(self): print "class2.__init__()" class1.__init__(self) class class3(class2): def __init__(self): print "class3.__init__()" class2.__init__(self) x = class3() It works as expected and prints: class3.__init__() class2.__init__() class1.__init__() Now I would like to replace the 3 lines object.__init__(self) ... class1.__init__(self) ... class2.__init__(self) with something like this: currentParentClass().__init__() ... currentParentClass().__init__() ... currentParentClass().__init__() So basically, i want to create a class-system where i don't have to type "classXYZ.doSomething()". As mentioned above, I want to get the "current class's parent-class". Replacing the three lines with: super(type(self), self).__init__() does NOT work (it always returns the parent-class of the current instance - class2) and will result in an endless loop printing: class3.__init__() class2.__init__() class2.__init__() class2.__init__() class2.__init__() ... So is there a function that can give me the current class's parent-class? Thank you for your help! Henry -------------------- Edit: @Lennart ok maybe i got you wrong but at the moment i think i didn't describe the problem clearly enough.So this example might explain it better: lets create another child-class class class4(class3): pass now what happens if we derive an instance from class4? y = class4() i think it clearly executes: super(class3, self).__init__() which we can translate to this: class2.__init__(y) this is definitly not the goal(that would be class3.__init__(y)) Now making lots of parent-class-function-calls - i do not want to re-implement all of my functions with different base-class-names in my super()-calls.

    Read the article

  • Problems with classes (super new)

    - by user260036
    Hi, I've problems to figure it out what's happening in the following exercise, I'm learning Smalltalk, so I'm newbie. Class Anew ^super new initialize. Ainitialize a:=0. Class Bnew: aParameter |instance| instance := super new. instance b: instance a + aParameter. ^instance Binitialize b:=0. The problem says what happen when the following code is executed: B new:10. But I can't not figure it out why instance variable does not belong to A class. Thanks

    Read the article

  • Python: Why can't I use `super` on a class?

    - by cool-RR
    Why can't I use super to get a method of a class's superclass? Example: Python 3.1.3 >>> class A(object): ... def my_method(self): pass >>> class B(A): ... def my_method(self): pass >>> super(B).my_method Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> super(B).my_method AttributeError: 'super' object has no attribute 'my_method' (Of course this is a trivial case where I could just do A.my_method, but I needed this for a case of diamond-inheritance.) According to super's documentation, it seems like what I want should be possible. This is super's documentation: (Emphasis mine) super() - same as super(__class__, <first argument>) super(type) - unbound super object super(type, obj) - bound super object; requires isinstance(obj, type) super(type, type2) - bound super object; requires issubclass(type2, type) [non-relevant examples redacted]

    Read the article

  • java inheritance keyword super()

    - by gucciv12
    requirement: Given the class 'ReadOnly' with the following behavior: A (protected) integer instance variable named 'val'. A constructor that accepts an integer and assigns the value of the parameter to the instance variable 'val'. A method name 'getVal' that returns the value of 'val'. Write a subclass named 'ReadWrite' with the following additional behavior: Any necessary constructors. a method named 'setVal' that accepts an integer parameter and assigns it the the 'val' instance variable. a method 'isDirty' that returns true if the setVal method was used to override the value of the 'val' variable. Code class ReadWrite extends ReadOnly { super(int val); void setVal(int val){this.val = val;} boolean isDirty() {if (setVal()(return true)) else return false;}} More Hints: ?     You should be using: modified ?     You should be using: private ?     You should be using: public

    Read the article

  • super dealloc error using multiple table view calsses

    - by padatronic
    I am new to Iphone apps and I am trying to build a tab based app. I am attempting to have a table ontop of an image in both tabs. On tab with a table of audio links and the other tab with a table of video links. This has all gone swimmingly, I have created two viewControllers for the two tables. All the code works great apart from to get it to work I have to comment out the super dealloc in the - (void)dealloc {} in the videoTableViewController for the second tab. If I don't I get the error message: FREED(id): message numberOfSectionsInTableView: sent to freed object please help, i have no idea why it is doing this...

    Read the article

  • Python New-style Classes and the Super Function

    - by sfjedi
    This is not the result I expect to see: class A(dict): def __init__(self, *args, **kwargs): self['args'] = args self['kwargs'] = kwargs class B(A): def __init__(self, *args, **kwargs): super(B, self).__init__(args, kwargs) print 'Instance A:', A('monkey', banana=True) #Instance A: {'args': ('monkey',), 'kwargs': {'banana': True}} print 'Instance B:', B('monkey', banana=True) #Instance B: {'args': (('monkey',), {'banana': True}), 'kwargs': {}} I'm just trying to get classes A and B to have consistent values set. I'm not sure why the kwargs are being inserted into the args, but I'm to presume I am either calling init() wrong from the subclass or I'm trying to do something that you just can't do. Any tips?

    Read the article

  • 3ds Max CAT to XNA

    - by user12214
    Has anyone successfully used the CAT bone system in 3ds Max and exported the file into XNA? If so, what was your method of doing so? There are a number of methods of doing this apparently, but the ones I've tried have not worked. I used the Panda Exporter which creates a .X file. This seems to be the latest way of going about this, but when it's loaded in XNA, there is an error saying something about the bone weights. This happens when I export with and without CAT bones.

    Read the article

  • Disable default Gnome Shell Super Key Mapping

    - by soares
    Gnome Shell by default uses the Super (Windows) key to display the activities overview. But I'd prefer to use the Super key to invoke Synapse. Right now I have to press Super+Super+Spacebar in order to invoke Synapse which is annoying (Super+Spacebar is the binding to invoke Synapse). Is there any way to remove the default Gnome Shell mapping? In the keyboard shortcuts system settings, only the Alt+F1 binding appears for the activities overview action.

    Read the article

  • Question about gets and sets and when to use super classes

    - by Nazgulled
    Hi, I have the following get method: public List<PersonalMessage> getMessagesList() { List<PersonalMessage> newList = new ArrayList<PersonalMessage>(); for(PersonalMessage pMessage : this.listMessages) { newList.add(pMessage.clone()); } return newList; } And you can see that if I need to change the implementation from ArrayList to something else, I can easily do it and I just have to change the initialization of newList and all other code that depends on what getMessageList() returns will still work. Then I have this set method: public void setMessagesList(ArrayList<PersonalMessage> listMessages) { this.listMessages = listMessages; } My question is, should I use List instead of `ArrayList in the method signature? I have decided to use ArrayList because this way I can force the implementation I want, otherwise there could be a mess with different types of lists here and there. But I'm not sure if this is the way to go...

    Read the article

  • Friday Fun: Super Mario Bros. Crossover

    - by Mysticgeek
    Friday is finally here and it’s time to waste the afternoon on company time. Today we take a look at a super cool Classic NES Mashup called Super Mario Bros. Crossover. The game is Super Mario Bros. the way you remember it. However, the cool thing is you can switch between different classic NES game characters and use their moves and attacks during game play. Characters like Link, Mega Man, Samus…and more. When you are a different game character you’re shown tips on how to use their moves in the game.   Playing as Link… Between each world you can select a different character which is pretty neat. If you want to play this classic the way you remember it, you can be Mario too. This can be played using your keyboard, but it also supports using a controller, which you can find the instructions for at the link below.   You probably don’t want to bring a controller to work…but it’s cool they give the option. Make sure to turn the volume down on your computer so your boss is none the wiser, and believes your working hard. Play Super Mario Bros. Crossover How To Play Super Mario Bros. Crossover with a Gamepad Similar Articles Productive Geek Tips Friday Fun: Retro Nintendo WallpapersFriday Fun: Get Your Mario OnFriday Fun: Racing Fun with SuperTuxKart RacerHow to Install Windows Applications on Linux Using CrossoverChristmas Fun: De-Stress the Holidays with Online Flash Games TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 How to Add Exceptions to the Windows Firewall Office 2010 reviewed in depth by Ed Bott FoxClocks adds World Times in your Statusbar (Firefox) Have Fun Editing Photo Editing with Citrify Outlook Connector Upgrade Error Gadfly is a cool Twitter/Silverlight app

    Read the article

  • Update: Super Hero

    While I was looking for a completely different article back in 2007, I came across my Super Hero & Super Villain rating... Well, it was time for an update: Your Super Hero results: You are Spider-Man Spider-Man 75% Supergirl 70% Green Lantern 70% Robin 57% The Flash 55% Hulk 50% Catwoman 50% Superman 45% Batman 40% Wonder Woman 40% Iron Man 40% You are intelligent, witty, a bit geeky and have great power and responsibility. Click here to take the Superhero Personality Test

    Read the article

  • Can't bind gnome-do to Super + Space or Ctrl+Alt+Space

    - by johnf
    With today's updates to 12.04 I can no longer bind gnome-do to either ctrl+alt+space or super+space. With 11.10 it wasn't possible to use super+space, on a fresh install of 12.04 super+space was working properly. Today it stopped working, if I try to bind control+alt+space then the controlkey shows up in the keyboard binding as Primary. I am running Unity, which in the past blocked super+space, it seemed to have stopped blocking it on 12.04. It shouldn't affect ctrl+alt+space. Configuring either binding produces the following error in the gnome-do output: libdo-WARNING **: Binding 'space' failed! libdo-WARNING **: Binding 'space' failed! I'm stuck binding to shift+alt+space.

    Read the article

  • Skinning with DotNetNuke 5 Super Stylesheets Layouts - 12 Videos

    In this tutorial we demonstrate how to use Super Stylesheets in DotNetNuke for quickly and easily designing the layout of your DotNetNuke skin. Super Stylesheets are ideal for both beginner and experienced skin designers, the advantage of Super Stylesheets is that you can easily create a skin layout which works in all browsers without the need to learn complex CSS techniques. We show you how to build a skin from the very beginning using Super Stylesheets. The videos contain: Video 1 - Introduction to the Super Stylesheets DNN Layouts and Initial Setup Video 2 - Setting Up the Skin Layout Template Code Video 3 - Using the ThreeCol-Portal Layout Template for a Skin Video 4 - How to Add Tokens to the Skin Video 5 - Setting Background Colors for Content Panes and Creating CSS Containers Video 6 - How to Create a Footer Area and Reset the Default Styles Video 7 - How to Style the Text in the Content, Left and Right Panes Video 8 - SEO Skin Layouts for DotNetNuke Tokens Video 9 - Creating Several Skin Layouts Using the Layout Templates Video 10 - Further Layout Templates and MultiLayout Templates Video 11 - SEO Layout Template Skins Video 12 - Final SEO Positioning of the Skin Code Total Time Length: 97min 53secsDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How do I replicate the Super Key?

    - by joemangrove
    If you use xmonad, xbindkeys, and xdotool to try and remap the 'Menu' key, it does not work perfectly. The 'Menu' key will only emulate the Super key's quick press action, bringing up the application search. If you hold in the 'Menu' key it will not emulate the Super key's hold down action. That is, bring up the launcer with numbers over the applications. How do you make another key on the keyboard act exactly like the Super key?

    Read the article

  • What am I doing wrong with this cat 6 patch panel wiring?

    - by Max Hodges
    top number is transmitter bottom number is remote terminator 12345678 36145278 is this because I could be mixing T568A and T568B wiring? how do I know if my patch cord is A or B? Do I just look at the plug and match it up with the diagram on the back of the panel somehow? EDIT I read that 36145278 indicates a cross over cable, but I'm not trying to make a cross over. Where did I go wrong? I'm guessing the cable plug is T568A but I wired it to the panel using T568B. So I need to redo it as T568A. But in the future how do I know if I cable is A or B? Cheers!

    Read the article

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