Daily Archives

Articles indexed Tuesday May 11 2010

Page 16/123 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Randomly generate sound from onClick and onShake events?

    - by Aaron
    I've literally looked everywhere on the net and found very little clarification on how to do this. Pretty much, I have 8 sound files laid out in an array.xml file and I need to play a randomly chosen file ONCE per or onClick or onShake. First off, what technique should I use to achieve this? ARRAY-RANDOM- STRING-PLAY? RANDOM INT-PLAY? RANDOM INT-STRING-PLAY? Any kind of direction will help greatly cause I'm almost 3 weeks worth of research into this. *NOTE: MediaPlayer mp = MediaPlayer.create(JelloMan.this, R.raw.sound) ...is what I'm stuck on being you can't replace the "R.raw" part with a string...

    Read the article

  • Wordpress - Total User Count who only have posts

    - by knightrider
    I want to display total number of user who only have posts at Wordpress. I can get all users by this query <?php $user_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->users;"); echo $user_count ?> But for the user count only with posts, i think i might need to join another table, does anyone have snippets ? Thanks.

    Read the article

  • Ubuntu Wired network(ethernet does not work)

    - by badnaam
    It was working just fine, until the other day I yanked it out. The wireless works just fine on the same router. If I login to a windows 7 instance on this dual boot laptop then the ehternet works just fine. So it's not a hardware, cable or router issue. The card even gets an ip, but I can't connect to the internet. Here are the details from route, iptables, ifconfig, ping etc. Any ideas? I have been struggling with this for day, none seems to have an answer. http://pastie.org/954816

    Read the article

  • Mercurial "hg clone" on Windows via ssh with plink issue

    - by Kyle Tolle
    I have a Windows Server 2008 machine (iis7) that has CopSSH set up on it. To connect to it, I have a Windows 7 machine with Mercurial 1.5.1 (and TortoiseHg) installed. I can connect to the server using PuTTY with a non-standard ssh port and a .ppk file just fine. So I know the server can be SSH'd into. Next, I wanted to use the CLI to connect via hg clone to get a private repo. I've seen elsewhere that you need to have ssh configured in your mercurial.ini file, so my mercurial.ini has a line: ssh = plink.exe -ssh -C -l username -P #### -i "C:/Program Files/PuTTY/Key Files/KyleKey.ppk" Note: username is filled in with the username I set up via copSSH. #### is filled in with the non-standard ssh port I've defined for copSSH. I try to do the command hg clone ssh://inthom.com but I get this error: remote: bash: inthom.com: command not found abort: no suitable response from remote hg! It looks like hg or plink parses the hostname such that it thinks that inthom.com is a command instead of the server to ssh to. That's really odd. Next, I tried to just use plink to connect by plink -P #### ssh://inthom.com, and I am then prompted for my username, and next password. I enter them both and then I get this error: bash: ssh://inthom.com: No such file or directory So now it looks like plink doesn't parse the hostname correctly. I fiddled around for a while trying to figure out how to do call hg clone with an empty ssh:// field and eventually figured out that this command allows me to reach the server and clone a test repo on the inthom.com server: hg clone ssh://!/Repos/test ! is the character I've found that let's me leave the hostname blank, but specify the repo folder to clone. What I really don't understand is how plink knows what server to ssh to at all. neither my mercurial.ini nor the command specify a server. None of the hg clone examples I've seen have a ! character. They all use an address, which makes sense, so you can connect to any repo via ssh that you want to clone. My only guess is that it somehow defaults to the last server I used PuTTY to SSH to, but I SSH'd into another server, and then tried to use plink to get to it, but plink still defaults to inthom.com (verified with the -v arg to plink). So I am at a loss as to how plink gets this server value at all. For "fun", I tried using TortoiseHg and can only clone a repo when I use ssh://!/Repos/test as the Source. Now, you can see that, since plink doesn't parse the hostname correctly, I had to specify the port number and username in the mercurial.ini file, instead of in the hostname like [email protected]:#### like you'd expect to. Trying to figure this out at first drove me insane, because I would get errors that the host couldn't be reached, which I knew shouldn't be the case. My question is how can I configure my setup so that ssh://[email protected]:####/Repos/test is parsed correctly as the username, hostname, port number, and repo to copy? Is it something wrong with the version of plink that I'm using, or is there some setting I may have messed up? If it is plink's fault, is there an alternative tool I can use? I'm going to try to get my friend set up to connect to this same repo, so I'd like to have a clean solution instead of this ! business. Especially when I have no idea how plink gets this default server, so I'm not sure if he'd even be able to get to inthom.com correctly. PS. I've had to use a ton of different tutorials to even get to this stage. Therefore, I haven't tried pushing any changes to the server yet. Hopefully I'll get this figured out and then I can try pushing changes to the repo.

    Read the article

  • schedule backup and restore of SSAS 2008 database

    - by Manjot
    Hi, I can backup and restore databases on Microsoft SQL server Analysis Service 2008 using GUI as from Backup SSAS I want to schedule backup and restore it to another server every night. so what i did is : I scripted out the backup and restore process from the GUI. Created a new SQL server agent job in database engine and added a "Run SSAS query" step. Copied the scripts to this step. But it fails. the scripts that the GUI copied out look like: <Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"> <Object> <DatabaseID>DB</DatabaseID> </Object> <File>C:\Backup\DB.abf</File> <AllowOverwrite>true</AllowOverwrite> </Backup> <Restore xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"> <File>\\server\C$\Backup\DB.abf</File> <DatabaseName>DB</DatabaseName> <AllowOverwrite>true</AllowOverwrite> </Restore> Any help please?

    Read the article

  • Which design pattern to manage windows?

    - by Lu Lu
    Hello, I am using .NET 2.0 & C# to develop a WinForm Mdi application. It will have a Main Window and a lot of mdi windows. I am thinking I should use which design pattern to manage mdi windows. Because I want only one instance for each window, if window is existed, I will show it on top, & otherwise I will create and show it. Note: a mdi window is opened from Menus of Main Window or open from another mdi window. An example is very good. Update: Menu's status is depended on mdi window's status. Ex: If Window 'A' is openned - menu 'A' - disabled. When window 'A' is closed - I update menu 'A' status to Enabled. Thanks.

    Read the article

  • Git commit -a question

    - by ben
    What is the difference between: git commit -m "added a new page" and git commit -a -m "added a new page" I know that the -a option will stage files that have been modified and deleted, but then what does running it without the -a mean? Thanks for reading.

    Read the article

  • Selecting multiple cached elements

    - by Globalz
    In jQuery you can select two elements by id like: $('#elem, #elem2'); BUT What if you have cached the elem and elem2, and what to apply the same method/function to them both? i.e. $elem = $('#elem'); $elem2 = $('#elem2'); This obviously wont work: $($elem, $elem2) Thanks!

    Read the article

  • Working with the IE cache from C# & WPF

    - by Eric
    I'm writing a program in C# using the WPF framework. I need to display images, and I'd like to cache them to avoid downloading them constantly. I can code my own cache, however, IE already has a caching system. I can find code to read entries out of the IE cache, however I've found nothing dealing with the issue of adding items to the cache. Is there a good way to do it, or should I just implement a separate cache?

    Read the article

  • Generating C++ BackTraces in OS/X (10.5.7)

    - by phillipwei
    I've been utilizing backtrace and backtrace_symbols to generate programmatic stack traces for the purposes of logging/diagnosis. It seems to roughly work, however, I'm getting a little bit of mangling and there are no accompanying file/line numbers associated with each function invocation (as I'd expect within a gdb bt call or something). Here's an example: 1 leonardo 0x00006989 _ZN9ExceptionC2E13ExceptionType + 111 2 leonardo 0x00006a20 _ZN9ExceptionC1E13ExceptionType + 24 3 leonardo 0x0000ab64 _ZN5Rules11ApplyActionER16ApplicableActionR9GameState + 1060 4 leonardo 0x0000ed15 _ZN9Simulator8SimulateEv + 2179 5 leonardo 0x0000eec9 _ZN9Simulator8SimulateEi + 37 6 leonardo 0x00009729 main + 45 7 leonardo 0x000025c6 start + 54 Anything I'm missing something, doing something silly, or is this all I can expect out of backtrace on OS/X? Some other tidbits: I don't see a rdynamic link option for the g++ version (4.0.1) I'm using. -g/-g3 doesn't make any difference. abi::__cxa__demangle doesn't seem to do anything

    Read the article

  • Implicit Type Conversions in Reflection

    - by bradhe
    So I've written a quick bit of code to help quickly convert between business objects and view models. Not to pimp my own blog, but you can find the details here if you're interested or need to know. One issue I've run in to is that I have a custom collection type, ProductCollection, and I need to turn that in to a string[] in on my model. Obviously, since there is no default implicit cast, I'm getting an exception in my contract converter. So, I thought I would write the next little bit of code and that should solve the problem: public static implicit operator string[](ProductCollection collection) { var list = new List<string>(); foreach (var product in collection) { if (product.Id == null) { list.Add(null); } else { list.Add(product.Id.ToString()); } } return list.ToArray(); } However, it still fails with the same cast exception. I'm wondering if it has something to do with being in reflection? If so, is there anything that I can do here?? I'm open to architectural solutions, too!

    Read the article

  • WCF configuration setting information at a glance

    - by Newbie
    Is there any site from where I can get the most of the information about WCF configuration settings e.g. keyEntropyMode,maxStatefulNegotiations,sessionKeyRolloverInterval, negotiationTimeout etc. I have started recently working in wcf but is facing many troubles in understanding the terms. There are to be honest huge. And whenever I get stuck, it takes a long time for me to solve it (searching and searching in google and after spending sometime hours I may get the solution). Henceforth, I think it is better to know if not all astleast some of the terms and their usage and what they means. It would be great help if anyone can point such a link. I searched in the net with " wcf configuration file elements" but with not much luck. Thanks

    Read the article

  • How can I truncate the mangled C++ identifiers shown by GDB's disassemble command?

    - by Rhys Ulerich
    GDB's disassemble command is nice for short C identifiers, e.g. main. For long, mangled C++ identifiers the verbosity is overkill. For example, using icpc I see results like (gdb) disassemble 0x49de2f 0x49de5b Dump of assembler code from 0x49de2f to 0x49de5b: 0x000000000049de2f <_ZN5pecos8suzerain16fftw_multi_array6detail18c2c_buffer_processIPA2_dPKSt7complexIdEilNS2_26complex_copy_differentiateIS4_EEEEvT_T1_T2_T0_SD_SE_RKT3_+167>: mov 0x18(%rsp),%rsi Displays that long are annoying in the CLI. They make GDB's TUI assembly display all but useless. Is there a way to tell GDB to show a truncated identifier? Say clip all but 50 characters?

    Read the article

  • Help with Btree homework

    - by Phenom
    I need to do a preorder traversal of a Btree, and among other things, print the following information for each page (which is the same thing as a node): The B-Tree page number The value of each B-Tree page pointer (e.g., address, byte offset, RRN). My questions are: 1. How do you figure out the byte offset? What is it offset from? 2. Isn't the RRN the same as the page number? Note: A Btree is NOT A BINARY TREE. Btrees can have multiple keys in each node, and a node with n keys has n+1 child pointers.

    Read the article

  • Is TRIM supported on RAID 0 configurations for SSD drives in windows 7?

    - by John Sonmez
    I know this question has probably been asked at some point in the past, but I am trying to figure out if Windows 7 supports passing TRIM commands through RAID controllers yet. I am trying to decide between buying a single SSD drive and utilizing TRIM or Buying two SSD drives and putting them in RAID 0 configuration What is the fastest current configuration I can set up? I want my development machine to be BLAZING fast.

    Read the article

  • Is Your Website Relevant?

    Google SERPs display websites according to their relevance to the keyword been searched. As commonsense tells, the top 10 sites in the search results are the most relevant sites according to Google and without doubt...

    Read the article

  • My Rant About the SEO Specialist

    Clients wishing to avail of search engine optimization services will have an important choice to make. They can choose between hiring SEO specialists or SEO generalists to provide the services they need. SEO specialists are technicians who concentrate on specific aspects of search engine optimization while generalists will take on all aspects of it. This article looks into the pros and cons of employing these service providers.

    Read the article

  • Creating Your First Website

    If you are looking into website creation as a form of business or just as a hobby to give an input of your freedom of expression, check out how creating your first website can be a simple task as long as you follow these simple tips and believe in yourself. The first thing you want to do when you are looking to create your first website is run a search in a search engine for guides that can help you though the process. There are hundreds of guides available online that run you through the process of website creation....

    Read the article

  • UIAcceleration filtering

    - by Ilya
    Hi, I found the following piece of code in apple guidelines: - (void)accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration { //Use a basic low-pass filter to only keep the gravity in the accelerometer values accel[0] = acceleration.x * kFilteringFactor + accel[0] * (1.0 - kFilteringFactor); accel[1] = acceleration.y * kFilteringFactor + accel[1] * (1.0 - kFilteringFactor); accel[2] = acceleration.z * kFilteringFactor + accel[2] * (1.0 - kFilteringFactor); } What does it exactly do? What is this low-pass filter? Why do I have to apply it? Thank you in advance.

    Read the article

  • How do I sanitize a string in PHP that contains "; Echo"? (I have a solid reason)

    - by user337878
    I turned this case into a simple PHP page that submits to itself. My issue is that I am submitting track meet results and one of the girl's names is Echo...a lovely name. The problem text I'm submitting is: Pole vault - Rachel Simons, Tow, 8-6; Echo Wilson, Cit, 8-0; Molly Randall, Tow, 7-0; So you see a semicolon followed by white space followed by Echo... After submitting, it says: POST to /results/test.php not supported The end goal is to save it to a database along with some other info and have a search page to find it and simply print out the full result on the screen. I stripped out all my database stuff to get it down to this one error. I mean, I can intentionally mis-spell her name, but there's gotta be a way around this, right??? Here's the test PHP file. <html> <head> <title>title</title> </head> <body> <?php echo "<h3>Edit meet info below</h3>"; echo "<form action=\"test.php\" method=\"post\" id=\"submitForm\">"; echo "Full Results:<br/><textarea NAME=\"results\" id=\"results\" rows=\"20\" cols=\"80\" MAXLENGTH=\"8191\"></textarea><br/><br/>"; echo "<input type=\"submit\" name=\"submitMeet\" value=\"Submit\">"; echo "</form>"; ?> </body> </html>

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >