Search Results

Search found 3353 results on 135 pages for 'volume activation'.

Page 96/135 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • LVM incorrectly reported missing after power failure

    - by mensi
    We have had a major power failure in the data-center. We are using a set of servers for our storage needs. The main server has several pairs of disks mirrored with mdadm. The resulting /dev/mdX are LVM physical volumes and belong to a big volume-group with all our data. After the powerloss, we had the problem that one of the mdadm devices was not auto-detected due to a missing entry in mdadm.conf. As a consequence, the volumegroup had inactive logical volumes due to the missing PV. We were able to fix the mdadm config and reboot. pvscan shows all expected PVs but one LV still does not come up. vgdisplay shows: [...] Cur PV: 3 Act PV: 2 [...] Neither vgscan nor pvscan show any missing devices. What went wrong? How can we force LVM to activate all PVs?

    Read the article

  • How Do I Migrate 100 DBs From One MS-SQL 2008 Server To Another? (looking for automation)

    - by jc4rp3nt3r
    Let me start by saying that I am not a DBA, but I am in a position where I am responsible for moving just under 100 MS-SQL 2008 DBs from our current development server, to a new/better/faster development server. As this is just a local dev server, temporary downtime is acceptable, but I am looking for a way to move all of the databases (preferably in bulk). I know that I could take a bak of each, and restore it on the new server, but given the volume of DBs, I am looking for a more efficient way. I am not opposed to learning a new piece of software, writing code or any other requirement, so long as it speeds up the process.

    Read the article

  • Converted VmWare Image does not boot in Virtual Box

    - by vBox Question
    I have a .vddx virtual image which boots in VmWare, but I'm having trouble getting it to work with Sun Virtual Box. In Sun Virtual Box, I created a new Virtual Machine and pointed it at the vddx file from VmWare. When I try to boot the virtual machine, Sun Virtual Box says that the volume is not bootable. VmWare is able to boot from this virtual machine. Does anyone have any suggestions about what might be causing the problem? Is there a conversion utility that I need to run? Any debugging options that I could turn on?

    Read the article

  • Can You Specify Where LVM Snapshots Are (Initially) Stored?

    - by bottles
    Disclaimer: this is my first time using lvm. Upon RTFM, it appears that LVM snapshots are automatically stored in the same directory as the original logical volume. In my case, that would mean the /dev directory. This isn't very nice, because there's not enough disk space in there for me to store a large snapshot. So when I run a command like lvcreate --size 1G --snapshot --name snapshot /dev/lvmData/usr, I need an additional 1G of space free in /dev? Is there any way to specify a different directory in which to store my snapshot?

    Read the article

  • samsung netbook OS for clean install

    - by Alex
    Hello - I recently had a problem with a corrupted registry on a samsung N120. When all else failed i reformatted the drive. However having bought the machine with windows home ed pre-installed, I didn't have original windows disck for the clean install. So I managed to install another edition of windows XP (PRO this time). Now windows opens, but several key functions are missing. e.g.: screen resolution - will not allow me any but 800x600 resolution native buttons - such as the fn + screen brightness is not working at all. Any suggestions please? ? Is there a way to get the samsung OS online (since I do have the manufacturer's/installed product key)? thanks PS: It has been my intention to install ubuntu, but i need to know i will not lose functions like screen brightness, volume, and the trackpad's scrolling function. I'd be happy to bypass the windows option if i was sure to have full keyboard/samsung functionality

    Read the article

  • My microphone is too quiet

    - by AmitM9S6
    I've been chatting with skype for a long time.. and I don't know why, but for X time it's fine, and then it's too quiet.. Here how it goes : I'm booting the PC - getting into a skype call with friends - talking with friends on skype - (everything goes well) - Closing the skype call - Going back to a skype call like a hour after -. They can't hear me well, I have to shout so they'll hear me, and in the settings, it's on 100% + 30 DECIBELS, so I can't raise it higher... and if I'll re-boot my PC, it'll be well until I'll close the skype call again.. Every time I'm skyping with friends well, and then when I close the call and come back after a while, they hear me really low(volume).. I've been trying to fix this problem for about 2 months! If you'll be able to help me, I'd be so happy. (btw It's connected not through USB, but through a microphone connection and headphone connection...) Also, I got Windows 7..

    Read the article

  • Mapping Ctrl+Arrow for Home/End/PageUp/Down

    - by user67275
    I'm using Windows 7 on Dell New Inspiron 14z Ultrabook. It doesn't have Home/End/PgUp/PgDn keys. Instead I have to use Fn + arrow keys. Can I re-map those to Ctrl + arrows or Alt + arrows or Shift + arrows? That way I could go one page up and down with only my right hands rather than with the left hand on the Fn key and right hand on arrow key. Also, volume up and down is assigned to FnF11 and FnF12. Can I re-map them to F11 and F12? Existing functions assigned to F11 and F12 will be replaced by FnF11 and FnF12. Is it possible?

    Read the article

  • Table Formatting in Word

    - by user359217
    I have a table in Word which is 5 columns wide and multiple rows. In Row 3, cells 1, 2, 3 & 5 have simple text. Cell 4 contains a large quantity of text and therefore needs to wrap over several pages. Therefore, I mark "Allow row to break across pages". Problem: on next page where row has wrapped, cells 1, 2, 3 & 5 are blank with cell 4 displaying the wrapped text. Is there any way that I can get the simple text from Row 3, cells 1, 2 and 3 to repeat on the pages which contain the wrapped text of cell 4? I do not want the data to be in the table heading, as I have multiple rows which have a similar volume of text.

    Read the article

  • Xubuntu 12.04: Slow Login

    - by naxchange
    I'm running Xubuntu 12.04, and after I ran the update, my login started slowing down big time. I've dabbled a little bit with the programs in Settings - Settings Manager - Session and Startup, and tried closing and opening these programs, and then rebooting. Anyways, I narrowed it down to a combination of 2 processes, "Network" (the connection manager) and "Xfce Volume Daemon". Their corresponding terminal commands are: ~$ nm-applet ~$ xfce4-volumed If I disable them, and then run them after login is complete, everything works just fine. Is there a way for me to run these commands automatically at start up? I want to maybe write a shell script and save it somewhere, or at least edit the order things happen after login, so the desktop can load before these processes. Hope I've been clear enough, and thanks in advance! NAX

    Read the article

  • My microphone is too quiet (seems to be connected with Skype)

    - by AmitM9S6
    I've been chatting with skype for a long time.. and I don't know why, but for X time it's fine, and then it's too quiet.. Here how it goes : I'm booting the PC - getting into a skype call with friends - talking with friends on skype - (everything goes well) - Closing the skype call - Going back to a skype call like a hour after -. They can't hear me well, I have to shout so they'll hear me, and in the settings, it's on 100% + 30 DECIBELS, so I can't raise it higher... and if I'll re-boot my PC, it'll be well until I'll close the skype call again.. Every time I'm skyping with friends well, and then when I close the call and come back after a while, they hear me really low(volume).. I've been trying to fix this problem for about 2 months! If you'll be able to help me, I'd be so happy. (btw It's connected not through USB, but through a microphone connection and headphone connection...) Also, I got Windows 7..

    Read the article

  • Preference List only shows first element

    - by jmunoz
    I am developing a PreferenceActivity with custom Preference views. My problem is that I created a view with a ListView and it only shows the first element. I post my code and an image: http://imageshack.us/photo/my-images/545/sc20120307161530.png/ xml: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceCategory android:key="player_settings" android:title="@string/settings_player_config" > <EditTextPreference android:defaultValue="@string/settings_player_default_name" android:dialogMessage="@string/settings_player_summary" android:dialogTitle="@string/settings_playersname" android:key="player_name" android:summary="@string/settings_player_summary" android:title="@string/settings_playersname" /> </PreferenceCategory> <PreferenceCategory android:key="volume" android:title="@string/settings_volume" > <com.battleship.preferences.SeekBarPreferences android:defaultValue="50" android:key="volume" android:title="@string/settings_volume" /> </PreferenceCategory> <PreferenceCategory android:key="shine" android:title="@string/settings_shine" > <com.battleship.preferences.SeekBarPreferences android:defaultValue="50" android:key="shine" android:title="@string/settings_shine" /> </PreferenceCategory> <PreferenceCategory android:key="themeTitle" android:title="@string/settings_group_themes" > <com.battleship.preferences.ListPreferences android:key="theme" /> </PreferenceCategory> <PreferenceCategory android:key="fontsTitle" android:title="@string/settings_group_font_size" > <com.battleship.preferences.ListPreferences android:key="font" /> </PreferenceCategory> </PreferenceScreen> The Custom ListPreference: package com.battleship.preferences; import com.battleship.R; import android.content.Context; import android.content.SharedPreferences; import android.media.AudioManager; import android.preference.Preference; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.RadioGroup.OnCheckedChangeListener; import android.widget.Toast; public class ListPreferences extends Preference implements OnCheckedChangeListener { public ListPreferences(Context context) { super(context); } public ListPreferences(Context context, AttributeSet attrs) { super(context, attrs); } public ListPreferences(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onClick() { super.onClick(); Toast t = Toast.makeText(getContext(), "HOLA!", 3); t.show(); } @Override protected View onCreateView(ViewGroup parent) { String[] contentString = new String[3]; if (getKey().equals("theme")) { contentString = new String[] { (getContext().getString(R.string.settings_theme_default)), (getContext().getString(R.string.settings_theme_black)), (getContext().getString(R.string.settings_theme_white)) }; } else { contentString = new String[] { (getContext().getString(R.string.settings_font_big)), (getContext().getString(R.string.settings_font_medium)), (getContext().getString(R.string.settings_font_little)) }; } ListView listView = new ListView(getContext()); ArrayAdapter<String> array = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_single_choice, android.R.id.text1, contentString); listView.setAdapter(array); listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); return listView; } private void updatePreference(int intRadio) { SharedPreferences.Editor editor = getEditor(); editor.putInt(getKey(), intRadio); editor.commit(); } }

    Read the article

  • eXML-PARSER output contains unwanted hash references

    - by seaworthy
    So I wrote a parser routine to take one xml file and reparse into another one. This code I later modified to split a large xml file into many small xml files. I am having a problem with an output. Parsing works fine the only thing output also includes unwanted strings like HASH(0x19f9b58), I am not sure why and need set of friendly eyes. use Encode; use XML::Parser; my $parser = XML::Parser->new( Handlers => {Start => \&handle_elem_start, End => \&handle_elem_end,Char => \&handle_char_data,}); my $record; my $file = shift @ARGV; if( $file ) {$parser->parsefile( $file );} exit; sub handle_elem_start { my( $expat, $name, %atts ) = @_; if ($name eq 'articles'){$file="_data.xml";unlink($file);} $record .= "<"; $record .= "$name"; foreach my $key (keys %atts){$record .= " $key=\"$atts{$key}\"";} $record .= ">"; } sub handle_char_data { my( $expat, $text ) = @_; $text = decode_utf8( $text ); $record .= "$text"; } sub handle_elem_end { my( $expat, $name ) = @_; $record .= "</$name>"; if( $name eq 'article' ) { open (MYFILE, '>>'.$file); print MYFILE $record; close (MYFILE); print $record; $record = {}; } return unless( $name eq 'article' ); } Sample output: ... </article>HASH(0x19f9b40) <article doi="10.1103/PhysRevSeriesI.9.304"> <journal short="Phys. Rev. (Series I)" jcode="PRI">Physical Review (Series I)</journal> <volume>9</volume> <issue printdate="1899-11-00">5</issue> <fpage>304</fpage> <lpage>309</lpage> <seqno>1</seqno> <price></price><tocsec>Articles</tocsec> <arttype type="article"></arttype><doi>10.1103/PhysRevSeriesI.9.304</doi> <title>An Investigation of the Magnetic Qualities of Building Brick</title> <authgrp> <author><givenname>O.</givenname><middlename>A.</middlename><surname>Gage</surname></author> <author><givenname>H.</givenname><middlename>E.</middlename><surname>Lawrence</surname></author> </authgrp> <cpyrt> <cpyrtdate date="1899"></cpyrtdate><cpyrtholder>The American Physical Society</cpyrtholder> </cpyrt> </article>HASH(0x19f9b58) ... HASH strings are not wanted, please advise.

    Read the article

  • Spring, Hibernate, Blob lazy loading

    - by Alexey Khudyakov
    Dear Sirs, I need help with lazy blob loading in Hibernate. I have in my web application these servers and frameworks: MySQL, Tomcat, Spring and Hibernate. The part of database config. <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="user" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <property name="driverClass" value="${jdbc.driverClassName}"/> <property name="jdbcUrl" value="${jdbc.url}"/> <property name="initialPoolSize"> <value>${jdbc.initialPoolSize}</value> </property> <property name="minPoolSize"> <value>${jdbc.minPoolSize}</value> </property> <property name="maxPoolSize"> <value>${jdbc.maxPoolSize}</value> </property> <property name="acquireRetryAttempts"> <value>${jdbc.acquireRetryAttempts}</value> </property> <property name="acquireIncrement"> <value>${jdbc.acquireIncrement}</value> </property> <property name="idleConnectionTestPeriod"> <value>${jdbc.idleConnectionTestPeriod}</value> </property> <property name="maxIdleTime"> <value>${jdbc.maxIdleTime}</value> </property> <property name="maxConnectionAge"> <value>${jdbc.maxConnectionAge}</value> </property> <property name="preferredTestQuery"> <value>${jdbc.preferredTestQuery}</value> </property> <property name="testConnectionOnCheckin"> <value>${jdbc.testConnectionOnCheckin}</value> </property> </bean> <bean id="lobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" /> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="configLocation" value="/WEB-INF/hibernate.cfg.xml" /> <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" /> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">${hibernate.dialect}</prop> </props> </property> <property name="lobHandler" ref="lobHandler" /> </bean> <tx:annotation-driven transaction-manager="txManager" /> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> The part of entity class @Lob @Basic(fetch=FetchType.LAZY) @Column(name = "BlobField", columnDefinition = "LONGBLOB") @Type(type = "org.springframework.orm.hibernate3.support.BlobByteArrayType") private byte[] blobField; The problem description. I'm trying to display on a web page database records related to files, which was saved in MySQL database. All works fine if a volume of data is small. But the volume of data is big I'm recieving an error "java.lang.OutOfMemoryError: Java heap space" I've tried to write in blobFields null values on each row of table. In this case, application works fine, memory doesn't go out of. I have a conclusion that the blob field which is marked as lazy (@Basic(fetch=FetchType.LAZY)) isn't lazy, actually! How can I solve the issie? Many thanks for advance.

    Read the article

  • How to validate and entry on a datagrid that is bound to an adapter

    - by Ziv
    Hi, I've been using C# for a while and began a program now to learn WPF-which means I know almost nothing of it. I used this tutorial as a guide to do what I wanted to do (which is binding a database to a datagrid), after a hard struggle to add the adapter as the source of the datagrid I now want to enable editing with validation on some of the cells. My problem is that the data is sent straight from the adapter and not through an object collection (I had a hard time getting to this situation, see the first half of the tutorial on how to bind the adapter and dataset through the resources) but the tutorial doesn't show a way to validate the datagrid if the data is sent through an adapter-only through a collection. To make it clear-how do I validate input in a datagrid that is bound to an adapter through a resource? The relevant code: (XAML) <Window.Resources> <ObjectDataProvider x:Key="DiscsDataProvider" ObjectType="{x:Type local:DiscsDataProvider}" /> <ObjectDataProvider x:Key="Discs" ObjectInstance="{StaticResource ResourceKey=DiscsDataProvider}" MethodName="GetDiscs" /> <Style x:Key="CellEditStyle" TargetType="{x:Type TextBox}"> <Setter Property="BorderThickness" Value="0"/> <Setter Property="Padding" Value="0"/> <Setter Property="Background" Value="Yellow"/> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> </Window.Resources> For the datagrid: <Grid Width="auto" Height="auto"> <DockPanel DataContext="{Binding Source={StaticResource ResourceKey=Discs}}"> <DataGrid Margin="12,0,0,12" Name="View_dg" HorizontalAlignment="Left" Width="533" Height="262" VerticalAlignment="Bottom" ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeColumns="True"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding Path=ContainerID}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Container" /> <DataGridTextColumn Binding="{Binding Path=ID}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="True" Header="ID" /> <DataGridTextColumn Binding="{Binding Path=Title}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Title" /> <DataGridTextColumn Binding="{Binding Path=SubTitle}" CanUserReorder="False" CanUserResize="True" CanUserSort="False" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Sub Title" /> <DataGridTextColumn Binding="{Binding Path=Type}" CanUserReorder="False" CanUserResize="True" CanUserSort="True" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Type" /> <DataGridTextColumn Binding="{Binding Path=Volume}" CanUserReorder="False" CanUserResize="True" CanUserSort="False" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Volume" /> <DataGridTextColumn Binding="{Binding Path=TotalDiscs}" CanUserReorder="False" CanUserResize="True" CanUserSort="False" EditingElementStyle="{StaticResource CellEditStyle}" IsReadOnly="False" Header="Total Discs" /> </DataGrid.Columns> </DataGrid> </DockPanel> and C#: public class DiscsDataProvider { private DiscsTableAdapter adapter; private DB dataset; public DiscsDataProvider() { dataset = new DB(); adapter = new DiscsTableAdapter(); adapter.Fill(dataset.Discs); } public DataView GetDiscs() { return dataset.Discs.DefaultView; } }

    Read the article

  • Special characters from MySQL database (e.g. curly apostrophes) are mangling my XML

    - by Toph
    I have a MySQL database of newspaper articles. There's a volume table, an issue table, and an article table. I have a PHP file that generates a property list that is then pulled in and read by an iPhone app. The plist holds each article as a dictionary inside each issue, and each issue as a dictionary inside each volume. The plist doesn't actually hold the whole article -- just a title and URL. Some article titles contain special characters, like curly apostrophes. Looking at the generated XML plist, whenever it hits a special character, it unpredictably gobbles up a whole bunch of text, leaving the XML mangled and unreadable. (...in Chrome, anyway, and I'm guessing on the iPhone. Firefox actually handles it pretty well, showing a white ? in a black diamond in place of any special characters and not gobbling anything.) Example well-formed plist snippet: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Rows</key> <array> <dict> <key>Title</key> <string>Vol. 133 (2003-2004)</string> <key>Children</key> <array> <dict> <key>Title</key> <string>No. 18 (Apr 2, 2004)</string> <key>Children</key> <array> <dict> <key>Title</key> <string>Basketball concludes historic season</string> <key>URL</key> <string>http://orient.bowdoin.edu/orient/article_iphone.php?date=2004-04-02&amp;section=1&amp;id=1</string> </dict> <!-- ... --> </array> </dict> </array> </dict> </array> </dict> </plist> Example of what happens when it hits a curly apostrophe: This is from Chrome. This time it ate 5,998 characters, by MS Word's count, skipping down to midway through the opening the title of a pizza story; if I reload it'll behave differently, eating some other amount. The proper title is: Singer-songwriter Farrell ’05 finds success beyond the bubble <dict> <key>Title</key> <string>Singer-songwriter Farrell ing>Students embrace free pizza, College objects to solicitation</string> <key>URL</key> <string>http://orient.bowdoin.edu/orient/article_iphone.php?date=2009-09-18&amp;section=1&amp;id=9</string> </dict> In MySQL that title is stored as (in binary): 53 69 6E 67 |65 72 2D 73 |6F 6E 67 77 |72 69 74 65 72 20 46 61 |72 72 65 6C |6C 20 C2 92 |30 35 20 66 69 6E 64 73 |20 73 75 63 |63 65 73 73 |20 62 65 79 6F 6E 64 20 |74 68 65 20 |62 75 62 62 |6C Any ideas how I can encode/decode things properly? If not, any idea how I can get around the problem some other way? I don't have a clue what I'm talking about, haha; let me know if there's any way I can help you help me. :) And many thanks!

    Read the article

  • Java algorithm for normalizing audio

    - by Marty Pitt
    I'm trying to normalize an audio file of speech. Specifically, where an audio file contains peaks in volume, I'm trying to level it out, so the quiet sections are louder, and the peaks are quieter. I know very little about audio manipulation, beyond what I've learnt from working on this task. Also, my math is embarrassingly weak. I've done some research, and the Xuggle site provides a sample which shows reducing the volume using the following code: (full version here) @Override public void onAudioSamples(IAudioSamplesEvent event) { // get the raw audio byes and adjust it's value ShortBuffer buffer = event.getAudioSamples().getByteBuffer().asShortBuffer(); for (int i = 0; i < buffer.limit(); ++i) buffer.put(i, (short)(buffer.get(i) * mVolume)); super.onAudioSamples(event); } Here, they modify the bytes in getAudioSamples() by a constant of mVolume. Building on this approach, I've attempted a normalisation modifies the bytes in getAudioSamples() to a normalised value, considering the max/min in the file. (See below for details). I have a simple filter to leave "silence" alone (ie., anything below a value). I'm finding that the output file is very noisy (ie., the quality is seriously degraded). I assume that the error is either in my normalisation algorithim, or the way I manipulate the bytes. However, I'm unsure of where to go next. Here's an abridged version of what I'm currently doing. Step 1: Find peaks in file: Reads the full audio file, and finds this highest and lowest values of buffer.get() for all AudioSamples @Override public void onAudioSamples(IAudioSamplesEvent event) { IAudioSamples audioSamples = event.getAudioSamples(); ShortBuffer buffer = audioSamples.getByteBuffer().asShortBuffer(); short min = Short.MAX_VALUE; short max = Short.MIN_VALUE; for (int i = 0; i < buffer.limit(); ++i) { short value = buffer.get(i); min = (short) Math.min(min, value); max = (short) Math.max(max, value); } // assign of min/max ommitted for brevity. super.onAudioSamples(event); } Step 2: Normalize all values: In a loop similar to step1, replace the buffer with normalized values, calling: buffer.put(i, normalize(buffer.get(i)); public short normalize(short value) { if (isBackgroundNoise(value)) return value; short rawMin = // min from step1 short rawMax = // max from step1 short targetRangeMin = 1000; short targetRangeMax = 8000; int abs = Math.abs(value); double a = (abs - rawMin) * (targetRangeMax - targetRangeMin); double b = (rawMax - rawMin); double result = targetRangeMin + ( a/b ); // Copy the sign of value to result. result = Math.copySign(result,value); return (short) result; } Questions: Is this a valid approach for attempting to normalize an audio file? Is my math in normalize() valid? Why would this cause the file to become noisy, where a similar approach in the demo code doesn't?

    Read the article

  • xts error - order.by requires an appropriate time-based object

    - by Samo
    I can not resolve why error in simple creation of xts object xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE)) Error in xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE)) : order.by requires an appropriate time-based object appeared while this was working perfectly 14 days ago when I last used the same code (since then the only difference is that TICK.NYSE grow in length since data was added since then). More details below: > Sys.getenv("TZ") [1] "EST" > tail(xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE))) Error in xts(rep(0, NROW(TICK.NYSE)), order.by = index(TICK.NYSE)) : order.by requires an appropriate time-based object > class(index(TICK.NYSE["T09:30/T09:31"])) [1] "POSIXct" > tail(xts(rep(0, NROW(tail(TICK.NYSE))), order.by = index(tail(TICK.NYSE)))) Error in xts(rep(0, NROW(tail(TICK.NYSE))), order.by = index(tail(TICK.NYSE))) : order.by requires an appropriate time-based object > tail(TICK.NYSE) TICK-NYSE.Open TICK-NYSE.High TICK-NYSE.Low TICK-NYSE.Close 2012-03-15 14:54:00 -278 -89 -299 -89 2012-03-15 14:55:00 -89 427 -89 201 2012-03-15 14:56:00 201 318 30 234 2012-03-15 14:57:00 234 242 -222 -64 2012-03-15 14:58:00 -64 346 -82 346 2012-03-15 14:59:00 346 525 36 525 TICK-NYSE.Volume TICK-NYSE.WAP TICK-NYSE.hasGaps 2012-03-15 14:54:00 0 0 0 2012-03-15 14:55:00 0 0 0 2012-03-15 14:56:00 0 0 0 2012-03-15 14:57:00 0 0 0 2012-03-15 14:58:00 0 0 0 2012-03-15 14:59:00 0 0 0 TICK-NYSE.Count 2012-03-15 14:54:00 31 2012-03-15 14:55:00 31 2012-03-15 14:56:00 31 2012-03-15 14:57:00 31 2012-03-15 14:58:00 29 2012-03-15 14:59:00 30 > str(TICK.NYSE) An ‘xts’ object from 2011-01-18 09:30:00 to 2012-03-15 14:59:00 containing: Data: num [1:114090, 1:8] -5 -144 24 -148 -184 -77 20 121 111 -60 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:8] "TICK-NYSE.Open" "TICK-NYSE.High" "TICK-NYSE.Low" "TICK-NYSE.Close" ... Indexed by objects of class: [POSIXct,POSIXt] TZ: xts Attributes: List of 4 $ from : chr "20110119 23:59:59" $ to : chr "20110124 23:59:59" $ src : chr "IB" $ updated: POSIXct[1:1], format: "2012-01-19 02:34:52" > str(index(TICK.NYSE)) Class 'POSIXct' atomic [1:114090] 1.3e+09 1.3e+09 1.3e+09 1.3e+09 1.3e+09 ... ..- attr(*, "tzone")= chr "" ..- attr(*, "tclass")= chr [1:2] "POSIXct" "POSIXt" > Sys.getenv("TZ") [1] "EST" > tail(index(TICK.NYSE)) [1] "2012-03-15 14:54:00 EST" "2012-03-15 14:55:00 EST" [3] "2012-03-15 14:56:00 EST" "2012-03-15 14:57:00 EST" [5] "2012-03-15 14:58:00 EST" "2012-03-15 14:59:00 EST" > head(index(TICK.NYSE)) [1] "2011-01-18 09:30:00 EST" "2011-01-18 09:31:00 EST" [3] "2011-01-18 09:32:00 EST" "2011-01-18 09:33:00 EST" [5] "2011-01-18 09:34:00 EST" "2011-01-18 09:35:00 EST" > Sys.info() sysname "Linux" release "3.0.0-16-generic" version "#28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012" > sessionInfo() R version 2.14.1 (2011-12-22) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.20-0 multicore_0.1-7 [3] doSNOW_1.0.5 snow_0.3-8 [5] doRedis_1.0.4 rredis_1.6.3 [7] foreach_1.3.2 codetools_0.2-8 [9] iterators_1.0.5 PerformanceAnalytics_1.0.3.3 [11] quantstrat_0.6.1 blotter_0.8.4 [13] twsInstrument_1.3-3 FinancialInstrument_0.10.6 [15] IBrokers_0.9-6 quantmod_0.3-18 [17] TTR_0.21-0 xts_0.8-4 [19] Defaults_1.1-1 strucchange_1.4-6 [21] sandwich_2.2-8 zoo_1.7-7 [23] rj_1.0.2-5 loaded via a namespace (and not attached): [1] grid_2.14.1 tools_2.14.1 > dput(tail(TICK.NYSE)) structure(c(-385, -213, -42, -334, -233, -111, -121, 20, -14, -125, -73, 265, -583, -269, -426, -520, -443, -440, -213, -42, -334, -233, -111, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 31, 30, 30, 31, 31), class = c("xts", "zoo" ), .indexCLASS = c("POSIXct", "POSIXt"), .indexTZ = "", from = "20110119 23:59:59", to = "20110124 23:59:59", src = "IB", updated = structure(1326958492.96405, class = c("POSIXct", "POSIXt")), index = structure(c(1331927640, 1331927700, 1331927760, 1331927820, 1331927880, 1331927940), tzone = "", tclass = c("POSIXct", "POSIXt")), .Dim = c(6L, 8L), .Dimnames = list(NULL, c("TICK-NYSE.Open", "TICK-NYSE.High", "TICK-NYSE.Low", "TICK-NYSE.Close", "TICK-NYSE.Volume", "TICK-NYSE.WAP", "TICK-NYSE.hasGaps", "TICK-NYSE.Count")))

    Read the article

  • Split a Large File In C++

    - by wdow88
    Hey all, I'm trying to write a program that takes a large file (of any time) and splits it into many smaller "chunks". I think I have the basic idea down, but for some reason I cannot create a chunk size over 12,000 bites. I know there are a few solutions on google, etc. but I am more interested in learning what the origin of this limitation is then actually using the program to split files. //This file splits are larger into smaller files of a user inputted size. #include<iostream> #include<fstream> #include<string> #include<sstream> #include <direct.h> #include <stdlib.h> using namespace std; void GetCurrentPath(char* buffer) { _getcwd(buffer, _MAX_PATH); } int main() { // use the function to get the path char CurrentPath[_MAX_PATH]; GetCurrentPath(CurrentPath);//Get the current directory (used for displaying output) fstream bigFile; string filename; int partsize; cout << "Enter a file name: "; cin >> filename; //Recieve target file cout << "Enter the number of bites in each smaller file: "; cin >> partsize; //Recieve volume size bigFile.open(filename.c_str(),ios::in | ios::binary); bigFile.seekg(0, ios::end); // position get-ptr 0 bytes from end int size = bigFile.tellg(); // get-ptr position is now same as file size bigFile.seekg(0, ios::beg); // position get-ptr 0 bytes from beginning for (int i = 0; i <= (size / partsize); i++) { //Build File Name string partname = filename; //The original filename string charnum; //archive number stringstream out; //stringstream object out, used to build the archive name out << "." << i; charnum = out.str(); partname.append(charnum); //put the part name together //Write new file part fstream filePart; filePart.open(partname.c_str(),ios::out | ios::binary); //Open new file with the name built above //Check if near the end of file if (bigFile.tellg() < (size - (size%partsize))) { filePart.write(reinterpret_cast<char *>(&bigFile),partsize); //Write the selected amount to the file filePart.close(); //close file bigFile.seekg(partsize, ios::cur); //move pointer to next position to be written } //Changes the size of the last volume because it is the end of the file else { filePart.write(reinterpret_cast<char *>(&bigFile),(size%partsize)); //Write the selected amount to the file filePart.close(); //close file } cout << "File " << CurrentPath << partname << " produced" << endl; //display the progress of the split } bigFile.close(); cout << "Split Complete." << endl; return 0; } Any ideas? Thanks!

    Read the article

  • Smithsonian Showcases Video Game History with The Art of Video Games [Video]

    - by Jason Fitzpatrick
    The Art of Video Games is the Smithsonian’s look at the history of video games; check out this video trailer to see what the exhibition is all about and hear from some notable folks. From the Smithsonian listing for the exhibition: The Art of Video Games is one of the first exhibitions to explore the forty-year evolution of video games as an artistic medium, with a focus on striking visual effects and the creative use of new technologies. It features some of the most influential artists and designers during five eras of game technology, from early pioneers to contemporary designers. The exhibition focuses on the interplay of graphics, technology and storytelling through some of the best games for twenty gaming systems ranging from the Atari VCS to the PlayStation 3. The exhibit will be at the Smithsonian until the end of September and will then begin touring the country. Hit up the link below for more information. The Art of Video Games Tour [via Neatorama] How To Properly Scan a Photograph (And Get An Even Better Image) The HTG Guide to Hiding Your Data in a TrueCrypt Hidden Volume Make Your Own Windows 8 Start Button with Zero Memory Usage

    Read the article

  • Flash in browsers does not play sound accurately using Pulse network audio

    - by Dave M G
    I use PulseAudio to send sound over the LAN to an audio server. When playing any Flash media in Firefox or Chrome, the sound flutters, as if the volume were going up and down every second. The problem does not exhibit with any other software, and I think it's specific to how Flash interacts with my sound set up. How do I get Flash to play nice with the PulseAudio network sound server? Update I have discovered that I can stop the sound fluttering if I follow these steps: Start a Flash video Run pulseaudio --kill on the server Wait about 7 seconds After this, the PulseAudio server automatically respawns, and the sound in the Flash video is perfect. The problem now, though, is that I have to do this every time I start a Flash video. This is obviously not desireable. So, the question is, how do I make whatever it is that makes the sound work when I go through these steps stick so that I don't have to do them? Also, I've uploaded some PulseAudio log output to Pastebin, taken while attempting to play a Flash video, if that helps. I've tried to get logging details from Flash, but despite installing and enabling Flash for debugging, it has not generated any ouput at all. Details I have uploaded an example video of the problem onto Youtube. In the video you can see the opening of a Ted Talk video, and the sound flutters as it plays. The video also stutters while playing back. Here are my sound device output settings:

    Read the article

  • Awareness Makes Sure You’re Not Tuned Out While Listening to Music

    - by Jason Fitzpatrick
    iOS: You want to listen to your music but you don’t want to be totally unaware of your surroundings. What do you do? Install Awareness, a simple app that will alert you if your device mic picks up loud noises. Whether you want to fall asleep listening to some relaxing music while still hearing bumbs in the night or you want to listen to music when you’re out and about without being completely started by events your earbuds are filtering out. To use the app just run it in tandem with your music, adjust the sensitivity to account for the ambient sound, and you’re in business. If any sounds exceed that level, they’ll be piped in through your headphones to alert you. Awareness is currently free in the App Store (down from a high of $6.99) so if you’d like to play around with it, now’s the time to grab a copy. Awareness [via Addictive Tips] How To Be Your Own Personal Clone Army (With a Little Photoshop) How To Properly Scan a Photograph (And Get An Even Better Image) The HTG Guide to Hiding Your Data in a TrueCrypt Hidden Volume

    Read the article

  • Stupid Geek Tricks: Compare Your Browser’s Memory Usage with Google Chrome

    - by The Geek
    Ever tried to figure out exactly how much memory Google Chrome or Internet Explorer is using? Since they each show up a bunch of times in Task Manager, it’s not so easy! Here’s the quick and easy way to compare them. Both Chrome and IE use multiple processes to isolate tabs from each other, to make sure that one tab doesn’t kill the whole browser. Firefox, on the other hand, just uses a single process for everything. Rather than pulling out a calculator and adding them all up, you can just open up Google Chrome, and type in about:memory into the location bar to see a full list of each browser’s memory usage.   On my test system with 6 GB of system RAM, I’m running the Development channel version of Chrome, and I’ve got about 40 different tabs open, which is why the memory usage is so high. Firefox has 8 tabs open, and IE is enjoying being opened for the first time in forever. Want to help cut down on memory usage and keep your Chrome browser running fast? Disable all unnecessary extensions, and then make sure you disable any plug-ins that you don’t need either. Similar Articles Productive Geek Tips Stupid Geek Tricks: Duplicate a Tab with a Shortcut Key in Chrome or FirefoxStupid Geek Tricks: Shrink the XP Volume ControlStupid Geek Tricks: Tile or Cascade Multiple Windows in Windows 7Fix for Firefox memory leak on WindowsHow to Purge Memory in Google Chrome TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Download Free MP3s from Amazon Awe inspiring, inter-galactic theme (Win 7) Case Study – How to Optimize Popular Wordpress Sites Restore Hidden Updates in Windows 7 & Vista Iceland an Insurance Job? Find Downloads and Add-ins for Outlook

    Read the article

  • Friday Fun: Super Mario Bros. Crossover

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

    Read the article

  • How do you measure the value of your software?

    - by Mike
    Hi, One of the principles of agile is that you should measure working software: Working software is the primary measure of progress - 12 principles of Agile The thing is, while I can measure my software in terms of stories done, bugs squashed or the volume of defect reports decreasing, I'm stuck on how to measure the value of my software. If I use Mike Cohn as an example and his helping SalesForce.com deliver 500% more value to it's customers compared to the previous year* - how do I measure that increase? How do I measure where I am right now? Other metrics he uses are the number of features and the number of features per developer. This is something I could work out if my backlog was in good order and the stories were cut up by 'feature', but we're just starting out with Agile, so I need some way of working out what the value is we deliver now, then use a similar metric in say, six months, to see if we've increased our output. I've heard about measuring value of software by an uptick in revenue, or an increase in customer satisfaction (how would you measure that though?) but those increases could be attributed to anything in the company (sales, accounting, support) and not directly to the work my department is doing. So, how do you guys measure the value of your software and how did you start? Thanks, Mike *Succeeding With Agile - Mike Cohn

    Read the article

  • xvidcap: Error accessing sound input from /dev/dsp

    - by stivlo
    I'm running Ubuntu 11.10 and I'm trying xvidcap to record a screencast with audio from the microphone, however it can't record any sound: $ xvidcap --file appo.avi --cap_geometry 700x500-0+0 Error accessing sound input from /dev/dsp Sound disabled! Sure enough /dev/dsp doesn't even exist: $ sudo ls -lh /dev/dsp ls: cannot access /dev/dsp: No such file or directory I found a blog post about fixing xvidcap sound input, however if I try the suggestion I get: $ sudo modprobe snd-pcm-oss FATAL: Module snd_pcm_oss not found. So the question is, how can I create /dev/dsp? The problem behind the problem is: how can I record sound from the microphone with xvidcap? So workarounds are welcome too. UPDATE: I've followed the suggestion of James, and something has improved. The error accessing /dev/dsp is gone, however now I get: [oss @ 0x8e0c120] Estimating duration from bitrate, this may be inaccurate xtoffmpeg.c add_audio_stream(): Can't initialize fifo for audio recording Now when I record xvidcap appears in the recording tab of pavucontrol and I can choose Audio stream from Internal Audio Analog Stereo or Monitor of Internal Audio Analog Stereo, I tried both just in case, but the video is still mute. UPDATE 2: I found that "Monitor of" is the one to record application sounds, while for microphone, I should choose "Internal Audio Analog Stereo". To rule out other problems, such as with the microphone, I tried with gnome-sound-recorder and it works. Actually I jumped on my chair, since the volume was too high! :-)

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >