Search Results

Search found 50 results on 2 pages for 'chime'.

Page 1/2 | 1 2  | Next Page >

  • Haskell Monad bind currying

    - by Chime
    I am currently in need of a bit of brain training and I found this article on Haskell and Monads I'm having trouble with exercise 7 re. Randomised function bind. To make the problem even simpler to experiment, I replaced the StdGen type with an unspecified type. So instead of... bind :: (a -> StdGen -> (b,StdGen)) -> (StdGen -> (a,StdGen)) -> (StdGen -> (b,StdGen)) I used... bind :: (a -> c -> (b,c)) -> (c -> (a,c)) -> (c -> (b,c)) and for the actual function impelemtation (just straight from the exercise) bind f x seed = let (x',seed') = x seed in f x' seed' and also 2 randomised functions to trial with: rndf1 :: (Num a, Num b) => a -> b -> (a,b) rndf1 a s = (a+1,s+1) rndf2 :: (Num a, Num b) => a -> b -> (a,b) rndf2 a s = (a+8,s+2) So with this in a Haskell compiler (ghci), I get... :t bind rndf2 bind rndf2 :: (Num a, Num c) => (c -> (a, c)) -> c -> (a, c) This matches the bind curried with rndf2 as the first parameter. But the thing I don't understand is how... :t bind rndf2 . rndf1 Suddenly gives bind rndf2 . rndf1 :: (Num a, Num c) => a -> c -> (a, c) This is the correct type of the composition that we are trying to produce because bind rndf2 . rndf1 Is a function that: takes the same parameter type(s) as rndf1 AND takes the return from rndf1 and pipes it as an input of rndf2 to return the same type as rndf2 rndf1 can take 2 parameters a -> c and rndf2 returns (a, c) so it matches that a composition of these function should have type: bind rndf2 . rndf1 :: (Num a, Num c) => a -> c -> (a, c) This does not match the naive type that I initially came up with for bind bind f :: (a -> b -> (c, d)) -> (c, d) -> (e, f) Here bind mythically takes a function that takes two parameters and produces a function that takes a tuple in order that the output from rndf1 can be fed into rndf2 why the bind function needs to be coded as it is Why the bind function does not have the naive type

    Read the article

  • Speaker static event fires with every action

    - by P.Brian.Mackey
    When I... click my mouse (everytime) stroke a key on keyboard (sometimes) Watch a video (horrible) Take the hard drive out for a walk (bad) The Cyber Acoustics CA-2014rb speakers chime in with an onomatopoeia. Sounds like radio interference. A click for every platter revolution. A chime for every 80Kb of data. This is a virus type Pokémon immune to formats, OS upgrades and everything but volume control, power outages and deep submersions. How can I defeat the monster rattling in my PC?

    Read the article

  • How to play sound in Python WITHOUT interrupting music/other sounds from playing

    - by Morlock
    I'm working on a timer in python which sounds a chime when the waiting time is over. I use the following code: from wave import open as wave_open from ossaudiodev import open as oss_open def _play_chime(): """ Play a sound file once. """ sound_file = wave_open('chime.wav','rb') (nc,sw,fr,nf,comptype, compname) = sound_file.getparams( ) dsp = oss_open('/dev/dsp','w') try: from ossaudiodev import AFMT_S16_NE except ImportError: if byteorder == "little": AFMT_S16_NE = ossaudiodev.AFMT_S16_LE else: AFMT_S16_NE = ossaudiodev.AFMT_S16_BE dsp.setparameters(AFMT_S16_NE, nc, fr) data = sound_file.readframes(nf) sound_file.close() dsp.write(data) dsp.close() It works pretty good, unless any other device is already outputing sound. How could I do basically the same (under linux) without having the prerequisite that no sound is being played? If you think the process would require an API to ensure software mixing, please suggest a method :) Thx for the support

    Read the article

  • Windows Vista: Screen remains darkened for 30-60 seconds *after* UAC prompt

    - by sf2k
    Fixing someone's Vista computer. Process: I click any program or process that opens a User Account Control prompt. Screen goes dim so you may hit Continue to perform a secure user action. I click Continue Screen goes black for 30 seconds to 1 minute while you wait for the screen to return. In another example I click Cancel and screen still then goes black for 30 seconds to a minute. In that timeframe a chime goes off while you wait. (No chime if it was being cancelled.) Then screen comes back to continue with whatever. Something is occurring after the UAC prompt. Considering everything is practically a UAC acceptance this can get pretty annoying pretty quickly. Laptop has external monitor to regular external plug. Works fine. Laptop also has USB IOGEAR additional external video card. This is problematic but when unplugged same above behaviour occurs. I've ruled out monitor interference since same blackout after the UAC prompt appears with external monitors plugged in or when rebooted with no external monitors. Any suggestions on how to address this problem?

    Read the article

  • Stay on Schedule in Chrome with DayHiker

    - by Matthew Guay
    Do you keep your schedule and tasks in Google Calendar?  Here’s a handy extension for Google Chrome that can keep you on top of your appointments without having to open Google Calendar in another tab. Integrate Google Calendar with Chrome DayHiker is a handy extension for Google Chrome that can help you stay on schedule in your browser.  Desktop applications typically can keep you notified easier with popups or alerts, but webapps require you to visit them to view your information.  DayHiker takes the best of both, and can make your Google Calendar work more like a desktop application. To get started, open the DayHiker page from the Chrome Extensions Gallery (link below), and click Install.  Confirm you wish to install it at the prompt. Now you’ll have a new extension button in your Chrome toolbar.  Click the calendar icon to view your Google Calendar.  You’ll need to be signed into your Google account for your calendar to display; click the key icon to select your account if it doesn’t show your appointments automatically. If you’re signed into multiple Google accounts, such as your public Gmail and a Google Apps account, you can select the calendar you wish and click Continue. Now you can quickly see your upcoming appointments.  Simply hover over the icon to see your upcoming events.  Or, just glance at it to see if there are any appointments coming up, as the indicator icon will change colors to show how long you have until your next appointment. Click the icon to see more information about your appointments. Or, click the Add link to add a new appointment.  If you need to edit the appointment details, click Edit Details and the appointment will open in Google Calendar for you to edit. You can also view and manage your tasks in Google Calendar.  Click the checkmark icon, and then add or check-off tasks directly from the extension pane. You can also set an alarm clock in DayHiker.  Click the green circle icon, and then enter the time for the alarm to go off.  Strangely it will only chime if the extension pane is left open, so if you click anywhere else in the browser or even switch to another program it will not chime.   If you’d like to customize DayHiker’s settings, right-click on it and select Options, or select Options in the Chrome Extensions page.  Here you can customize your badges and the DayHiker icon, or enter a custom domain for your Google Apps Pro calendar.   Conclusion If you rely on Google Calendar to stay on top of your schedule, DayHiker can help you stay scheduled and know what’s coming up.  We wish DayHiker supported multiple calendars so we could combine our Google Apps calendars with our personal Google Calendar, but even still, it is a very useful tool.  Whether you’re a tightly scheduled person or just like to jot down to-dos and keep track of them, this extension will help you do this efficiently with familiar Google tools. Link Download DayHiker from the Chrome Extensions Gallery Similar Articles Productive Geek Tips Configure Disk Defragmenter Schedule in Windows 7 or VistaSchedule Updates for Windows Media CenterOpen Multiple Sites Without Reopening the Menus in FirefoxFind a Website’s Actual Location with Chrome FlagsSubscribe to RSS Feeds in Chrome with a Single Click 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 HippoRemote Pro 2.2 Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Dual Boot Ubuntu and Windows 7 What is HTML5? Default Programs Editor – One great tool for Setting Defaults Convert BMP, TIFF, PCX to Vector files with RasterVect Free Identify Fonts using WhatFontis.com Windows 7’s WordPad is Actually Good

    Read the article

  • Classes, methods, and polymorphism in Python

    - by Morlock
    I made a module prototype for building complex timer schedules in python. The classe prototypes permit to have Timer objects, each with their waiting times, Repeat objects that group Timer and other Repeat objects, and a Schedule class, just for holding a whole construction or Timers and Repeat instances. The construction can be as complex as needed and needs to be flexible. Each of these three classes has a .run() method, permitting to go through the whole schedule. Whatever the Class, the .run() method either runs a timer, a repeat group for a certain number of iterations, or a schedule. Is this polymorphism-oriented approach sound or silly? What are other appropriate approaches I should consider to build such a versatile utility that permits to put all building blocks together in as complex a way as desired with simplicity? Thanks! Here is the module code: ##################### ## Importing modules from time import time, sleep ##################### ## Class definitions class Timer: """ Timer object with duration. """ def __init__(self, duration): self.duration = duration def run(self): print "Waiting for %i seconds" % self.duration wait(self.duration) chime() class Repeat: """ Repeat grouped objects for a certain number of repetitions. """ def __init__(self, objects=[], rep=1): self.rep = rep self.objects = objects def run(self): print "Repeating group for %i times" % self.rep for i in xrange(self.rep): for group in self.objects: group.run() class Schedule: """ Groups of timers and repetitions. Maybe redundant with class Repeat. """ def __init__(self, schedule=[]): self.schedule = schedule def run(self): for group in self.schedule: group.run() ######################## ## Function definitions def wait(duration): """ Wait a certain number of seconds. """ time_end = time() + float(duration) #uncoment for minutes# * 60 time_diff = time_end - time() while time_diff > 0: sleep(1) time_diff = time_end - time() def chime(): print "Ding!"

    Read the article

  • What process is making that sound?

    - by harschware
    My Windows 7 system makes an intermittent ding sound (like a single chime, or bell). I don't know which process does it. So, my question is: Is there software out there that can tell me which processes are currently sending output to the sound device?

    Read the article

  • How can I quantify the amount of technical debt that exists in a project?

    - by Erik Dietrich
    Does anyone know if there is some kind of tool to put a number on technical debt of a code base, as a kind of code metric? If not, is anyone aware of an algorithm or set of heuristics for it? If neither of those things exists so far, I'd be interested in ideas for how to get started with such a thing. That is, how can I quantify the technical debt incurred by a method, a class, a namespace, an assembly, etc. I'm most interested in analyzing and assessing a C# code base, but please feel free to chime in for other languages as well, particularly if the concepts are language transcendent.

    Read the article

  • Sound not working for uid=1003 but working fine for uid=1000

    - by Dirk Eddelbuettel
    Sounds works for uid=1000, but not for the main user on the system, running with uid=1003. Upon boot, the Ubuntu chime clearly plays. When the user is logged in, sound test shows no input device. I looked at several of the previous questions, added the user to audio, video, pulse, pulse-access --- but still no luck. To recap: This worked perfectly in 11.04, 11.10, 12.04. It works for the default user uid=1000, it does not work for the actual user. The differing group memberships are mainly for adm, admin, sudo and the like.

    Read the article

  • Verify uniqueness of new content

    - by rogerkk
    I'm working on a review site, where there is a minor issue with almost duplicate reviews across items. Just a few words are changed. It would be very nice to be able to uncover these duplicates before they are approved by a moderator, and I'm hoping someone could chime in on the best strategy to get there. The site is running Ruby on Rails on a Postgres database and using Thinking Sphinx for search (all on Heroku), and so far the best option I see is to be pulling all the reviews out of the db and using a module like amatch to compare the strings. Not very efficient, so in this case I guess I'll have to limit the number/age of reviews to scan for dupes. Anyone got a better idea?

    Read the article

  • how to modify another user's .profile from the recovery console?

    - by Pinpin
    Pretty much everything is in the title, really! ;) I installed a few components to compile go programs, and the last step was to add the go directory to the path. Being a total ubuntu noob, I added the line PATH="Path/To/Folder", after the one that was already there. After the first reboot I can no longer log into ubuntu (the screen black-out for a while and then I'm back to the login screen, and the same chime greets me.) I've been able to boot in recovery mode, open the root's profile with vi, but I cant find my other user's profile, nor pretty much anything.. Any hint would be greatly appreciated! Pascal

    Read the article

  • Making Noise with Python

    - by Elliot
    I am trying to get python to make noise when certain things happen. Preferably, i would like to play music of some kind, however some kind of distinctive beeping would be sufficient, like an electronic timer going off. I have thus far only been able to make the system speaker chime using pywin32's Beep, however this simply does not have the volume for my application. Any ideas on how I can do this?

    Read the article

  • AutoCAD 11 and network file shares

    - by gravyface
    Small network of perhaps half a dozen engineers, currently working on local copies of AutoCAD project files, which are then copied back up to file server (2008 Standard, 1-2 year old Dell server hardware, RAID 5 SAS disks (10k? not positive)) at end of day. To me, this sounds horribly inefficient and error-prone, however, I've been told that "AutoCAD and network files = bad idea" and this is gospel. The network is currently 10/100 (perhaps this is the reason for the "gospel") but all the workstations are within 2 years old and have GbE NICs so an upgrade of the core switch is long overdue. However, I know certain applications don't like network access, at all, and any sign of latency or disruption brings the whole thing crashing down. Anyone care to chime in?

    Read the article

  • MacBook start up problem

    - by DA
    I have an aging, ailing MacBook. The battery died on it a few months ago, but can still use it when plugged in. I recently upgraded it to Snow Leopard. Had it unplugged for a few days. Went to boot it up today and now get this symptom: start up chime white screen with apple logo shuts off That's all it'll do. I tried unplugging and holding down the power button for 30 seconds but that didn't remedy the situation. Any theories? Finally an excuse to get the 27" iMac?

    Read the article

  • Sound card doesn't work and yet does.

    - by Xeoncross
    I have a really weird one tonight. Today we had a LAN party and all of a sudden the sound on a couple PC's stopped working for programs like the games, windows media player, etc. However, when errors would popup (like trying to change the volume settings) you would here the default error chime. Restarting the computers you would here the logoff-login sounds and after a restart the sound would work for a bit in both games and apps and then suddenly stop. Restarting also didn't always fix the problem. I can't figure this out. If the sound card/driver didn't work then how could we hear sounds from the windows sound scheme? No sound with VLC, windows media player, youtube, games, nothing. The only thing I can figure out is that this is a bad game crashing the primary driver or some kind of weird virus these PC's might have picked up.

    Read the article

  • No Clipboard support in Windows Phone 7 Series – iPhone points laughs

    - by Sarang
    What exactly were you taking of late MSFT? So much for a spanking new mobile OS which wants to emulate the iPhone OS so badly that it even copied and pasted the iPhone’s erstwhile lack of clipboard support as well? The reason given is so lame (shall I say differently able?) that deserves pity rather than lament. According to MSFT people don’t use the clipboard that often. Being a WinMo user for the better part of my life and having developed for the platform for worse part of it I could say with conviction that Clipboard support was one key differentiator which kept me away from “The Phone to have” of 2007-8-9. Let me try to find few use cases I for one have been using the clipboard. Copy files to and from card and phone memory. Copy images, audio files from apps/browsers/explorer to email other apps. Copy text to/from word documents, notes and emails. Copy content from network drives to memory card. Copy links between browsers (Yes i did it for the love of Opera and PIE alike). Others could definitely come up with more. So who are these so called “users” who provided feedback to MSFT that the clipboard is useless? If you are among the lucky few being asked for the “feedback” kindly chime in the comments. Would be interesting to see different views on this. Technorati Tags: Windows Phone 7 Series,Clipboard

    Read the article

  • What is the best type of c# timer to use with an Unity game that uses many timers simultaneously?

    - by Kyle Seidlitz
    I am developing a stand-alone 3d game in Unity that will have anywhere from 1 to 200 timers running simultaneously. For this game timer durations will range from 5 minutes to 4 days. There will not be any countdown displays or any UI for the timers. An object will be selected, a menu choice will then be selected, and the timer will start. Several events will occur at different intervals during the duration of the timer. The events will be confined to changing the material of the selected object, and calling a 1 second sound effect like a chime or a bell. If the user wants to save or end the game before all the timers are done, the start of the still running timers is to be saved to an XML file such that when the game is started again, any still running timers will have a calculation done to see if the timer is then done, where the game will change the materials appropriately. I am still trying to figure out what type of timer to use, and see also if there are any suggestions for saving and calculating times over several days. What class(es) of timers should I use? Are there any special issues I should look out for in terms of performance?

    Read the article

  • Layers - Logical seperation vs physical

    - by P.Brian.Mackey
    Some programmers recommend logical seperation of layers over physical. For example, given a DL, this means we create a DL namespace not a DL assembly. Benefits include: faster compilation time simpler deployment Faster startup time for your program Less assemblies to reference Im on a small team of 5 devs. We have over 50 assemblies to maintain. IMO this ratio is far from ideal. I prefer an extreme programming approach. Where if 100 assemblies are easier to maintain than 10,000...then 1 assembly must be easier than 100. Given technical limits, we should strive for < 5 assemblies. New assemblies are created out of technical need not layer requirements. Developers are worried for a few reasons. A. People like to work in their own environment so they dont step on eachothers toes. B. Microsoft tends to create new assemblies. E.G. Asp.net has its own DLL, so does winforms. Etc. C. Devs view this drive for a common assembly as a threat. Some team members Have a tendency to change the common layer without regard for how it will impact dependencies. My personal view: I view A. as silos, aka cowboy programming and suggest we implement branching to create isolation. C. First, that is a human problem and we shouldnt create technical work arounds for human behavior. Second, my goal is not to put everything in common. Rather, I want partitions to be made in namespaces not assemblies. Having a shared assembly doesnt make everything common. I want the community to chime in and tell me if Ive gone off my rocker. Is a drive for a single assembly or my viewpoint illogical or otherwise a bad idea?

    Read the article

  • Programmatically get screenshot of page

    - by Ender
    I'm writing a specialized crawler and parser for internal use and I require the ability to take a screenshot of a web page in order to check what colours are being used throughout. The program will take in around ten web addresses and will save them as a bitmap image, from there I plan to use LockBits in order to create a list of the five most used colours within the image. To my knowledge it's the easiest way to get the colours used within a web page but if there is an easier way to do it please chime in with your suggestions. Anyway, I was going to use this program until I saw the price tag. I'm also fairly new to C#, having only used it for a few months. Can anyone provide me with a solution to my problem of taking a screenshot of a web page in order to extract the colour scheme?

    Read the article

  • Have threads run indefinitely in a java application

    - by TP
    I am trying to program a game in which I have a Table class and each person sitting at the table is a separate thread. The game involves the people passing tokens around and then stopping when the party chime sounds. how do i program the run() method so that once I start the person threads, they do not die and are alive until the end of the game One solution that I tried was having a while (true) {} loop in the run() method but that increases my CPU utilization to around 60-70 percent. Is there a better method?

    Read the article

  • What FIX implementation do you recommend for use with .NET

    - by Ajaxx
    I am reviewing implementation choices for FIX when using .NET. A few obvious choices come to mind, but I want to know if there are other options, better choices or if we've made the same decision as a lot of you. QuickFIX - Stable, C++ implementation - so you've got unmanaged code to interop with. FIX4NET - C# implementation - seems to have some gaps in its implementation. DIY - Chime in here if you've made your own FIX engine Let me throw in some caveats here. I'm not looking for sub 100 microsecond processing. Performance is a requirement, but not so much that it's driving my decisions. A solid product that is stable, performs well and is flexible enough to deal with vendor specific dialects is the sweet spot. The more we can do in .NET the better.

    Read the article

  • Can I program Nvidia's CUDA using only Python or do I have to learn C?

    - by Aquateenfan
    I guess the question speaks for itself. I'm interested in doing some serious computations but am not a programmer by trade. I can string enough python together to get done what I want. But can I write a program in python and have the GPU execute it using CUDA? Or do I have to use some mix of python and C? The examples on Klockner's (sp) "pyCUDA" webpage had a mix of both python and C, so I'm not sure what the answer is. If anyone wants to chime in about Opencl, feel free. I heard about this CUDA business only a couple of weeks ago and didn't know you could use your video cards like this. thx

    Read the article

  • Does Anyone Use This Site To Find Jobs? [closed]

    - by Derek
    I hope this isn't too far off-topic that it upsets people, but here goes: My company (me, in particular) are looking to hire entry-level and medium-experienced software engineers via non-traditional (career fairs, etc) avenues due to ineffective HR efforts in the past. So, I am looking to perhaps purchase resume searching from stackoverflow and/or job postings. Before I do, I was hoping a few people could chime in on whether they think this would be worthwhile. Do you post your resume on here? Do you actively search the job listings? Thanks!

    Read the article

  • Realtime processing and callbacks with Python and C++

    - by Doughy
    I need to write code to do some realtime processing that is fairly computationally complex. I would like to create some Python classes to manage all my scripting, and leave the intensive parts of the algorithm coded in C++ so that they can run as fast as possible. I would like to instantiate the objects in Python, and have the C++ algorithms chime back into the script with callbacks in python. Something like: myObject = MyObject() myObject.setCallback(myCallback) myObject.run() def myCallback(val): """Do something with the value passed back to the python script.""" pass Will this be possible? How can I run a callback in python from a loop that is running in a C++ module? Anyone have a link or a tutorial to help me do this correctly?

    Read the article

1 2  | Next Page >