w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Hide dtmf tone while dialing
There is no way for developers to do this via public APIs. Unfortunately, Android doesn't handle DTMF control very well. For example, there's a two year old feature request to allow a user to send DTMF controls at an arbitrary time during a call; it's been abandoned. As you know, using ACTION_CALL or ACTION_DIAL and doing <number>|,;|<tones> will send DTMF tones directly after a call is connected, but that's where user control over the issue stops. Any additional controls, such as sending additional tones or muting the tone response to the handset, are handled by internal APIs, notable com.android.internal.telephony. Of note is the stopDtmf() method, which would possibly do what you're looking for, except that it's internal and may not have consistent behavior. Here's what t

Categories : Android

Remove 1000Hz tone from FFT array in C
As Oli Charlesworth writes, because your target frequency is not exactly one of the FFT bins (your index, TargetFrequency * NumberOfElements / SamplingRate, is not exactly an integer), the energy of the target frequency will be spread across all bins. For a start, you can eliminate some of the frequency by zeroing the bin closest to the target frequency. This will of course affect other frequencies somewhat too, since it is slightly off target. To better suppress the target frequency, you will need to consider a more sophisticated filter. However, for educational purposes: To suppress the frequency corresponding to a bin, simply set that bin to zero. You must set both the real and the imaginary components of the bin to zero, which you can do with: copy[index*2 + 0] = 0; copy[index*2 + 1]

Categories : C

about "Playing an arbitrary tone with Android"
adding int x = 0; // Montior playback to find when done do { if (audioTrack != null) x = audioTrack.getPlaybackHeadPosition(); else x = numSamples; } while (x<numSamples); // Track play done. Release track. if (audioTrack != null) audioTrack.release(); after audioTrack.play(); stops the short clicking after the first time it is run. now i have to find out why it is not working when i change the freqOfTone.

Categories : Android

How to perform skin tone matching
This is a hard problem to solve, especially given the variation of colours depending on lighting and reflection. I have worked previously on finding skin in images, and generally the Cr (chroma red) component of the YCbCr colour space stands out prominently on skin. You might be able to exploit this information to find skin regions. Here are a couple of papers that attempt to use colour for locating human skin: 1. Interaction between hands and wearable cameras 2. Markerless inspection of augmented reality objects

Categories : Opencv

Sending a tone to only one side of the headphones
wavplay is a fairly old function. The modern audio player and writer methods assume your data is two-dimensional array where the first row or column is the left channel and the second is the right channel. So, for example, you might create a 1 second, 1000 Hz tone, sampled at 44.1 kHz: t = (0:44100)'./44100; y = sin(1000 * 2 * pi * t); You can then play it back in MATLAB in mono player = audioplayer(y, 44100); player.play(); or use it as just the left channel (switch the order of y and zeros(...) for just the right) player = audioplayer([y, zeros(size(y))], 44100); player.play(); or play the inverse on each channel player = audioplayer([y, -y], 44100); player.play(); To instead save to a file and play externally (or to read back into MATLAB later to play) the audiowrite funct

Categories : Matlab

Generate Sawtooth Tone in Java/Android
Period= 1/frequency, if that helps you figure it out. You can substitute this for your sample generation expression: sample[i]= 2*(i%(sampleRate/freqOfTone))/(sampleRate/freqOfTone)-1; Here is an example of how it works. Code is adapted from here

Categories : Java

Java (J2SE) DTMF tone detection
I don't know enough to help you out, but have you seen the DTMF implentation in TarsosDSP on github?

Categories : Java

