Search Results

Search found 3022 results on 121 pages for 'loose typing'.

Page 69/121 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • Mission critical embedded language

    - by Moe
    Maybe the question sounds a bit strange, so i'll explain a the background a little bit. Currently i'm working on a project at y university, which will be a complete on-board software for an satellite. The system is programmed in c++ on top of a real-time operating system. However, some subsystems like the attitude control system and the fault detection and a space simulation are currently only implemented in Matlab/Simulink, to prototype the algorithms efficiently. After their verification, they will be translated into c++. The complete on-board software grew very complex, and only a handful people know the whole system. Furthermore, many of the students haven't program in c++ yet and the manual memory management of c++ makes it even more difficult to write mission critical software. Of course the main system has to be implemented in c++, but i asked myself if it's maybe possible to use an embedded language to implement the subsystem which are currently written in Matlab. This embedded language should feature: static/strong typing and compiler checks to minimize runtime errors small memory usage, and relative fast runtime attitude control algorithms are mainly numerical computations, so a good numeric support would be nice maybe some sort of functional programming feature, matlab/simulink encourage you to use it too I googled a bit, but only found Lua. It looks nice, but i would not use it in mission critical software. Have you ever encountered a situation like this, or do you know any language, which could satisfies the conditions? EDIT: To clarify some things: embedded means it should be able to embed the language into the existing c++ environment. So no compiled languages like Ada or Haskell ;)

    Read the article

  • C# with keyword equivalent

    - by oazabir
    There’s no with keyword in C#, like Visual Basic. So you end up writing code like this: this.StatusProgressBar.IsIndeterminate = false; this.StatusProgressBar.Visibility = Visibility.Visible; this.StatusProgressBar.Minimum = 0; this.StatusProgressBar.Maximum = 100; this.StatusProgressBar.Value = percentage; Here’s a work around to this: With.A<ProgressBar>(this.StatusProgressBar, (p) => { p.IsIndeterminate = false; p.Visibility = Visibility.Visible; p.Minimum = 0; p.Maximum = 100; p.Value = percentage; }); Saves you repeatedly typing the same class instance or control name over and over again. It also makes code more readable since it clearly says that you are working with a progress bar control within the block. It you are setting properties of several controls one after another, it’s easier to read such code this way since you will have dedicated block for each control. It’s a very simple one line function that does it: public static class With { public static void A<T>(T item, Action<T> work) { work(item); } } You could argue that you can just do this: var p = this.StatusProgressBar; p.IsIndeterminate = false; p.Visibility = Visibility.Visible; p.Minimum = 0; p.Maximum = 100; p.Value = percentage; But it’s not elegant. You are introducing a variable “p” in the local scope of the whole function. This goes against naming conventions. Morever, you can’t limit the scope of “p” within a certain place in the function.

    Read the article

  • High CPU usage compared to WinXP. Common aps and actions use 100% CPU cycles

    - by Jopower
    I'm running Lubunto 14.04.1 LTS. PC is a 2004 HP ze4200 laptop: 1.8 ghz Celeron M with 1 gb RAM and 80 gb drive. Was running fine on WinXP SP3 and I cleaned the drive off to test Lubuntu 14 LTS. No anti-virus is installed yet. I enabled the CPU resource monitor to see how various programs drag the OS. Using Firefox 31 online right now, I see doing basic functions like openning a new tab and scrolling down a page are using 100% CPU time, ocassionally for 10-30 seconds. In fact some pretty basic aps like Leafnote hit 100% for a second. Wordpad never did that. Lubuntu Software Center locks things up at 100% for 10 seconds. Just typing here shows a 60-80% spike every character. Running the mouse around the screen for 10 seconds results in a sustained 100% load during that time. Right now, if I let the PC rest just idling Firefox and not doing anything with it, CPU use bounces from 20-40% all by itself. WinXP idles at 2-10% and it's considered not good for it to be above 20%... something odd must be happening. Sure, XP will give similar higher CPU cycles with program use, but it's not locking and slogging like this. Lubuntu is supposed to be a light OS and by memory usage it is and I'm happy since this is an old PC maxed for memory upgrades. However, being used to doing some tuning and wary of abnormalities going on in the background, the CPU use indicates things going on that I want to know about and perhaps apply a tweek or two. Recommendations are appreciated. And this 300 point "new tags" restriction bites!

    Read the article

  • Unity 3D (with Nvidia driver) becomes very slow and laggy

    - by Graham
    How can I prevent my Unity 3D desktop from becoming slow after a while, given that I have an Nvidia Quadro NVS 290 graphics in TwinView mode? The desktop starts out fast on login, but becomes slow / lagging / hesitant / high latency after a while, symptoms being spikes in CPU usage by /usr/bin/X whenever I cause any graphical activity with the mouse or keyboard (e.g. typing, changing tabs, dragging windows). The desktop remains slow even with all windows (except htop in Terminal) and extraneous processes killed. Detail: Changing tabs in Terminal takes about a second, and X spikes to 76% CPU. As I type into Firefox, X spikes to 95% CPU. Dragging Termiinal window, X goes to 70% CPU. Basically, every graphical action sends CPU usage of X through the roof. Device: Nvidia Quadro NVS 290 Driver package: binary driver nvidia-current-updates (280.13-0ubuntu5) Dual Monitors: Pair of DELL UltraSharp 1908FP in TwinView (X screen 2560x1024) OS: Fresh install of Ubuntu 11.10 amd64 Desktop with all updates. Hardware: Dell Precision T5400 Workstation Pastebin of Xorg.0.log Pastebin of xorg.conf Pastebin of nvidia-xconfig -t output (easier to read than xorg.conf) Output of /usr/lib/nux/unity_support_test -p: To obtain the following htop screenshow I typed "asdf" several times in in this text box, alt-tabbed to Terminal and took a screenshot of the high X CPU usage. This also happens when firefox is not running: Quadro NVS 290 has "No" thermal sensor according to sensors-detect: Next adapter: NVIDIA i2c adapter 0 at 2:00.0 (i2c-0) Do you want to scan it? (YES/no/selectively): Client found at address 0x50 Probing for `Analog Devices ADM1033'... No Probing for `Analog Devices ADM1034'... No P robing for `SPD EEPROM'... No Probing for `EDID EEPROM'... Yes (confidence 8, not a hardware monitoring chip) I tried the nouveau driver by disabling the nvidia-current-updates under Additional Drivers, but Ubuntu and xrandr -q fail to detect the second monitor. This may be issue 737349. Funniest thing is that Nouveau wiki says that XRandR 1.2 dual-monitor is supported so it should work with a second monitor.

    Read the article

  • Creating Custom HTML Helpers in ASP.NET MVC

    - by Shravan
    ASP.NET MVC provides many built-in HTML Helpers.  With help of HTML Helpers we can reduce the amount of typing of HTML tags for creating a HTML page. For example we use Html.TextBox() helper method it generates html input textbox. Write the following code snippet in MVC View: <%=Html.TextBox("txtName",20)%> It generates the following html in output page: <input id="txtName" name="txtName" type="text" value="20" /> List of built-in HTML Helpers provided by ASP.NET MVC. ActionLink() - Links to an action method. BeginForm() - Marks the start of a form and links to the action method that renders the form. CheckBox() - Renders a check box. DropDownList() - Renders a drop-down list. Hidden() - Embeds information in the form that is not rendered for the user to see. ListBox() - Renders a list box. Password() - Renders a text box for entering a password. RadioButton() - Renders a radio button.TextArea() - Renders a text area (multi-line text box). TextBox () - Renders a text box. How to develop our own Custom HTML Helpers? For developing custom HTML helpers the simplest way is to write an extension method for the HtmlHelper class. See the below code, it builds a custom Image HTML Helper for generating image tag. Read The Remaing Blog Post @ http://theshravan.net/blog/creating-custom-html-helpers-in-asp-net-mvc/

    Read the article

  • How to Disable the Animations on the Windows 8 Start Screen

    - by Usman
    Who doesn’t love animations? They make everything look so cool. But in some cases, animations are a distraction, and the same is true for Windows 8′s start screen (the “Modern UI”). Fortunately, there’s a very simple way to disable all those animations. Keep reading to find out how it’s done. The animations are especially noticeable when you switch from the good ol’ peaceful desktop to the start screen by pressing the winkey. I don’t know about you, but it feels like I’m getting dizzy by watching all those crazy animations over and over again. People have found out ways to enhance the start screen animations, add delay to various elements and stuff like that. But we’re going the other way, disabling the animations completely. To do so, log in, and when the start screen appears, type “Computer” (it will pop up in the search results before you’ve even finished typing). Our Geek Trivia App for Windows 8 is Now Available Everywhere How To Boot Your Android Phone or Tablet Into Safe Mode HTG Explains: Does Your Android Phone Need an Antivirus?

    Read the article

  • C#/.NET Little Wonders: Tuples and Tuple Factory Methods

    - by James Michael Hare
    Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can really help improve your code by making it easier to write and maintain.  This week, we look at the System.Tuple class and the handy factory methods for creating a Tuple by inferring the types. What is a Tuple? The System.Tuple is a class that tends to inspire a reaction in one of two ways: love or hate.  Simply put, a Tuple is a data structure that holds a specific number of items of a specific type in a specific order.  That is, a Tuple<int, string, int> is a tuple that contains exactly three items: an int, followed by a string, followed by an int.  The sequence is important not only to distinguish between two members of the tuple with the same type, but also for comparisons between tuples.  Some people tend to love tuples because they give you a quick way to combine multiple values into one result.  This can be handy for returning more than one value from a method (without using out or ref parameters), or for creating a compound key to a Dictionary, or any other purpose you can think of.  They can be especially handy when passing a series of items into a call that only takes one object parameter, such as passing an argument to a thread's startup routine.  In these cases, you do not need to define a class, simply create a tuple containing the types you wish to return, and you are ready to go? On the other hand, there are some people who see tuples as a crutch in object-oriented design.  They may view the tuple as a very watered down class with very little inherent semantic meaning.  As an example, what if you saw this in a piece of code: 1: var x = new Tuple<int, int>(2, 5); What are the contents of this tuple?  If the tuple isn't named appropriately, and if the contents of each member are not self evident from the type this can be a confusing question.  The people who tend to be against tuples would rather you explicitly code a class to contain the values, such as: 1: public sealed class RetrySettings 2: { 3: public int TimeoutSeconds { get; set; } 4: public int MaxRetries { get; set; } 5: } Here, the meaning of each int in the class is much more clear, but it's a bit more work to create the class and can clutter a solution with extra classes. So, what's the correct way to go?  That's a tough call.  You will have people who will argue quite well for one or the other.  For me, I consider the Tuple to be a tool to make it easy to collect values together easily.  There are times when I just need to combine items for a key or a result, in which case the tuple is short lived and so the meaning isn't easily lost and I feel this is a good compromise.  If the scope of the collection of items, though, is more application-wide I tend to favor creating a full class. Finally, it should be noted that tuples are immutable.  That means they are assigned a value at construction, and that value cannot be changed.  Now, of course if the tuple contains an item of a reference type, this means that the reference is immutable and not the item referred to. Tuples from 1 to N Tuples come in all sizes, you can have as few as one element in your tuple, or as many as you like.  However, since C# generics can't have an infinite generic type parameter list, any items after 7 have to be collapsed into another tuple, as we'll show shortly. So when you declare your tuple from sizes 1 (a 1-tuple or singleton) to 7 (a 7-tuple or septuple), simply include the appropriate number of type arguments: 1: // a singleton tuple of integer 2: Tuple<int> x; 3:  4: // or more 5: Tuple<int, double> y; 6:  7: // up to seven 8: Tuple<int, double, char, double, int, string, uint> z; Anything eight and above, and we have to nest tuples inside of tuples.  The last element of the 8-tuple is the generic type parameter Rest, this is special in that the Tuple checks to make sure at runtime that the type is a Tuple.  This means that a simple 8-tuple must nest a singleton tuple (one of the good uses for a singleton tuple, by the way) for the Rest property. 1: // an 8-tuple 2: Tuple<int, int, int, int, int, double, char, Tuple<string>> t8; 3:  4: // an 9-tuple 5: Tuple<int, int, int, int, double, int, char, Tuple<string, DateTime>> t9; 6:  7: // a 16-tuple 8: Tuple<int, int, int, int, int, int, int, Tuple<int, int, int, int, int, int, int, Tuple<int,int>>> t14; Notice that on the 14-tuple we had to have a nested tuple in the nested tuple.  Since the tuple can only support up to seven items, and then a rest element, that means that if the nested tuple needs more than seven items you must nest in it as well.  Constructing tuples Constructing tuples is just as straightforward as declaring them.  That said, you have two distinct ways to do it.  The first is to construct the tuple explicitly yourself: 1: var t3 = new Tuple<int, string, double>(1, "Hello", 3.1415927); This creates a triple that has an int, string, and double and assigns the values 1, "Hello", and 3.1415927 respectively.  Make sure the order of the arguments supplied matches the order of the types!  Also notice that we can't half-assign a tuple or create a default tuple.  Tuples are immutable (you can't change the values once constructed), so thus you must provide all values at construction time. Another way to easily create tuples is to do it implicitly using the System.Tuple static class's Create() factory methods.  These methods (much like C++'s std::make_pair method) will infer the types from the method call so you don't have to type them in.  This can dramatically reduce the amount of typing required especially for complex tuples! 1: // this 4-tuple is typed Tuple<int, double, string, char> 2: var t4 = Tuple.Create(42, 3.1415927, "Love", 'X'); Notice how much easier it is to use the factory methods and infer the types?  This can cut down on typing quite a bit when constructing tuples.  The Create() factory method can construct from a 1-tuple (singleton) to an 8-tuple (octuple), which of course will be a octuple where the last item is a singleton as we described before in nested tuples. Accessing tuple members Accessing a tuple's members is simplicity itself… mostly.  The properties for accessing up to the first seven items are Item1, Item2, …, Item7.  If you have an octuple or beyond, the final property is Rest which will give you the nested tuple which you can then access in a similar matter.  Once again, keep in mind that these are read-only properties and cannot be changed. 1: // for septuples and below, use the Item properties 2: var t1 = Tuple.Create(42, 3.14); 3:  4: Console.WriteLine("First item is {0} and second is {1}", 5: t1.Item1, t1.Item2); 6:  7: // for octuples and above, use Rest to retrieve nested tuple 8: var t9 = new Tuple<int, int, int, int, int, int, int, 9: Tuple<int, int>>(1,2,3,4,5,6,7,Tuple.Create(8,9)); 10:  11: Console.WriteLine("The 8th item is {0}", t9.Rest.Item1); Tuples are IStructuralComparable and IStructuralEquatable Most of you know about IComparable and IEquatable, what you may not know is that there are two sister interfaces to these that were added in .NET 4.0 to help support tuples.  These IStructuralComparable and IStructuralEquatable make it easy to compare two tuples for equality and ordering.  This is invaluable for sorting, and makes it easy to use tuples as a compound-key to a dictionary (one of my favorite uses)! Why is this so important?  Remember when we said that some folks think tuples are too generic and you should define a custom class?  This is all well and good, but if you want to design a custom class that can automatically order itself based on its members and build a hash code for itself based on its members, it is no longer a trivial task!  Thankfully the tuple does this all for you through the explicit implementations of these interfaces. For equality, two tuples are equal if all elements are equal between the two tuples, that is if t1.Item1 == t2.Item1 and t1.Item2 == t2.Item2, and so on.  For ordering, it's a little more complex in that it compares the two tuples one at a time starting at Item1, and sees which one has a smaller Item1.  If one has a smaller Item1, it is the smaller tuple.  However if both Item1 are the same, it compares Item2 and so on. For example: 1: var t1 = Tuple.Create(1, 3.14, "Hi"); 2: var t2 = Tuple.Create(1, 3.14, "Hi"); 3: var t3 = Tuple.Create(2, 2.72, "Bye"); 4:  5: // true, t1 == t2 because all items are == 6: Console.WriteLine("t1 == t2 : " + t1.Equals(t2)); 7:  8: // false, t1 != t2 because at least one item different 9: Console.WriteLine("t2 == t2 : " + t2.Equals(t3)); The actual implementation of IComparable, IEquatable, IStructuralComparable, and IStructuralEquatable is explicit, so if you want to invoke the methods defined there you'll have to manually cast to the appropriate interface: 1: // true because t1.Item1 < t3.Item1, if had been same would check Item2 and so on 2: Console.WriteLine("t1 < t3 : " + (((IComparable)t1).CompareTo(t3) < 0)); So, as I mentioned, the fact that tuples are automatically equatable and comparable (provided the types you use define equality and comparability as needed) means that we can use tuples for compound keys in hashing and ordering containers like Dictionary and SortedList: 1: var tupleDict = new Dictionary<Tuple<int, double, string>, string>(); 2:  3: tupleDict.Add(t1, "First tuple"); 4: tupleDict.Add(t2, "Second tuple"); 5: tupleDict.Add(t3, "Third tuple"); Because IEquatable defines GetHashCode(), and Tuple's IStructuralEquatable implementation creates this hash code by combining the hash codes of the members, this makes using the tuple as a complex key quite easy!  For example, let's say you are creating account charts for a financial application, and you want to cache those charts in a Dictionary based on the account number and the number of days of chart data (for example, a 1 day chart, 1 week chart, etc): 1: // the account number (string) and number of days (int) are key to get cached chart 2: var chartCache = new Dictionary<Tuple<string, int>, IChart>(); Summary The System.Tuple, like any tool, is best used where it will achieve a greater benefit.  I wouldn't advise overusing them, on objects with a large scope or it can become difficult to maintain.  However, when used properly in a well defined scope they can make your code cleaner and easier to maintain by removing the need for extraneous POCOs and custom property hashing and ordering. They are especially useful in defining compound keys to IDictionary implementations and for returning multiple values from methods, or passing multiple values to a single object parameter. Tweet Technorati Tags: C#,.NET,Tuple,Little Wonders

    Read the article

  • Keyboard / keymap problems with Xubuntu 12.04 + NX nomachine

    - by bajafresh4life
    I'm running NX client on my Macbook Pro to connect to a Xubuntu 12.04 desktop at work. I have configured NX client to start up a console upon connection. I am able to connect to my remote linux machine and I get a simple xterm console. However, when I run xfce4-session, half my keys no longer work. For example, when I launch a terminal, I typing a, s, or d works, but if type w, e, r, or t, the cursor just blinks. If I ctrl-C out of xfce4-session, all the keys work fine in my xterm console. If I run xev, this is the output for when I hit a key that works: KeyRelease event, serial 34, synthetic NO, window 0x2e00001, root 0x373, subw 0x0, time 170160781, (-45,-21), root:(824,429), state 0x4, keycode 16 (keysym 0x63, c), same_screen YES, XLookupString gives 1 bytes: (03) "" XFilterEvent returns: False KeyRelease event, serial 34, synthetic NO, window 0x2e00001, root 0x373, subw 0x0, time 170160781, (-45,-21), root:(824,429), state 0x4, keycode 67 (keysym 0xffe3, Control_L), same_screen YES, XKeysymToKeycode returns keycode: 63 XLookupString gives 0 bytes: XFilterEvent returns: False but when I hit a key that doesn't work: FocusOut event, serial 34, synthetic NO, window 0x2e00001, mode NotifyGrab, detail NotifyAncestor FocusIn event, serial 34, synthetic NO, window 0x2e00001, mode NotifyUngrab, detail NotifyAncestor KeymapNotify event, serial 34, synthetic NO, window 0x0, keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Any ideas on what I can do to troubleshoot this issue? Googling around offered a few suggestions (like playing with xmodmap) but nothing seemed to work. Also, one thing worth mentioning is that I do not have any keyboard issues when remoting into a different Ubuntu 10 box via NX.

    Read the article

  • Synaptic won't launch from menu in panel in fresh Lubuntu minimal desktop 12.04 install

    - by ven42
    I performed a fresh install of Lubuntu 12.04 with minimal desktop, as described here: https://help.ubuntu.com/community/Lubuntu/Documentation/MinimalInstall. To clarify, I did a command-line install from the Lubuntu alternative install disc, then I did an "apt-get install --no-install-recommends lubuntu-desktop". Everything is working fine, except that Synaptic will not run from the menu entry in the panel. I am not prompted for a password, and no window of any sort appears after clicking the menu entry. I installed lxshortcut to see what the shortcut was running, and the command is "synaptic-pkexec". If I type this command into the "Run" menu, I get the same behavior (or lack thereof). I can get Synaptic to open up just fine by typing "gksudo synaptic" at the "Run" menu. Also, if I run "synaptic-pkexec" from the terminal, then I am prompted for my password within the terminal, and after that Synaptic opens normally. Can someone please suggest the right way to get Synaptic working? I could just change the menu entry to "gksudo synaptic", but I'm guessing that it's set to "synaptic-pkexec" for a reason. I have a vague understanding that this pkexec business has something to do with PolicyKit, but I don't really know what PolicyKit is or how to tell if something is broken with it. Thanks.

    Read the article

  • Duck checker in Python: does one exist?

    - by elliot42
    Python uses duck-typing, rather than static type checking. But many of the same concerns ultimately apply: does an object have the desired methods and attributes? Do those attributes have valid, in-range values? Whether you're writing constraints in code, or writing test cases, or validating user input, or just debugging, inevitably somewhere you'll need to verify that an object is still in a proper state--that it still "looks like a duck" and "quacks like a duck." In statically typed languages you can simply declare "int x", and anytime you create or mutate x, it will always be a valid int. It seems feasible to decorate a Python object to ensure that it is valid under certain constraints, and that every time that object is mutated it is still valid under those constraints. Ideally there would be a simple declarative syntax to express "hasattr length and length is non-negative" (not in those words. Not unlike Rails validators, but less human-language and more programming-language). You could think of this as ad-hoc interface/type system, or you could think of it as an ever-present object-level unit test. Does such a library exist to declare and validate constraint/duck-checking on Python-objects? Is this an unreasonable tool to want? :) (Thanks!) Contrived example: rectangle = {'length': 5, 'width': 10} # We live in a fictional universe where multiplication is super expensive. # Therefore any time we multiply, we need to cache the results. def area(rect): if 'area' in rect: return rect['area'] rect['area'] = rect['length'] * rect['width'] return rect['area'] print area(rectangle) rectangle['length'] = 15 print area(rectangle) # compare expected vs. actual output! # imagine the same thing with object attributes rather than dictionary keys.

    Read the article

  • w00t! First post!

    - by blaird
    So, I busted my old blog and hadn't been keeping up with it. Decided it would be easier on me to use software that I didn't maintain, so several months ago I signed up for a GWB account. You are a witness to procrastination at its finest!  I was remarking to my friend Abby that I hadn't written anything in ages, that I've typed a bunch in the last 5 years or so, but that the typing belonged to someone else as work product, was boring technical mumbo jumbo, or was only good before it spoiled, that project/job/technology/tweet based freshness window that us geeks have to deal with. In short, I just didn't feel like it. So forgive the rambling sentences and my grammatical failures, you have Abby to thank ;) On the technology front I've been working with WPF, WCF and a whole lot of other alphabet soup in terms of patterns. I'm starting to get spoiled on Visual Studio 2010, and may have made a mistake by evaluating the ultimate version. Because I'm a .NET geek and an outdoor geek, expect a hodgepodge. It's nearly Easter, which for the garden means a whole lot of things. I've already started getting seed out, and started working soil. It feels good to get real dirt on your hands.

    Read the article

  • Graphics performance of 945GME

    - by l0b0
    Edit: Since setting Appearance - Visual Effects up to a stunning "Normal", I now get ~35 FPS in glxgears right after login, with nothing else running :( I'm getting terrible graphics performance in NeverWinter Nights (native with SoU+HotU+CEP2) on my Eee PC 1005HAB. Even with all graphics settings (including the "advanced" ones) at minimum I get about 2-10 FPS, depending on the scene. Firefox is really sluggish as well - Changing tabs often takes a second, scrolling is laggy, and typing this I notice the delay between pressing keys and seeing the text on screen. The rest of the OS is running OK, although general performance seems to be even worse than my old Eee PC 900. glxgears gives about 60 FPS, which is apparently as it should be (synchronized with the monitor refresh rate). Bugs like Launchpad #252094 and the instructions for Reverting the Jaunty Xorg intel driver to 2.4 are old enough that I'm afraid following the instructions would render the system unusable. Are there any tips for improving graphics performance on this system that are still relevant for 10.10? $ uname -a Linux l0b0eee 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:40:58 UTC 2011 i686 GNU/Linux $ lspci -nn | grep VGA 00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GME Express Integrated Graphics Controller [8086:27ae] (rev 03) $ glxinfo name of display: :0.0 display: :0 screen: 0 direct rendering: Yes server glx vendor string: SGI server glx version string: 1.4 ...

    Read the article

  • Touchpad hardware button disables keyboard too

    - by jjg
    I have an old but nice Samsung X50 running MM which has a key between the touchpad buttons which disables the touchpad. Very nice, no-one like to brush against the touchpad while typing. It seems to be a hardware feature -- a BIOS style window appears at the top left of the screen when you press it saying "touchpad off"; and when you press it again it says "touchpad on", and so it is, but now the keyboard has no effect in X, I can type nothing except to meta-ctl F1 to the console. After a reboot the problem persists; and the only way I have found to fix it is to blow away .gconf are replace it with a copy I made in happier times. Deleting/modifying .gconf/desktop/gnome/peripherals/touchpad/%gconf.xml does not fix the problem. There is no way to turn off the switch in BIOS without losing the touchpad. I would prise the thing out with a screwdriver if I could, but it's a work machine. This button is the bane of my life, hanging over me like a sword of Damocles.

    Read the article

  • Programming by dictation?

    - by Andrew M
    ie. you speak out the code, and someone else across the room types it in Anyone tried this? Obviously the person taking the dictation would need to be a coder too, so you didn't have to explain everything and go into tedious detail (not 'open bracket, new line...' but more like 'create a new class called myParser that takes three arguments, first one is...'). I thought of it because sometimes I'm too easily distracted at my computer. Surrounded by buttons, instant gratification a click away, the world at my fingertips. To get stuff done, I want to get away, write my code on paper. But that would mean losing access to necessary resources, and necessitate tedious typing-up later on. The solution? Dictate. Pros: no chance to check reddit, stackexchange, gmail, etc. code while you pace the room, lie down, play billiards, whatever train your brain to think more abstractedly (have to visualize things if you can't just see the screen) skip the tedious details (closing brackets etc.) the typist gets to shadow a more experienced programmer and learn how they work the typist can provide assistance/suggestions external pressure of typist expecting instructions, urging you to stay focussed Cons might be too hard might not work any better rather inefficient use of assisting programmer need to find/pay someone to do this

    Read the article

  • Blending animations for more character movements

    - by Noob Saibot
    I am making a hack n slash 3rd person game. And I want the character movements to be more dynamic not like fighting games where you have a moves list. I want to animate tons of different animations and have them "Tween" between each other? Because I want the controls to not be keyboard mouse. I want it to be all keyboard. that way you have up to 10 inputs (All your fingers) to blend and morph animations to create more fluid movements. In the end this will almost be similar to characters typing a phrase or string of keys rather than move forward mouse look click to melee. My question is. Has anyone done this before and would someone go about trying to tween lets say one for key on the keyboard excluding Tab, Caps, R+Shift, L+Shift, Enter, R+Ctrl, L+Ctrl, L+Alt, R+Alt, Windows Key, and Menu. So thats all the numbers, letters and punctuation keys. Thats 46 keys gives me a combination of 46P1 = 5502622159812088949850305428800254892961651752960000000000L (used Python) and with a minimum entry value of 2 keypresses shortening to half. This is not humanly possible to create so many inique animations in one lifetime. But I'm guessing there is a reason this hasn't been done already. Or if I just used 10 basic keys. Maybe ASDF SPACE (RIGHT HAND) 456+0 (LEFT HAND KEYPAD) it would give me 3,628,800 posible unique animations.

    Read the article

  • Style bits vs. Separate bool's

    - by peterchen
    My main platform (WinAPI) still heavily uses bits for control styles etc. (example). When introducing custom controls, I'm permanently wondering whether to follow that style or rather use individual bool's. Let's pit them against each other: enum EMyCtrlStyles { mcsUseFileIcon = 1, mcsTruncateFileName = 2, mcsUseShellContextMenu = 4, }; void SetStyle(DWORD mcsStyle); void ModifyStyle(DWORD mcsRemove, DWORD mcsAdd); DWORD GetStyle() const; ... ctrl.SetStyle(mcsUseFileIcon | mcsUseShellContextMenu); vs. CMyCtrl & SetUseFileIcon(bool enable = true); bool GetUseFileIcon() const; CMyCtrl & SetTruncteFileName(bool enable = true); bool GetTruncteFileName() const; CMyCtrl & SetUseShellContextMenu(bool enable = true); bool GetUseShellContextMenu() const; ctrl.SetUseFileIcon().SetUseShellContextMenu(); As I see it, Pro Style Bits Consistent with platform less library code (without gaining complexity), less places to modify for adding a new style less caller code (without losing notable readability) easier to use in some scenarios (e.g. remembering / transferring settings) Binary API remains stable if new style bits are introduced Now, the first and the last are minor in most cases. Pro Individual booleans Intellisense and refactoring tools reduce the "less typing" effort Single Purpose Entities more literate code (as in "flows more like a sentence") No change of paradim for non-bool properties These sound more modern, but also "soft" advantages. I must admit the "platform consistency" is much more enticing than I could justify, the less code without losing much quality is a nice bonus. 1. What do you prefer? Subjectively, for writing the library, or for writing client code? 2. Any (semi-) objective statements, studies, etc.?

    Read the article

  • C/C++: Who uses the logical operator macros from iso646.h and why?

    - by Jaime Soto
    There has been some debate at work about using the merits of using the alternative spellings for C/C++ logical operators in iso646.h: and && and_eq &= bitand & bitor | compl ~ not ! not_eq != or || or_eq |= xor ^ xor_eq ^= According to Wikipedia, these macros facilitate typing logical operators in international (non-US English?) and non-QWERTY keyboards. All of our development team is in the same office in Orlando, FL, USA and from what I have seen we all use the US English QWERTY keyboard layout; even Dvorak provides all the necessary characters. Supporters of using the iso646.h macros claim we should them because they are part of the C and C++ standards. I think this argument is moot since digraphs and trigraphs are also part of these standards and they are not even supported by default in many compilers. My rationale for opposing these macros in our team is that we do not need them since: Everybody on our team uses the US English QWERTY keyboard layout; C and C++ programming books from the US barely mention iso646.h, if at all; and new developers may not be familiar with iso646.h (this is expected if they are from the US). /rant Finally, to my set of questions: Does anyone in this site use the iso646.h logical operator macros? Why? What is your opinion about using the iso646.h logical operator macros in code written and maintained on US English QWERTY keyboards? Is my digraph and trigraph analogy a valid argument against using iso646.h with US English QWERTY keyboard layouts? EDIT: I missed two similar questions in StackOverflow: Is anybody using the named boolean operators? Which C++ logical operators do you use: and, or, not and the ilk or C style operators? why?

    Read the article

  • What is the evidence that an API has exceeded its orthogonality in the context of types?

    - by hawkeye
    Wikipedia defines software orthogonality as: orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language. The term is most-frequently used regarding assembly instruction sets, as orthogonal instruction set. Jason Coffin has defined software orthogonality as Highly cohesive components that are loosely coupled to each other produce an orthogonal system. C.Ross has defined software orthogonality as: the property that means "Changing A does not change B". An example of an orthogonal system would be a radio, where changing the station does not change the volume and vice-versa. Now there is a hypothesis published in the the ACM Queue by Tim Bray - that some have called the Bánffy Bray Type System Criteria - which he summarises as: Static typings attractiveness is a direct function (and dynamic typings an inverse function) of API surface size. Dynamic typings attractiveness is a direct function (and static typings an inverse function) of unit testing workability. Now Stuart Halloway has reformulated Banfy Bray as: the more your APIs exceed orthogonality, the better you will like static typing My question is: What is the evidence that an API has exceeded its orthogonality in the context of types? Clarification Tim Bray introduces the idea of orthogonality and APIs. Where you have one API and it is mainly dealing with Strings (ie a web server serving requests and responses), then a uni-typed language (python, ruby) is 'aligned' to that API - because the the type system of these languages isn't sophisticated, but it doesn't matter since you're dealing with Strings anyway. He then moves on to Android programming, which has a whole bunch of sensor APIs, which are all 'different' to the web server API that he was working on previously. Because you're not just dealing with Strings, but with different types, the API is non-orthogonal. Tim's point is that there is a empirical relationship between your 'liking' of types and the API you're programming against. (ie a subjective point is actually objective depending on your context).

    Read the article

  • The problems with Avoiding Smurf Naming classes with namespaces

    - by Daniel Koverman
    I pulled the term smurf naming from here (number 21). To save anyone not familiar the trouble, Smurf naming is the act of prefixing a bunch of related classes, variables, etc with a common prefix so you end up with "a SmurfAccountView passes a SmurfAccountDTO to the SmurfAccountController", etc. The solution I've generally heard to this is to make a smurf namespace and drop the smurf prefixes. This has generally served me well, but I'm running into two problems. I'm working with a library with a Configuration class. It could have been called WartmongerConfiguration but it's in the Wartmonger namespace, so it's just called Configuration. I likewise have a Configuration class which could be called SmurfConfiguration, but it is in the Smurf namespace so that would be redundant. There are places in my code where Smurf.Configuration appears alongside Wartmonger.Configuration and typing out fully qualified names is clunky and makes the code less readable. It would be nicer to deal with a SmurfConfiguration and (if it was my code and not a library) WartmongerConfiguration. I have a class called Service in my Smurf namespace which could have been called SmurfService. Service is a facade on top of a complex Smurf library which runs Smurf jobs. SmurfService seems like a better name because Service without the Smurf prefix is so incredibly generic. I can accept that SmurfService was already a generic, useless name and taking away smurf merely made this more apparent. But it could have been named Runner, Launcher, etc and it would still "feel better" to me as SmurfLauncher because I don't know what a Launcher does, but I know what a SmurfLauncher does. You could argue that what a Smurf.Launcher does should be just as apparent as a Smurf.SmurfLauncher, but I could see `Smurf.Launcher being some kind of class related to setup rather than a class that launches smurfs. If there is an open and shut way to deal with either of these that would be great. If not, what are some common practices to mitigate their annoyance?

    Read the article

  • Getting Xbox Live via a wired network with my laptop that has internet access wirelessly

    - by Alex Franco
    I'm running the latest version (as of yesterday anyways) of Ubuntu Desktop 64bit, but installed on my laptop if it makes a difference. I had Windows 7 preinstalled when i bought it and it worked fine with the wireless from my house and bridging the connection with a LAN to my xbox for Live. Now with Ubuntu I tried the same setup, but I'm unfamiliar with Ubuntu so I didn't get far. Best I got so far is wireless internet on my laptop and a wired connection to the xbox that continually connects and disconnects. Heres my network settings. if theres fields not included its because theyre empty on mine or theyre my MAC address or network password Wireless Network 1 settings: Connect Automatically: Checked. Available to all Users: Checked Wireless: SSID: Franco's Mode: Infrastructure MTU: Automatic IPv4 Settings: Method: Automatic (DHCP) IPv6 Settings: Method: Automatic Wired Network 1: Connect Automatically: Checked Available to all Users: Checked Wired: MTU: Automatic IPv4 Settings: Method: Automatic (DHCP) IPv6 Settings: Method: Automatic Any help would be greatly appreciated. EDIT: 6:26pm It seems to be staying connected now. Doing the Network test on my xbox it pickups the network, but cannot detect any PC. Restarting the Xbox, however, leaves my computer unable to connect bringing up the Wire Network disconnected 'blip' every minute or so again. Before I had restarted the Xbox it said "Connected 100 MB/s". Now it only says "connecting". I did have my computer and xbox on in this Wired Network Disconnected blip cycle for a long period of time so it may have finally connected, just without the ability to detect my laptop. I left for 2 hours or so in the middle of typing up the original question. I finished posting this when i got back and then tried to mess with it a bit again, in case youre wondering why i didnt include this before... I've said too much. Forgive my long-winded fingers :p

    Read the article

  • Whats after the iPAD?? check out the new Augmented Reality Glasses

    - by Stephen Slade
    Everyone loves their new iPad! The rich features, portability, plethora of apps and ease of use make this the new clipboard on the factory floor or electronic notebook for meetings. But how many business people walk into an hours meeting and really start typing notes on their PC?..yes some do, but for the general business public there are new technologies coming down the road. The iPad is the latest holla-hoop; and the next gen device I feel is the Augmented Reality Glasses. Your glasses will be your screen, have an earpiece, be wireless enabled, your smart watch be your electronics and maybe your belt can be an extended battery pack.  I'm anxious to test one of these. The TELEGRAPH writes:  "Android software is believed to power the gadget, enabling similar features to its smartphone and tablets. A 3G /4G data connection, motion sensors and GPS navigation are believed to be included in the device's capabilities. The augmented-reality glasses are the culmination of a two-year initiative called Project Glass, developed in the clandestine Google X lab, ..in Mountain View, ...The New York Times suggested they could cost between $250-$500 " http://www.telegraph.co.uk/technology/news/9187547/Google-unveils-augmented-reality-glasses.html

    Read the article

  • Is browser fingerprinting a viable technique for identifying anonymous users?

    - by SMrF
    Is browser fingerprinting a sufficient method for uniquely identifying anonymous users? What if you incorporate biometric data like mouse gestures or typing patterns? The other day I ran into the Panopticlick experiment EFF is running on browser fingerprints. Of course I immediately thought of the privacy repercussions and how it could be used for evil. But on the other hand, this could be used for great good and, at the very least, it's a tempting problem to work on. While researching the topic I found a few companies using browser fingerprinting to attack fraud. And after sending out a few emails I can confirm at least one major dating site is using browser fingerprinting as but one mechanism to detect fake accounts. (Note: They have found it's not unique enough to act as an identity when scaling up to millions of users. But, my programmer brain doesn't want to believe them). Here is one company using browser fingerprints for fraud detection and prevention: http://www.bluecava.com/ Here is a pretty comprehensive list of stuff you can use as unique identifiers in a browser: http://browserspy.dk/

    Read the article

  • Where can I find video and audio drivers for my netbook?

    - by Ari
    I got a little netbook yesterday (an Acer Aspire One) for schoolwork and read in numerous reviews Ubuntu was a must. I dove into it blindly and downloaded 12.04 LTS and though I admit it's faster than before, I have no idea how it works yet and was stupid enough to get rid of the Windows 7 Starter that was on there before completely. I can see myself getting used to the rest of Ubuntu, but the main issue is that it seems to have eaten all of my drivers and I don't know where to get any Ubuntu compatible ones. Any video at all is jilty and kind of creepy and any audio is very distorted and REALLY creepy. I understand that this is a tiny $150 typing and light web use school device I'm talking about, but I feel really stupid making the poor thing worse than it was before and not knowing what to do about it. Does anyone know how to install graphics/sound drivers? Or, alternatively, does anyone know where I can get a copy of Windows 7 Starter. I can see myself liking this if the problems are fixable, but if not I still have the product key and would be able to tackle the problem by myself with that.

    Read the article

  • In Ubuntu 13.10, none of the hotkeys of LibreOffice works in non-English keyboard layout

    - by maqtanim
    In Ubuntu 13.10, the hotkeys/shortcut-keys (Ctrl+b, Ctrl+s etc) in LibreOffice are language dependent and work in English language only. While writing in any other language (i.e. any Cyrillic and/or any Bengali etc) it's impossible to use hotkeys, they just don't do anything. Switching to English input language enable hotkeys once again. This is very frustrating as user needs to switch language to save document, to make it bold, or italic, etc. This was not experienced in Ubuntu 13.04. Steps to reproduce: System Settings Text Entry. Add another keyboard layout beside English [In my case it is Bengali (Probhat)] Now launch Writer. Switch the keyboard layout from English (US) to Bengali (Probhat) by pressing Ctrl+Space. Press Ctrl+B to change font weight to bold. Error: Font weight does not get changed. Expected: Font weight should change to bold. Note: none other system hotkeys work as expected. I.e. Ctrl+s to save, or Ctrl+b to subscript, or Ctrl+i to italic etc. Workaround: The only way is to - change the keyboard layout to English then press desired hotkey then switch keyboard layout back to Bengali. The issue is critical, as it make writer very slow for keyboard-only typing.

    Read the article

  • Ubuntu 12.04 LTS: Error message "Failed to execute child process"

    - by Ron
    I am an Ubuntu-newbie and just started working with Ubuntu (version 12.04 LTS) a couple of days ago. I wanted to add a launcher icon to desktop for launching an application I previously installed. Up to now I can only launch it by typing setsid matlab -desktop into my terminal. Now there is the following problem with the execution via the desktop icon: Whenever I click the desktop icon, I get the following error message: "Failed to execute child process" I would like to add a screenshot, but unfortunately as a new user, I am not allowed to... In the main menu from where I added the icon via drag'n'drop to desktop there is also a permission to execute the .desktop file. I also tried to look for advice on the error message "Failed to execute child process..." but could not find anything useful. Now does anybody have an idea what I am missing? Sorry if this is a stupid question ;) ...but as I just said: I just started with Ubuntu... Thanks to everybody in advance for their help! :) And let me know if you should need any more information... Regards, Ron

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >