This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"<p>I recently upgraded to Yosemite, but I'm not sure if this is a Yosemite-related bug.</p>\r\n\r\n<p>My application folder (/Applications) does not open in finder (see screenshots)\r\nThe spinner keep spinning in the bottom right corner.\r\nAlso, when I \"Get Info\", it keeps calculating the size and never completes.\r\nAlso, when I drag the Applications folder to the dock, nothing happens.</p>\r\n\r\n<p>However, it works fine in Terminal:</p>\r\n\r\n<pre><code>$ cd /; ls -lh\r\ndrwxrwxr-x+ 129 root admin 4.3K Oct 17 03:14 Applications\r\n</code></pre>\r\n\r\n<p>When I go inside the Applications folder (in terminal), I can list all the files in it.Oddly enough, most of them are greyed out, and it only says \"total 8\" when I have way more than 8 apps.</p>\r\n\r\n<pre><code>$ cd /Applications; ls -lh\r\ntotal 8\r\ndrwxr-xr-x 4 root wheel 136B Apr 23 2013 3Hub.app\r\ndrwxr-xr-x@ 4 myusername staff 136B May 20 13:02 Adium.app\r\ndrwxrwxr-x 5 root admin 170B Feb 7 2013 Adobe\r\ndrwxrwxr-x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static KeyValuePair<string, string> GetLastChatMessage(string html) | |
{ | |
var startIndex = html.LastIndexOf("username owner", StringComparison.Ordinal); | |
startIndex = html.IndexOf(">", startIndex, StringComparison.Ordinal) + 1; | |
// Get username. | |
var username = html.Substring(startIndex, (html.IndexOf(">", startIndex + 1, StringComparison.Ordinal) - startIndex) - 5); | |
// Get message. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<A class=\"signature user-227577\" href=\"/users/227577/sam\">\r\n<DIV style=\"DISPLAY: none\" class=tiny-signature | |
jQuery17106276336429219909=\"318\">\r\n<DIV class=\"avatar avatar-16\"><IMG title=Sam alt=Sam src=\"http://i.stack.imgur.com/Y22En.png?s=128&g=1&g&s=16\" | |
width=16 height=16></DIV>\r\n<DIV class=\"username owner\">Sam</DIV></DIV>\r\n<DIV style=\"DISPLAY: block\" class=\"avatar avatar-32 clear-both\" | |
jQuery17106276336429219909=\"57\"><IMG title=Sam alt=Sam src=\"http://i.stack.imgur.com/Y22En.png?s=128&g=1&g&s=32\" width=32 height=32>\r | |
\n<DIV></DIV></DIV>\r\n<DIV style=\"DISPLAY: block\" class=\"username owner\" jQuery17106276336429219909=\"56\">Sam</DIV>\r\n<DIV class=flair title=125 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vector<WavFileRead> VSSEnvironment::GetChannels(string directory) | |
{ | |
vector<WavFileRead> files; | |
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(FrontLeft) + ".wav")) | |
{ | |
files.push_back(WavFileRead(directory + ChannelsFunctions::GetFriendlyName(FrontLeft) + ".wav")); | |
} | |
if (DirectoryTools::FileExists(directory + ChannelsFunctions::GetFriendlyName(FrontRight) + ".wav")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static IEnumerable<WavFileRead> GetChannels(string directory) | |
{ | |
var files = Enum.GetValues(typeof(Channels)).Cast<Channels>().Where(channel => channel != Channels.Custom && channel != Channels.Mono).Select(channel => Path.Combine(directory, channel.GetFriendlyName() + ".wav")).Where(File.Exists).Select(path => new WavFileRead(path)).ToList(); | |
files.AddRange(Directory.EnumerateFiles(directory).Where(fileName => fileName.Contains(Channels.Mono.GetFriendlyName()) || fileName.Contains(Channels.Custom.GetFriendlyName())).Select(file => new WavFileRead(file))); | |
return files; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (C) 2014 S.Kamber. | |
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// any later version. | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (C) 2014 S.Kamber. | |
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// any later version. | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Read32BitSamples is called first. | |
private float[] Read32BitSamples(FileStream stream, int sampleStartIndex, int sampleEndIndex) | |
{ | |
var bytesLength = 0; | |
var allocation = ReadBytes(stream, sampleStartIndex, sampleEndIndex, out bytesLength); | |
var bytes = (byte*)allocation.Allocation; | |
var samples = new float[bytesLength / 4]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
// WARNING: For the code below to exacute properly (without getting a SOE) this program must be | |
// a full-trust app; see, project properties > security > enable "ClickOnce security setting" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mark's method. | |
public unsafe static void TestMethod2() | |
{ | |
var ptr = Marshal.AllocHGlobal(50000000); | |
try | |
{ | |
float* x = (float*)ptr; |