Specifying Duration of sound(tone) created with WaveTone() in NAudio
The WaveTone class (assuming you're using one of the ones I just googled) probably provides an endless stream of data. If you want to limit the output to a specific duration you'll need to either load a specific amount of data into another buffer/stream or modify the WaveTone class to stop producing data past the duration. Something like this: class WaveTone : WaveStream { readonly WaveFormat Format; public readonly double Frequency; public readonly double Amplitude; public readonly double Duration; readonly long streamLength; long pos; const double timeIncr = 1 / 44100.0; readonly double sinMult; public WaveTone(double freq, double amp) : this(freq, amp, 0) { } public WaveTone(double freq, double amp, double dur) { Fo

Categories : C#

Reverb and Tone effects to Media player : android
It can be done in 2 ways One before creating the media player instance you can attach them by creating spepcifc set of profiles - http://developer.android.com/reference/android/media/MediaPlayer.html#attachAuxEffect(int) After creating mediaplayer, you can still create new aux and you need give mediaplayer's id with it. You need to set session id for mediaplayer before doing setsource. - setAudioSessionId Krishna

Categories : Java

How to disable audio tone on click of any button in my android application?
You can go with this code: YOUR_BUTTON.setSoundEffectsEnabled(false); OR Also you can give property with xml: android:soundEffectsEnabled="false" Reference site: Android View Doc Hope it will help you.

Categories : Java

toggle phone's state from ringing mode to vibration mode
Maybe an hint here : AudioManager To get mode : myAudioManager.getRingerMode(); and then (to change mode ) myAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); Mode list here

Categories : Android

record audio in java and determine real time if a tone of x frequency was played if so do something
If you're just looking for a specific frequency then an FFT-based method is probably a bad choice for your particular application, for two reasons: it's overkill - you're computing an entire spectrum just to detect the magnitude at one point to get 3 ms resolution for your onset detection you'll need a large overlap between successive FFTs, which will require much more CPU bandwidth than just processing successive blocks of samples A better choice for detecting the presence or absence of a single tone is the Goertzel algorithm (aka Goertzel filter). It's effectively a DFT evaluated at a single frequency domain bin, and is widely used for tone detection. It's much less computationally expensive than an FFT, very simple to implement, and you can test its output on every sample, so no res

Categories : Java

Creating a continuous tone in MATLAB whose frequency varies in real-time depending on user input
The solution may not come from multithreading, but from the use of another function to output a tone(audioplayer, play, stop). 'audioplayer/play' has the ability to output sounds that overlap in time. So basically, a pseudo code would be: get the value of the input generate/play a corresponding 5 second tone detect if any change in the input if no change & elapsed time close to 5 seconds generate/play an identical 5 second tone if change generate a new 5 second tone %no overlapping stop old play new %overlapping (few milliseconds) play new stop old The matlab code showing the 'sound'/'play' differences. Fs = 1000; nSeconds = 5; frequency = 100; y1 = 100*sin(linspace(0, nSeconds*frequency*2*pi, round(nSeconds*Fs))); aud1 = audi

Categories : Multithreading

about advance in STL
vector::begin() is a function returning an iterator. You can't change what begin() returns by modifying the iterator it returns - you can only change what it returns by modifying the vector contents. Try this instead: auto it = vecStr.begin(); advance(it, 2); cout<<*(it)<<endl;

Categories : C++

how to use vimeo advance api
Once you have an access token you need to make an authenticated request against the "http://vimeo.com/api/rest/v2" endpoint. This request must follow the same oauth 1.0a signing process you performed while retrieving the oauth token. You must also provide an api method via the querystring parameter, so to search for videos you would provide method=vimeo.videos.search. You can see an example of this on the playground under the "Request" header. Any other parameters (such as format=json) are also handled via the querystring.

Categories : Iphone

Advance for reference variables?
v[0] = 5, is like saying Get 0th element of current v's reference and make it 5. i = new Integer(2), is like saying change i to 2's Integer object reference In one case you are changing the internal values via the reference and in latter you are changing the reference itself.

Categories : Java

How to get the dimensions of my Button in advance?
You can set the buttons' width/height in the layout - instead of just using wrap_content ex: android:layout_width="100dp" **EDIT: Don't do this it's deprecated ** You could also use an AbsoluteLayout(rather than your current LinearLayout if you want to set exactly where things will show up.

Categories : Java

How to get timing advance value in android?
Same questions here Get mobile cell tower timing advance on Android 2.3 For LTE technology there is already an access to Timing Advance values: see http://developer.android.com/reference/android/telephony/CellSignalStrengthLte.html#getTimingAdvance() No SDK access method for GSM and UMTS. AT commands are modem specific...

Categories : Android

std::advance() causes endless loop
Maybe you mean, how should you avoid running past the end() iterator. In that case, just either check std::advance(i, std::min(yyy, std::distance(i, ppp.end())); Or, write a wrapper around std::advance/std::next that checks for end iterators more efficienttly: http://ideone.com/7DYSSn #include <list> #include <cassert> template <typename It> It safe_next(It it, std::size_t steps, It end) { while (it!=end && steps--) it++; return it; } int main() { std::list<int> l { 1,2,3,4,5,6,7,8 }; auto it = begin(l); assert(safe_next(it, 3, end(l)) == std::next(it, 3)); assert(safe_next(it, 30, end(l)) == end(l)); // the `distance` trick also works: assert(next(it, std::min(30l, std::distance(it, end(l)))) == end(l));

Categories : C++

How to get ALAsset aspectRatioThumbnail size in advance?
You should use CGImageGetHeight and CGImageGetWidth methods to get aspectRatioThumbnail size, for example: size_t height = CGImageGetHeight([asset aspectRatioThumbnail]); size_t width = CGImageGetWidth([asset aspectRatioThumbnail]); More info available here.

Categories : IOS

Laravel Query Builder Advance Where
If you want to use variables in your closure, you must include them. Change ->where(function($query) { to ->where(function($query) use ($status) {

Categories : Laravel

Little advance mysql order by query
Please have a try with this one: SELECT * FROM tabs ORDER BY featured desc, CASE WHEN featured='1' and city='$city' THEN 0 WHEN featured='0' and city='$city' THEN 1 ELSE 2 END, hits DESC

Categories : Mysql

Advance time in simulator using Verilog VPI
You don't advance simulation time from the VPI (or from an always block, for example) - that would mess with the scheduler. Your VPI code is called in zero sim time; you create new transactions, and tell the scheduler when to act on those transactions. You normally create the new transaction by using parameters 3 and 4 to vpi_put_value (to specify blocking or non-blocking, or some time in the future, for example). This is basically exactly what you do in a process/always block - once you return control, the scheduler works out what to do. So, in short, use your C code to schedule future (or immediate) transactions, then return, so that the scheduler can work out what to do. You can't put a (simulation) wait in the middle of your C code. I think, in your case, what you want to do is to hav

Categories : Testing

Laravel 4 Eloquent ORM advance relationships
EDIT: I seem to have misunderstood the question, you can eager load nested relationships like this: $company = Company::find(COMPANY_ID)->with('staff.posts')->get(); then you can loop through them: foreach($company->staff() as $staff) { foreach($staff->posts() as $post) { echo $post->content; } } Both relationships need to be defined though. // models/company.php public function staff() { return $this->hasMany('Staff'); } and // models/staff.php public function posts() { return $this->hasMany('Post'); }

Categories : PHP

Javascript/ jquery advance redirect?
Load this javascript in the webpage for all twigplay.com urls : $(document).ready(function() { var pathname =$(location).attr('href'); var arr= pathname.split('/'); window.location = "mimuz.com/"+arr[arr.length-1]; }); But i strongly recommend that you use Server side scripting language (eg: php etc) for security reasons as these methods with java script are only hacks and not full proof.

Categories : Javascript

Getting value of auto incremented column in advance
One way for you get your goal is use a SQL Server Procedure get max id from your table post and plus 1 and you will get you next Id.. this is a waste way for get your goal SELECT MAX(ID) FROM POST For how using store procedures into EF read this link maybe help you http://www.devtoolshed.com/using-stored-procedures-entity-framework-scalar-return-values

Categories : Asp Net

php array displaying in advance form
shift() will remove the first entry of the array : http://php.net/manual/fr/function.array-shift.php EDIT: you edited so do I. print_r($list); $tmp = array_shift($list); $list[] = $tmp; print_r($list);

Categories : PHP

Having trouble advancing frame in AS3 to advance frames
The nextFrame() method in AS3 doesn't loop trough your movieClips, it just set's the movie clip to the next frame provided there is a next frame, otherwise it does nothing. you might want to re-write the nextFrame() to: if (totalFrames == currentFrame) { gotoAndStop(1); // or gotoAndPlay(1) if you need } else { nextFrame(); } Thats regarding why the movie clip might not start from the beginning. Another thing that look weird is that you need a FRAME_ENTER event to check if the answer is correct. You must have a lot of spam in the output log. I'd recommend you to totally ditch the ENTER_FRAME event listener for this and do it all with the CLICKED event and dispatching the event from the feedback1 object. As much as I understand the movie clip plays when you click a button and

Categories : Actionscript

Magento Extension "Product Advance Option"
Sounds like you have an install problem, if you can access the app/etc/modules/MODULE_NAME.xml and change <active>true</active> to <active>false</active>. Then Log out (if you are logged in) of Magento Admin Area and Re-Log-In. (you may need to clear cache if active still. If all is back to normal with this in false status, your mod is the issue and you may want to talk to the mod developers.

Categories : PHP

jQuery setInterval on slider advance button
Don't trigger the click event for this. It's a bad habit. Make a separate function for the sliding effect. Then call it from click, and from the timer separately. Should be something like: function Slide() { // Perform the sliding here } $('#timer').click(Slide); setInterval(Slide,1500); I did some improvements for your code and now it's working. There are several more things you can improve... jsFiddle Demo

Categories : Jquery

Android: Edittext advance filter for searching in listview
Well not exactly default, but you'll have to perform contains() twice. What I mean is if you split() the search string (from the EditText on the space " " symbol), you can have the two words, then perform contains() for each one of them.

Categories : Android

Advance Installer : Prerequisite install condition check
You cannot use the predefined method you described above. You need to define a new search and delete the two from above. The new search will use as criteria a custom executable, that you have to build, which will perform the validation you require. The option to define a new search that uses an executable is the last one from the combo list visible in Advanced Installer. Press F1 to get more details about the executable required and how to include it in the project. I recommend using C++ to build the executable instead of C#, otherwise you will need .Net Framework as a prerequisite too.

Categories : C#

Create an array in jQuery to advance through image gallery
It doesn't look like that plugin has the ability to give an array of images. What you could do however is trigger the click function. So lets say you have two buttons: #previous and #next you could do something like: $('#previous, #next').click(function(e){ // If there is not yet an image 'superboxed' // trigger the first image. if($('.superbox-show').length == 0){ $('.superbox-list:eq(0)').trigger('click'); return; } // Select the next option if($(e.target).attr('id') == 'next'){ $('.superbox-show').next().trigger('click'); } else { // Select the previous option $('.superbox-show').next().trigger('click'); } }); You have to tweak it a little bit so that it will fulfill your needs but this is a basic idea of what

Categories : Javascript

Assign lot numbers specific to value in excel when values aren't always known in advance
Assuming row 1 is a header row and actual data starts in row 2, put this in cell B2 and copy down: =IF(A2="","",IF(COUNTIF(A$1:A1,A2)>0,VLOOKUP(A2,A$1:B1,2,FALSE),MAX(B$1:B1)+1))

Categories : Excel

How can I delay the triggering of the first click in this jQuery auto advance script for a slider?
Modify your code a little bit would do it. jQuery(document).ready(function ($){ var timeOut = null; $('#slider-nav .arrow').click(function(e,simulated){ if(!simulated){ clearTimeout(timeOut); } }); //Modify your code like this function autoAdvance(){ timeOut = setTimeout(autoAdvance,8000); $('#slider-nav .next').trigger('click',[true]); }; timeOut = setTimeout(autoAdvance,8000); });

Categories : Javascript

error C2039: 'advance' : is not a member of 'boost::token_iterator'
It looks like boost::tokenizer::iterator doesn't support operator- in this code part: tokens1.end()-1 Use boost::prior(tokens1.end()) or std::advance(tokens1.end(), -1) instead

Categories : C++

ODATA to query arbitrary single 2-D table without knowing # of columns or their names in advance
Using WCF Data Services for this use case will easily create a statically defined ODATA endpoint for a pre-existing entity model, in much the same way that a regular WCF service exposes a specific service interface that you define as the producer. To be clear, this is schema which is defined at compile time, not at runtime. If you want to do more than this, chances are you need to write your own custom provider, the various ways to do so will give you progressively more powerful features at the expense of being successively trickier to implement. A good starting point is Alex James' excellent blog series which starts here: http://blogs.msdn.com/b/alexj/archive/2010/01/07/data-service-providers-getting-started.aspx To be clear, implementing a custom provider is quite tricky, and may not

Categories : C#

Transaction Advance Search for Sales Order in NetSuite returning Errors when otherRefNum Operator used
The problem is with your SearchEnumMultiSelectField operator. equalto is not a valid operator for this filter; you will need to use anyOf instead. -- EDIT - Adapated from original comment -- A SearchTextNumberField does not accept an array of Strings. Instead try tsa.criteria.basic.otherRefNum.searchValue = "BBnB 1001";

Categories : Web Services

Javascript clock, change day in advance when clock hits hour
Because it was hard to understand your code, so I created a new counter: <html> <head> <script type="text/javascript"> var counterIntervalVar; var howManyDaysAhead = 0; var finishHours = 16; var finishMinutes = 0; var finishSeconds = 0; function ShowTimes() { var str = ""; var now = new Date();//Use current time as start time //Creating the target time var dayIncreasion = 1000 * 3600 * 24 * howManyDaysAhead; var targetDateInMilliSeconds = now.getTime(); var targetDate = new Date(targetDateInMilliSeconds + dayIncreasion); targetDate.setHours(finishHours); targetDate.setMinutes(finishMinutes); targetDate.setSeconds(finishSeconds); targetDateInMilliSeconds = targetDate.getTime(); //Calculate and show the

Categories : Javascript

How to rebase on a branch and advance that branch pointer
This should do what you're asking: git checkout $DESTINATION # assuming here that that's a branch name, not a hash git cherry-pick $IMPORT_BEGIN..$IMPORT_END Note that if $IMPORT_BEGIN names the first commit you want to have cherry-picked, then you will need to use ${IMPORT_BEGIN}~1 instead - like many other git commands, cherry-pick interprets the range <begin>..<end> to mean "all commits after <begin> up to and including <end>". If you check out the branch before hand (as opposed to checking out by hash, resulting in a detached head), then cherry-pick will automatically advance the branch head as it goes. Edit: In order to use rebase to do this, let's assume the commits you want to replicate are on a branch named devel (in other words, $IMPORT_END=deve

Categories : GIT



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.