Search Results

Search found 271 results on 11 pages for 'asterisk'.

Page 8/11 | < Previous Page | 4 5 6 7 8 9 10 11  | Next Page >

  • Is it possible to add wildcard serveralias to virtualhost without modifying httpd.conf manually?

    - by Favourite Chigozie Onwuemene
    Is it possible to add wildcard serveralias (example: *.somesite.com) in an apache server without modifying httpd.conf manually? I use a DNS different from my hosting server and i have added asterisk A record to my DNS to point all request like (test.somesite.com,test2.somesite.com) to my hosting servers IP, but i don't see anyway of adding asterisk serveraliases to apache httpd.conf file in my cpanel. Pls is there a solution?

    Read the article

  • Application file (Real world example)

    - by aalhamad
    Looking for guidelines to create application file. For example I have an application that store user input into a file (Textbox, DataGrid, ListBox etc). I'm looking for WPF-C# implementation. I would like to have the following: If user edit a any form(Textbox, etc) an asterisk is displayed to the window title. When window is closed and asterisk is still there, a promote "Would you like to save changes" appears. If then saved the asterisk disappear. What do real applications use to create their application file? (Note: I'm not looking for database saving or SQL) I'm just looking for hints and guidelines. Thank you.

    Read the article

  • Reliable applicance for routing IT emergency calls (SIP and ISDN)

    - by chiborg
    We have a fairly big IT installation and our IT staff needs to be reachable 24/7. At the moment we have the following setup for "emergency" calls to our IT staff on our main Asterisk box: An incoming emergency number (connected via SIP trunk and a BRI card in case the SIP trunk goes down). When the number is called during the office hours, all the SIP phones of the IT staff are called simultaneously. When the number is called out of office hours interface, a list of mobile phone numbers is called, one after another until someone picks up. The list can be changed by the IT staff via command line script. The setup works well, but the Asterisk is heavily used in a call center, has experienced some outages and misconfigurations, each of them bringing down the IT emergency number. So we'd like to put the IT emergency call functionality on a separate device. This does not need to be a big server, it even does not need to be Asterisk, it only has one purpose and should do it reliably. It should be very low-maintenance. Any suggestions for hard- and software?

    Read the article

  • mapping file-* to a property

    - by andersonbd1
    Hi, I'd like to: <unjar src="lib/mst-service-impl*.zip" but I can't put an asterisk in there. It is only one file, but I don't want to hardcode the version in there. Is there a way to create a property with the asterisk (I know this particular example doesn't work, but perhaps something along these lines): <property name="my.jar" file="lib/mst-service-impl*.zip"> so that I could then do this: <unjar src="${my.jar}" Thanks, Ben

    Read the article

  • Only want "Required field" error to appear ONCE in ASP.NET Validation Summary

    - by PapillonUK
    I have a form with several fields with a RequiredFieldValidator on them. If any of these fields are not filled in I only want the message "Please enter the items marked with an asterisk" to appear once in the ValidationSummary control and an asterisk to appear next to each field. I have done this using the method here. i.e. by setting Text to "*" and ValidationSummary.HeaderText to my message. Great, but no cigar as I also have other fields with other validators e.g. a RegEx for an Email field. This means that if all the required fields are entered but the email is incorrect, the ValidationSummary with "Please enter the items marked with an asterisk" will appear along with the message for the invalid email. Crap! I then tried using a ValidationGroup called "ReqField" and have a one ValidationSummary for this group (with my HeaderText) and another for the other validators, but alas, my Submit button only allows one ValidationGroup to be triggered upon the click event. Does anyone have any ideas as to how I can get this to work? Thanks in adavnce.

    Read the article

  • Best Guest OS for running freeswitch under Proxmox

    - by Frank Waller
    We have a lot of asterisk Systems running on dedicated machines and would like to use freeswitch to replace a number of them. One of the advantages of freeswitch is supposed to be that it is doing much better in a virtualized environment than asterisk is. However I can find very little information about people using it in Proxmox containers. I would like to know if anyone has seen any ready to run proxmox images that include freeswitch so we can test a number of things without having to deeply go into creating our own. Or at least a clue to which system images/distro images we can use to quickly get it installed not having to deal with too many dependency or different Linux version issues. Just to be clear: It should be for a more or less current Proxmox and current freeswitch. I am not looking forward to use the KVM mode but would consider it, if it is otherwise ready to run out of the box. I would rather use a real OpenVZ based container. Thanks for anyone helping!

    Read the article

  • Functions as pointers in Objective-C

    - by richman0829
    This is a question from Learn Objective-C on the Mac... Functions as pointers What I typed in, as per the recipe, was: NSString *boolString (BOOL yesNo) { if (yesNo) { return (@"YES"); } else { return (@"NO"); } } // boolString The pointer asterisk in the first line doesn't seem necessary, yet deleting it results in an error message. But what does it do? In NSString * boolString (yesNo); what seems to be going on is a function is defined as a pointer to an NSString. The function without the asterisk NSLog (@"are %d and %d different? %@", 5, 5, boolString(areTheyDifferent)); returns an NSString of YES or NO. But how can it return an NSString when it's a pointer? It might return the ADDRESS of an NSString; or if dereferenced it could return the CONTENTS of that address (an NSString such as YES or NO). Yet I see no place where it is dereferenced.

    Read the article

  • Why the current working directory changes when use the Open file dialog in XP?

    - by RRUZ
    I have found an strange behavior when use the open file dialog in c#. If use this code in Windows XP the current working directory changes to the path of the selected file, however if you run this code in windows 7 the current working directory does not change. private void button1_Click(object sender, EventArgs e) { MessageBox.Show(string.Format("Current Directory {0}",Directory.GetCurrentDirectory()), "My Application",MessageBoxButtons.OK, MessageBoxIcon.Asterisk); DialogResult result = openFileDialog1.ShowDialog(); // Show the dialog and get result. if (result == DialogResult.OK) { } MessageBox.Show(string.Format("Current Directory {0}", Directory.GetCurrentDirectory()), "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } Anybody know the reason for this behavior? Why the current directoiry changes in XP and not in windows 7?

    Read the article

  • Recursion problem; completely lost

    - by timeNomad
    So I've been trying to solve this assignment whole day, just can't get it. The following function accepts 2 strings, the 2nd (not 1st) possibly containing *'s (asterisks). An * is a replacement for a string (empty, 1 char or more), it can appear appear (only in s2) once, twice, more or not at all, it cannot be adjacent to another * (ab**c), no need to check that. public static boolean samePattern(String s1, String s2) It returns true if strings are of the same pattern. It must be recursive, not use any loops, static & global variables. Can use local variables & method overloading. Can use only these methods: charAt(i), substring(i), substring(i, j), length(). Examples: 1: TheExamIsEasy; 2: "The*xamIs*y" --- true 1: TheExamIsEasy; 2: "Th*mIsEasy*" --- true 1: TheExamIsEasy; 2: "*" --- true 1: TheExamIsEasy; 2: "TheExamIsEasy" --- true 1: TheExamIsEasy; 2: "The*IsHard" --- FALSE I tried comparing the the chars one by one using charAt until an asterisk is encountered, then check if the asterisk is an empty one by comparing is successive char (i+1) with the char of s1 at position i, if true -- continue recursion with i+1 as counter for s2 & i as counter for s1; if false -- continue recursion with i+1 as counters for both. Continue this until another asterisk is found or end of string. I dunno, my brain loses track of things, can't concentrate, any pointers / hints? Am I in the right direction? Also, it's been told that a backtracking technique is to be used to solve this. My code so far (doesn't do the job, even theoretically): public static boolean samePattern(String s1, String s2) { if (s1.equals(s2) || s2 == "*") { return true; } return samePattern(s1, s2, 1); } public static boolean samePattern(String s1, String s2, int i) { if (s1.equals(s2)) return true; if (i == s2.length() - 1) // No *'s found -- not same pattern. return false; if (s1.substring(0, i).equals(s2.substring(0, i))) samePattern(s1, s2, i+1); else if (s2.charAt(i-1) == '*') samePattern(s1.substring(0, i-1), s2.substring(0, i), 1); // new smaller strings. else samePattern(s1.substring(1), s2, i); }

    Read the article

  • Correct way to write /* and */

    - by billpg
    Hi everyone. I'd like to know, please, the correct way to write the symbols that the C family of languages use to begin and end comments. Before you all respond "a slash followed by an asterisk", I mean what's the correct way to write them on paper. (IE, How many points should the asterisk have? What angle should the slash be? etc) Everything I need so I can sit down and draw correct comment start and end symbols. Please note, I'm looking for the correct standard way. If there is no industry standard, please respond with "there is no standard" and I will accept that answer.

    Read the article

  • Can I use asterisks in URLs?

    - by KajMagnus
    Are there any reasons I shouldn't use an asterisk (*) in a URL? Background: With asterisks, I could provide these nice and user friendly (or what do you think??) URLs: example.com/some/folder/search-phrase* means search for pages with names starting with "search-phrase", located in /some/folder/. example.com/some/**/*search-phrase* means search for any page with "search-phrase" anywhere in its name. example.com/some/folder/* means list all pages in /some/folder/ (rather than showing the /some/folder/index page).

    Read the article

  • How can I stop SipVicious ('friendly-scanner') from flooding my SIP server?

    - by a1kmm
    I run an SIP server which listens on UDP port 5060, and needs to accept authenticated requests from the public Internet. The problem is that occasionally it gets picked up by people scanning for SIP servers to exploit, who then sit there all day trying to brute force the server. I use credentials that are long enough that this attack will never feasibly work, but it is annoying because it uses up a lot of bandwidth. I have tried setting up fail2ban to read the Asterisk log and ban IPs that do this with iptables, which stops Asterisk from seeing the incoming SIP REGISTER attempts after 10 failed attempts (which happens in well under a second at the rate of attacks I'm seeing). However, SipVicious derived scripts do not immediately stop sending after getting an ICMP Destination Host Unreachable - they keep hammering the connection with packets. The time until they stop is configurable, but unfortunately it seems that the attackers doing these types of brute force attacks generally set the timeout to be very high (attacks continue at a high rate for hours after fail2ban has stopped them from getting any SIP response back once they have seen initial confirmation of an SIP server). Is there a way to make it stop sending packets at my connection?

    Read the article

  • Conceal packet loss in PCM stream

    - by ZeroDefect
    I am looking to use 'Packet Loss Concealment' to conceal lost PCM frames in an audio stream. Unfortunately, I cannot find a library that is accessible without all the licensing restrictions and code bloat (...up for some suggestions though). I have located some GPL code written by Steve Underwood for the Asterisk project which implements PLC. There are several limitations; although, as Steve suggests in his code, his algorithm can be applied to different streams with a bit of work. Currently, the code works with 8kHz 16-bit signed mono streams. Variations of the code can be found through a simple search of Google Code Search. My hope is that I can adapt the code to work with other streams. Initially, the goal is to adjust the algorithm for 8+ kHz, 16-bit signed, multichannel audio (all in a C++ environment). Eventually, I'm looking to make the code available under the GPL license in hopes that it could be of benefit to others... Attached is the code below with my efforts. The code includes a main function that will "drop" a number of frames with a given probability. Unfortunately, the code does not quite work as expected. I'm receiving EXC_BAD_ACCESS when running in gdb, but I don't get a trace from gdb when using 'bt' command. Clearly, I'm trampimg on memory some where but not sure exactly where. When I comment out the *amdf_pitch* function, the code runs without crashing... int main (int argc, char *argv[]) { std::ifstream fin("C:\\cc32kHz.pcm"); if(!fin.is_open()) { std::cout << "Failed to open input file" << std::endl; return 1; } std::ofstream fout_repaired("C:\\cc32kHz_repaired.pcm"); if(!fout_repaired.is_open()) { std::cout << "Failed to open output repaired file" << std::endl; return 1; } std::ofstream fout_lossy("C:\\cc32kHz_lossy.pcm"); if(!fout_lossy.is_open()) { std::cout << "Failed to open output repaired file" << std::endl; return 1; } audio::PcmConcealer Concealer; Concealer.Init(1, 16, 32000); //Generate random numbers; srand( time(NULL) ); int value = 0; int probability = 5; while(!fin.eof()) { char arr[2]; fin.read(arr, 2); //Generate's random number; value = rand() % 100 + 1; if(value <= probability) { char blank[2] = {0x00, 0x00}; fout_lossy.write(blank, 2); //Fill in data; Concealer.Fill((int16_t *)blank, 1); fout_repaired.write(blank, 2); } else { //Write data to file; fout_repaired.write(arr, 2); fout_lossy.write(arr, 2); Concealer.Receive((int16_t *)arr, 1); } } fin.close(); fout_repaired.close(); fout_lossy.close(); return 0; } PcmConcealer.hpp /* * Code adapted from Steve Underwood of the Asterisk Project. This code inherits * the same licensing restrictions as the Asterisk Project. */ #ifndef __PCMCONCEALER_HPP__ #define __PCMCONCEALER_HPP__ /** 1. What does it do? The packet loss concealment module provides a suitable synthetic fill-in signal, to minimise the audible effect of lost packets in VoIP applications. It is not tied to any particular codec, and could be used with almost any codec which does not specify its own procedure for packet loss concealment. Where a codec specific concealment procedure exists, the algorithm is usually built around knowledge of the characteristics of the particular codec. It will, therefore, generally give better results for that particular codec than this generic concealer will. 2. How does it work? While good packets are being received, the plc_rx() routine keeps a record of the trailing section of the known speech signal. If a packet is missed, plc_fillin() is called to produce a synthetic replacement for the real speech signal. The average mean difference function (AMDF) is applied to the last known good signal, to determine its effective pitch. Based on this, the last pitch period of signal is saved. Essentially, this cycle of speech will be repeated over and over until the real speech resumes. However, several refinements are needed to obtain smooth pleasant sounding results. - The two ends of the stored cycle of speech will not always fit together smoothly. This can cause roughness, or even clicks, at the joins between cycles. To soften this, the 1/4 pitch period of real speech preceeding the cycle to be repeated is blended with the last 1/4 pitch period of the cycle to be repeated, using an overlap-add (OLA) technique (i.e. in total, the last 5/4 pitch periods of real speech are used). - The start of the synthetic speech will not always fit together smoothly with the tail of real speech passed on before the erasure was identified. Ideally, we would like to modify the last 1/4 pitch period of the real speech, to blend it into the synthetic speech. However, it is too late for that. We could have delayed the real speech a little, but that would require more buffer manipulation, and hurt the efficiency of the no-lost-packets case (which we hope is the dominant case). Instead we use a degenerate form of OLA to modify the start of the synthetic data. The last 1/4 pitch period of real speech is time reversed, and OLA is used to blend it with the first 1/4 pitch period of synthetic speech. The result seems quite acceptable. - As we progress into the erasure, the chances of the synthetic signal being anything like correct steadily fall. Therefore, the volume of the synthesized signal is made to decay linearly, such that after 50ms of missing audio it is reduced to silence. - When real speech resumes, an extra 1/4 pitch period of sythetic speech is blended with the start of the real speech. If the erasure is small, this smoothes the transition. If the erasure is long, and the synthetic signal has faded to zero, the blending softens the start up of the real signal, avoiding a kind of "click" or "pop" effect that might occur with a sudden onset. 3. How do I use it? Before audio is processed, call plc_init() to create an instance of the packet loss concealer. For each received audio packet that is acceptable (i.e. not including those being dropped for being too late) call plc_rx() to record the content of the packet. Note this may modify the packet a little after a period of packet loss, to blend real synthetic data smoothly. When a real packet is not available in time, call plc_fillin() to create a sythetic substitute. That's it! */ /*! Minimum allowed pitch (66 Hz) */ #define PLC_PITCH_MIN(SAMPLE_RATE) ((double)(SAMPLE_RATE) / 66.6) /*! Maximum allowed pitch (200 Hz) */ #define PLC_PITCH_MAX(SAMPLE_RATE) ((SAMPLE_RATE) / 200) /*! Maximum pitch OLA window */ //#define PLC_PITCH_OVERLAP_MAX(SAMPLE_RATE) ((PLC_PITCH_MIN(SAMPLE_RATE)) >> 2) /*! The length over which the AMDF function looks for similarity (20 ms) */ #define CORRELATION_SPAN(SAMPLE_RATE) ((20 * (SAMPLE_RATE)) / 1000) /*! History buffer length. The buffer must also be at leat 1.25 times PLC_PITCH_MIN, but that is much smaller than the buffer needs to be for the pitch assessment. */ //#define PLC_HISTORY_LEN(SAMPLE_RATE) ((CORRELATION_SPAN(SAMPLE_RATE)) + (PLC_PITCH_MIN(SAMPLE_RATE))) namespace audio { typedef struct { /*! Consecutive erased samples */ int missing_samples; /*! Current offset into pitch period */ int pitch_offset; /*! Pitch estimate */ int pitch; /*! Buffer for a cycle of speech */ float *pitchbuf;//[PLC_PITCH_MIN]; /*! History buffer */ short *history;//[PLC_HISTORY_LEN]; /*! Current pointer into the history buffer */ int buf_ptr; } plc_state_t; class PcmConcealer { public: PcmConcealer(); ~PcmConcealer(); void Init(int channels, int bit_depth, int sample_rate); //Process a block of received audio samples. int Receive(short amp[], int frames); //Fill-in a block of missing audio samples. int Fill(short amp[], int frames); void Destroy(); private: int amdf_pitch(int min_pitch, int max_pitch, short amp[], int channel_index, int frames); void save_history(plc_state_t *s, short *buf, int channel_index, int frames); void normalise_history(plc_state_t *s); /** Holds the states of each of the channels **/ std::vector< plc_state_t * > ChannelStates; int plc_pitch_min; int plc_pitch_max; int plc_pitch_overlap_max; int correlation_span; int plc_history_len; int channel_count; int sample_rate; bool Initialized; }; } #endif PcmConcealer.cpp /* * Code adapted from Steve Underwood of the Asterisk Project. This code inherits * the same licensing restrictions as the Asterisk Project. */ #include "audio/PcmConcealer.hpp" /* We do a straight line fade to zero volume in 50ms when we are filling in for missing data. */ #define ATTENUATION_INCREMENT 0.0025 /* Attenuation per sample */ #if !defined(INT16_MAX) #define INT16_MAX (32767) #define INT16_MIN (-32767-1) #endif #ifdef WIN32 inline double rint(double x) { return floor(x + 0.5); } #endif inline short fsaturate(double damp) { if (damp > 32767.0) return INT16_MAX; if (damp < -32768.0) return INT16_MIN; return (short)rint(damp); } namespace audio { PcmConcealer::PcmConcealer() : Initialized(false) { } PcmConcealer::~PcmConcealer() { Destroy(); } void PcmConcealer::Init(int channels, int bit_depth, int sample_rate) { if(Initialized) return; if(channels <= 0 || bit_depth != 16) return; Initialized = true; channel_count = channels; this->sample_rate = sample_rate; ////////////// double min = PLC_PITCH_MIN(sample_rate); int imin = (int)min; double max = PLC_PITCH_MAX(sample_rate); int imax = (int)max; plc_pitch_min = imin; plc_pitch_max = imax; plc_pitch_overlap_max = (plc_pitch_min >> 2); correlation_span = CORRELATION_SPAN(sample_rate); plc_history_len = correlation_span + plc_pitch_min; ////////////// for(int i = 0; i < channel_count; i ++) { plc_state_t *t = new plc_state_t; memset(t, 0, sizeof(plc_state_t)); t->pitchbuf = new float[plc_pitch_min]; t->history = new short[plc_history_len]; ChannelStates.push_back(t); } } void PcmConcealer::Destroy() { if(!Initialized) return; while(ChannelStates.size()) { plc_state_t *s = ChannelStates.at(0); if(s) { if(s->history) delete s->history; if(s->pitchbuf) delete s->pitchbuf; memset(s, 0, sizeof(plc_state_t)); delete s; } ChannelStates.erase(ChannelStates.begin()); } ChannelStates.clear(); Initialized = false; } //Process a block of received audio samples. int PcmConcealer::Receive(short amp[], int frames) { if(!Initialized) return 0; int j = 0; for(int k = 0; k < ChannelStates.size(); k++) { int i; int overlap_len; int pitch_overlap; float old_step; float new_step; float old_weight; float new_weight; float gain; plc_state_t *s = ChannelStates.at(k); if (s->missing_samples) { /* Although we have a real signal, we need to smooth it to fit well with the synthetic signal we used for the previous block */ /* The start of the real data is overlapped with the next 1/4 cycle of the synthetic data. */ pitch_overlap = s->pitch >> 2; if (pitch_overlap > frames) pitch_overlap = frames; gain = 1.0 - s->missing_samples * ATTENUATION_INCREMENT; if (gain < 0.0) gain = 0.0; new_step = 1.0/pitch_overlap; old_step = new_step*gain; new_weight = new_step; old_weight = (1.0 - new_step)*gain; for (i = 0; i < pitch_overlap; i++) { int index = (i * channel_count) + j; amp[index] = fsaturate(old_weight * s->pitchbuf[s->pitch_offset] + new_weight * amp[index]); if (++s->pitch_offset >= s->pitch) s->pitch_offset = 0; new_weight += new_step; old_weight -= old_step; if (old_weight < 0.0) old_weight = 0.0; } s->missing_samples = 0; } save_history(s, amp, j, frames); j++; } return frames; } //Fill-in a block of missing audio samples. int PcmConcealer::Fill(short amp[], int frames) { if(!Initialized) return 0; int j =0; for(int k = 0; k < ChannelStates.size(); k++) { short *tmp = new short[plc_pitch_overlap_max]; int i; int pitch_overlap; float old_step; float new_step; float old_weight; float new_weight; float gain; short *orig_amp; int orig_len; orig_amp = amp; orig_len = frames; plc_state_t *s = ChannelStates.at(k); if (s->missing_samples == 0) { // As the gap in real speech starts we need to assess the last known pitch, //and prepare the synthetic data we will use for fill-in normalise_history(s); s->pitch = amdf_pitch(plc_pitch_min, plc_pitch_max, s->history + plc_history_len - correlation_span - plc_pitch_min, j, correlation_span); // We overlap a 1/4 wavelength pitch_overlap = s->pitch >> 2; // Cook up a single cycle of pitch, using a single of the real signal with 1/4 //cycle OLA'ed to make the ends join up nicely // The first 3/4 of the cycle is a simple copy for (i = 0; i < s->pitch - pitch_overlap; i++) s->pitchbuf[i] = s->history[plc_history_len - s->pitch + i]; // The last 1/4 of the cycle is overlapped with the end of the previous cycle new_step = 1.0/pitch_overlap; new_weight = new_step; for ( ; i < s->pitch; i++) { s->pitchbuf[i] = s->history[plc_history_len - s->pitch + i]*(1.0 - new_weight) + s->history[plc_history_len - 2*s->pitch + i]*new_weight; new_weight += new_step; } // We should now be ready to fill in the gap with repeated, decaying cycles // of what is in pitchbuf // We need to OLA the first 1/4 wavelength of the synthetic data, to smooth // it into the previous real data. To avoid the need to introduce a delay // in the stream, reverse the last 1/4 wavelength, and OLA with that. gain = 1.0; new_step = 1.0/pitch_overlap; old_step = new_step; new_weight = new_step; old_weight = 1.0 - new_step; for (i = 0; i < pitch_overlap; i++) { int index = (i * channel_count) + j; amp[index] = fsaturate(old_weight * s->history[plc_history_len - 1 - i] + new_weight * s->pitchbuf[i]); new_weight += new_step; old_weight -= old_step; if (old_weight < 0.0) old_weight = 0.0; } s->pitch_offset = i; } else { gain = 1.0 - s->missing_samples*ATTENUATION_INCREMENT; i = 0; } for ( ; gain > 0.0 && i < frames; i++) { int index = (i * channel_count) + j; amp[index] = s->pitchbuf[s->pitch_offset]*gain; gain -= ATTENUATION_INCREMENT; if (++s->pitch_offset >= s->pitch) s->pitch_offset = 0; } for ( ; i < frames; i++) { int index = (i * channel_count) + j; amp[i] = 0; } s->missing_samples += orig_len; save_history(s, amp, j, frames); delete [] tmp; j++; } return frames; } void PcmConcealer::save_history(plc_state_t *s, short *buf, int channel_index, int frames) { if (frames >= plc_history_len) { /* Just keep the last part of the new data, starting at the beginning of the buffer */ //memcpy(s->history, buf + len - plc_history_len, sizeof(short)*plc_history_len); int frames_to_copy = plc_history_len; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * (i + frames - plc_history_len)) + channel_index; s->history[i] = buf[index]; } s->buf_ptr = 0; return; } if (s->buf_ptr + frames > plc_history_len) { /* Wraps around - must break into two sections */ //memcpy(s->history + s->buf_ptr, buf, sizeof(short)*(plc_history_len - s->buf_ptr)); short *hist_ptr = s->history + s->buf_ptr; int frames_to_copy = plc_history_len - s->buf_ptr; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * i) + channel_index; hist_ptr[i] = buf[index]; } frames -= (plc_history_len - s->buf_ptr); //memcpy(s->history, buf + (plc_history_len - s->buf_ptr), sizeof(short)*len); frames_to_copy = frames; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * (i + (plc_history_len - s->buf_ptr))) + channel_index; s->history[i] = buf[index]; } s->buf_ptr = frames; return; } /* Can use just one section */ //memcpy(s->history + s->buf_ptr, buf, sizeof(short)*len); short *hist_ptr = s->history + s->buf_ptr; int frames_to_copy = frames; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * i) + channel_index; hist_ptr[i] = buf[index]; } s->buf_ptr += frames; } void PcmConcealer::normalise_history(plc_state_t *s) { short *tmp = new short[plc_history_len]; if (s->buf_ptr == 0) return; memcpy(tmp, s->history, sizeof(short)*s->buf_ptr); memcpy(s->history, s->history + s->buf_ptr, sizeof(short)*(plc_history_len - s->buf_ptr)); memcpy(s->history + plc_history_len - s->buf_ptr, tmp, sizeof(short)*s->buf_ptr); s->buf_ptr = 0; delete [] tmp; } int PcmConcealer::amdf_pitch(int min_pitch, int max_pitch, short amp[], int channel_index, int frames) { int i; int j; int acc; int min_acc; int pitch; pitch = min_pitch; min_acc = INT_MAX; for (i = max_pitch; i <= min_pitch; i++) { acc = 0; for (j = 0; j < frames; j++) { int index1 = (channel_count * (i+j)) + channel_index; int index2 = (channel_count * j) + channel_index; //std::cout << "Index 1: " << index1 << ", Index 2: " << index2 << std::endl; acc += abs(amp[index1] - amp[index2]); } if (acc < min_acc) { min_acc = acc; pitch = i; } } std::cout << "Pitch: " << pitch << std::endl; return pitch; } } P.S. - I must confess that digital audio is not my forte...

    Read the article

  • String Manipulation: Spliting Delimitted Data

    - by Milli Szabo
    I need to split some info from a asterisk delimitted data. Data Format: NAME*ADRESS LINE1*ADDRESS LINE2 Rules: 1. Name should be always present 2. Address Line 1 and 2 might not be 3. There should be always three asterisks. Samples: MR JONES A ORTEGA*ADDRESS 1*ADDRESS2* Name: MR JONES A ORTEGA Address Line1: ADDRESS 1 Address Line2: ADDRESS 2 A PAUL*ADDR1** Name: A PAUL Address Line1: ADDR1 Address Line2: Not Given My algo is: 1. Iterate through the characters in the line 2. Store all chars in a temp variables until first * is found. Reject the data if no char is found before first occurence of asterisk. If some chars found, use it as the name. 3. Same as step 2 for finding address line 1 and 2 except that this won't reject the data if no char is found My algo looks ugly. The code looks uglier. Spliting using //* doesn't work either since name can be replaced with address line 1 If the data is *Address 1*Address2, split will create two indexes in the array where index 0 will have the value of Address 1 and index 2 will have the value of Address2. Where's the name. Was there a name? Any suggestion?

    Read the article

  • What's your preferred pointer declaration style, and why?

    - by Owen
    I know this is about as bad as it gets for "religious" issues, as Jeff calls them. But I want to know why the people who disagree with me on this do so, and hear their justification for their horrific style. I googled for a while and couldn't find a style guide talking about this. So here's how I feel pointers (and references) should be declared: int* pointer = NULL; int& ref = *pointer; int*& pointer_ref = pointer; The asterisk or ampersand goes with the type, because it modifies the type of the variable being declared. EDIT: I hate to keep repeating the word, but when I say it modifies the type I'm speaking semantically. "int* something;" would translate into English as something like "I declare something, which is a pointer to an integer." The "pointer" goes along with the "integer" much more so than it does with the "something." In contrast, the other uses of the ampersand and asterisk, as address-of and dereferencing operators, act on a variable. Here are the other two styles (maybe there are more but I really hope not): int *ugly_but_common; int * uglier_but_fortunately_less_common; Why? Really, why? I can never think of a case where the second is appropriate, and the first only suitable perhaps with something like: int *hag, *beast; But come now... multiple variable declarations on one line is kind of ugly form in itself already.

    Read the article

  • String Manipulation: Splitting Delimitted Data

    - by Milli Szabo
    I need to split some info from a asterisk delimitted data. Data Format: NAME*ADRESS LINE1*ADDRESS LINE2 Rules: 1. Name should be always present 2. Address Line 1 and 2 might not be 3. There should be always three asterisks. Samples: MR JONES A ORTEGA*ADDRESS 1*ADDRESS2* Name: MR JONES A ORTEGA Address Line1: ADDRESS 1 Address Line2: ADDRESS 2 A PAUL*ADDR1** Name: A PAUL Address Line1: ADDR1 Address Line2: Not Given My algo is: 1. Iterate through the characters in the line 2. Store all chars in a temp variables until first * is found. Reject the data if no char is found before first occurence of asterisk. If some chars found, use it as the name. 3. Same as step 2 for finding address line 1 and 2 except that this won't reject the data if no char is found My algo looks ugly. The code looks uglier. Spliting using //* doesn't work either since name can be replaced with address line 1 if the data was *Address 1*Address2. Any suggestion?

    Read the article

  • CodePlex Daily Summary for Saturday, June 11, 2011

    CodePlex Daily Summary for Saturday, June 11, 2011Popular ReleasesSimplePlanner: v2.0b: For 2011-2012 Sem 1 ???2011-2012 ????Econ NetVert: 2.4.2.14 Production: Many thanks to paulhickman for testing and reporting issues. - this release has lots of bugfixes in codeconversion when using NRefactory 4.0 (local) and VisualStudio Projects conversionVisual Studio 2010 Help Downloader: 1.0.0.3: Domain name support for proxy Cleanup old packages bug Writing to EventLog with UAC enabled bug Small fixes & RefactoringMedia Companion: MC 3.406b weekly: With this version change a movie rebuild is required when first run -else MC will lock up on exit. Extract the entire archive to a folder which has user access rights, eg desktop, documents etc. Refer to the documentation on this site for the Installation & Setup Guide Important! If you find MC not displaying movie data properly, please try a 'movie rebuild' to reload the data from the nfo's into MC's cache. Fixes Movies Readded movie preference to rename invalid or scene nfo's to info ext...SCCM Client Actions Tool: SCCM Client Actions Tool v0.5.1: SCCM Client Actions Tool v0.5.1 is currently the most stable version and includes all of the functionality requested so far. It comes with following changes since last version: Fixed an incorrect path to x64 client setup folder. It comes as a ZIP file that contains three files: ClientActionsTool.hta – The tool itself. Cmdkey.exe – command line tool for managing cached credentials. This is needed for alternate credentials feature when running the HTA on Windows XP. Cmdkey.exe is natively a...Windows Azure VM Assistant: AzureVMAssist V1.0.0.5: AzureVMAssist V1.0.0.5 (Debug) - Test Release VersionSizeOnDisk: 1.8.0.3: Fix (issue 317): Main window icon loading error on windows server 2003 32bit runing on x86 cpu. Bypass of the Microsoft windows comexception.NetOffice - The easiest way to use Office in .NET: NetOffice Release 0.9: Changes: - fix examples (include issue 16026) - add new examples - 32Bit/64Bit Walkthrough is now available in technical Documentation. Includes: - Runtime Binaries and Source Code for .NET Framework:......v2.0, v3.0, v3.5, v4.0 - Tutorials in C# and VB.Net:..............................................................COM Proxy Management, Events, etc. - Examples in C# and VB.Net:............................................................Excel, Word, Outlook, PowerPoint, Access - COMAddi...Reusable Library: V1.1.3: A collection of reusable abstractions for enterprise application developerClosedXML - The easy way to OpenXML: ClosedXML 0.54.0: New on this release: 1) Mayor performance improvements. 2) AdjustToContents now take into account the text rotation. 3) Fixed issues 6782, 6784, 6788HTML-IDEx: HTML-IDEx .15 ALPHA: This release fixes line counting a little bit and adds the masshighlight() sub, which highlights pasted and inserted code.AutoLoL: AutoLoL v2.0.3: - Improved summoner spells are now displayed - Fixed some of the startup errors people got - Double clicking an item selects it - Some usability changes that make using AutoLoL just a little easier - Bug fixes AutoLoL v2 is not an update, but an entirely new version! Please install to a different directory than AutoLoL v1Host Profiles: Host Profiles 1.0: Host Profiles 1.0 Release Quickly modify host file Automatically flush dnsVidCoder: 0.9.2: Updated to HandBrake 4024svn. This fixes problems with mpeg2 sources: corrupted previews, incorrect progress indicators and encodes that incorrectly report as failed. Fixed a problem that prevented target sizes above 2048 MB.SharePoint Search XSL Samples: SharePoint 2010 Samples: I have updated some of the samples from the 2007 release. These all work in SharePoint 2010. I removed the Pivot on File Extension because SharePoint 2010 search has refiners that perform the same function.AcDown????? - Anime&Comic Downloader: AcDown????? v3.0 Beta5: ??AcDown?????????????,??????????????,????、????。?????Acfun????? ????32??64? Windows XP/Vista/7 ????????????? ??:????????Windows XP???,?????????.NET Framework 2.0???(x86)?.NET Framework 2.0???(x64),?????"?????????"??? ??v3.0 Beta5 ?????????? ???? ?? ???????? ???"????????"?? ????????????? ????????/???? ?? ???"????"??? ?? ??????????? ?? ?? ??????????? ?? ?????????????????? ??????????????????? ???????????????? ????????????Discussions???????? ????AcDown??????????????VFPX: GoFish 4 Beta 1: Current beta is Build 144 (released 2011-06-07 ) See the GoFish4 info page for details and video link: http://vfpx.codeplex.com/wikipage?title=GoFishShowUI: Write-UI -in PowerShell: ShowUI: ShowUI is a PowerShell module to help you write rich user interfaces in script.SharePoint 2010 FBA Pack: SharePoint 2010 FBA Pack 1.0.3: Fixed User Management screen when "RequiresQuestionAndAnswer" set to true Reply to Email Address can now be customized User Management page now only displays users that reside in the membership database Web parts have been changed to inherit from System.Web.UI.WebControls.WebParts.WebPart, so that they will display on anonymous application pages For installation and configuration steps see here.TerrariViewer: TerrariViewer v2.5: Added new items associated with Terraria v1.0.3 to the character editor. Fixed multiple bugs with Piggy Bank EditoryNew Projects.NET MVC Base by OST: The OST .NET MVC project is currently in infancy but contains html helper extensions, model binders and other extensions to the mvc 3 framework. It also contains a separate project for easily consuming JQGrid requests and return the correct JSON to the jQuery plugin.Asterisk AMI Proxy suite: The AMI Proxy suite project will bridge the gap between your asterisk phone system and your windows based applications. The AMI Proxy is a service that can be used to simply proxy AMI connections to your asterisk server but also adds call stat generation and line monitors.Augusta Developers Guild: The web site for the user group Augusta Developers GuildAzure Blob Pusher: File uploader allows bulk upload of files from client to Azure blob storage. FileSystemWatcher notices new files in configured directory. SQL Express database tracks files as they are pushed up to blob storage and then processed. Local Directory is cleaned up after acknowledgement.Basic Class Library: A collection of functions created to eased up the programmers life in order to solved basic task like validation, AmountTowords, Encrypt & Decryption it also has capability to Connect and retrieve sql data just in one line of code, and some other Basic but very Important task.Basic RTS Game using RolePlayingGame Tool kit based XNA: this is a basic RTS Game. i can make it easy by using RolePlayingGame Took Kit based XNA.Batch Scheduler using .Net 4, MEF and Entity framework 4.1 (Magic Unicorn): Simple Batch Architecture written on C#. Uses the .NET 4, MEF and Entity Framework 4.1 Code First. If you dont need a scheduler, just use the sample code. Agents can be scheduled through a central database table. Plug-ins (or jobs) are launched through MEF. DropBox Linker: The goal of DropBox Linker project is to improve DropBox service client usability. It intellectually automates copying URLs to clipboard after publishing a file. Multiple files at once is supported. Additionally, it corrects URL on file rename after its link been copied.Exchange Spigot for NodeXL: Exchange Spigot for NodeXL enables Microsoft Excel plugin NodeXL to collect messaging data from the Microsoft Exchange Server and display that data as a graph. It is developed in C#.G - Low Level Graphics API: A low level graphics api, in similar style to OpenGL, but more OO. Can drastically speed up OpenGL based apps. Makes full use of Net4.0 features such as lambada expressions where useful. (C#, OpenTK powered. This is not for C++) GpgAPI - A C# Api for Gpg: GpgAPI is a C# API for Gpg. Gpg is a command line software to encrypt, decrypt files with a symmetric or assymetric key. You can also managed public keys, import keys from the web, export your public keys, etc. GpgAPI is an interface to Gpg. In C#, with a few lines, you can execute gpg to encrypt, decrypt, etc. The license of this project is "GPL v3"; it is NOT GPL v2. GPL v3 is not present in the licenses list so I had to choose GPL v2. So if use GpgAPI, you must accept the GPL v...iDreamBoard: iDreamBoard is an application to ease the process of creating and editing dreamboard themes for iOS devices. UNDER DEVELOPMENTIETouch: Use IE Touch to access multitouch events from JavaScript in IE. This project uses some of the code from Windows 7 Multitouch .NET Interop Sample Library available in http://archive.msdn.microsoft.com/WindowsTouch/Release/ProjectReleases.aspx?ReleaseId=2127iMaker-Lion: Applications post installation pour Mac OS X sur PC.Informatic System Ma Chung University Alumni Center: Informatic System Ma Chung University Alumni Center is a website for alumni at Information System Faculty at Ma Chung University at Malang, IndonesiaJasc (just another script compressor): Just another script compressor, but that's by far the easiest to use! Use Jasc to merge compress your javascript (JS) and style sheets (CSS). Just drop the executable in your javascript / CSS folder and run it. Voyla! It will handle everything by itself. Compression is based on Microsoft Ajax Minifier. Jasc can handle single or multiple files, will accept regular expressions to remove specific lines from the source code, and can also optimize the results by shrinking variable names and twe...LINQ Extensions Library: A library of useful LINQ extensions allowing for arithmetic manipulation of sequences, statistical analysis, sequence generation, sequence manipulation, pattern detection and more.Mail2FotoFrame: Pulls emails from a POP3-Account, extracts picture-attachments and saves them to a SD-card, so you can view them on a fotoframe.Make web (or sharepoint) pages screenshots with Powershell: From a text file containing url, make screenshot of each page. This powershell script use iecapt.exe project. You can manage width format and delay for each captureModé Internationalé (E-Commerce Site): Mode International is a fictional clothing store, and this website project is meant to be the e-Commerce site for this store. So far, the project has been developed using Java Enterprise Edition and Sockets, but I am considering making the use of C# in ASP .NET in the future.Music House: Site dedicado a musica e afiliadosNiphor's ToolBox: ?????????Nordic nRF24L01+ .NET Micro Framework Driver: Library that enables .NET Micro Framework developers to use Nordic 2.4 GHz wireless tranceivers. This library can be used on any net mf device with SPI interface.Petey's Game Engine: Petey's Game Engine is a XNA 4.0 game engine with a featured blog describing each step of the development. This is a learning project so people may follow and learn as my project evolves.ReportGenerator: ReportGenerator converts XML reports generated by PartCover or NCover into a readable HTML report.Rise of the rabbits: Rise of the RabbitsSapaFinance: SapaFinanceSCSM Copy Object: SCSM Copy Object is a CodePlex project that enables users to select objects in the System Center Service Manager console, click a task in the task pane and create a copy of the selected object(s). Objects can also be copied from command line executables.SharePoint 2010 Language Pack Downloader: SharePoint 2010 Language Pack Downloader is a tool to quickly download multiple language pack files for the SharePoint 2010 Server platform.SharePoint XQuery Reporting Solution: My company's project needs this technology because of the current company has a lot of data is stored in SharePoint, through Infopath data collection, data storage and not all InfoPath field values ​​are saved into a database, a considerable number of data in XML File, which caused difficulties in query and print a report, need a solution. Simply explained the thinking: First step:Put SharePoint, InfoPath XML file later (I did a small tool XMLToDB) or through the Event Handle sync sav...The Pacman: A simple single player game similar to Pacman. Developed using XNA game framework and C#. Game demonstrates usage of fuzzy logic for controlling the AI ghosts. This game is developed to test the effect of fuzzy logic AI in Pacman game.TodoStrike: Todo Strike is a simple todo list keeper.WallpaperDeleter: Simple program to delete the current background wallpaper image.Windows Phone 7 Continuous Integration Testing Framework: WP7 CI is a port of the Silverlight Toolkit Test Framework with added CI support, allowing tests to be run in the emulator from the command lineWolfpack - Distributed System Monitoring: Wolfpack is an extensible, .Net windows service framework for running jobs to monitor your software, system & business KPI's. The data collected can be sent directly to Growl, Geckoboard, WCF, SQL, SQLite, NServiceBus. It comes loaded with some tasks but it's simple to implement your own!

    Read the article

  • What is SIP trunking?

    - by hypnocode
    Can someone explain to me in plain English what SIP trunking is, please? I've read about it on Google, but I don't really grasp it yet. Does it allow a VoIP call to be placed outside of the LAN? So if you had Asterisk setup as the PBX, then IP calls could be made outside of the network? Am I close or am I just saying stupid words?

    Read the article

  • How to split registration and media?

    - by Stackfan
    I have a SIP project. Where i will have SIP server running. Server will do following: will only do routing and receive incoming calls But the audio/video will be peer 2 peer Can this be done with Asterisk? Only the media i have to split but the registration will be with Server. Tools: A) server with SIP B) One PC with SIP client C) Anoher PC with SIP client My goal is: B and C gets connected via A and audio/video packets are not via A

    Read the article

  • Can a FreePBX backup be restored to a different version?

    - by Tim Long
    I run a small PBX based on the FreePBX distro of Asterisk. The installation has been steadily upgraded but for various reasons, we want to start again on a new server with a clean install from the distribution media. Will I be able to take a backup from the old server and restore it to the new server, even though the installs are different versions? How sensitive are FreePBX backups to the build version? Is it possible to get at least a partial restore?

    Read the article

  • Google indexing page with parameters but page is Disallowed in robots.txt

    - by Jakobud
    I have the following in robots.txt: User-agent: * Disallow: /refer.php User-agent: NinjaBot Allow: / Sitemap: http://www.mysite.com/sitemap.xml The refer.php file does various things depending on what GET parameters are passed to it. When I do a Google search, I see tons of results for pages like this: http://www.mysite.com/refer.php?o=23945 http://www.mysite.com/refer.php?o=39858 http://www.mysite.com/refer.php?o=9683 http://www.mysite.com/refer.php?o=10569 http://www.mysite.com/refer.php?o=58304 http://www.mysite.com/refer.php?o=69604 Is the reason that Google is indexing these because I don't have an asterisk * after refer.php in the robots.txt ? Should changing it to Disallow: /refer.php* fix the problem?

    Read the article

  • Installling a brother printer in Ubuntu 12.04 (MFCJ6510DW)

    - by Gelterfinger
    I am trying to install a Brother MfCJ6510DW printer on Ubuntu 12.04. I have tried various ways, but nothing woks for me. I have downloaded the drivers from the solutions brother.com I tried to install from the "System setting- printing" on the pull-down menu. There I get the message "failed to read PPL file - it says something about a missing Asterisk in colum1 Line 1 In the terminal I get the message cannot find file or directory. Under localhost:631/printer, I get the message " no such file or directory" I tried to install the file I downloaded from the Brothers Solution Center on the Ubuntu Software Centre, there I get the message " The package is of bad quality" Help I downloaded Mfcj6510dwlpr-3.0.0-1.i386.deb and mfcj6510dwcupswrapper-3.0.0-1.i386 I also downloaded linux-bprinter-installer-1.0.0-1.gz, but this does not help either.

    Read the article

  • usb keyboard works except in terminal window (SOLVED)

    - by matrixunloaded
    I just installed 12.10 (clean install and updates). USB keyboard and mouse work fine EXCEPT the keyboard does not work in a terminal window (USB mouse is working in terminal). keyboard is Logitech MK320 and associated mouse. I'm typing in a mozilla window on the keyboard at this very moment and when I switch to the terminal window, nothing can be typed. Any ideas? I use terminal mode alot. Thanks matrixunloaded I didn't realize passwords do not show even an asterisk in terminal mode! I'd just installed 12.10 and was pasting a long sudo command and then typing my password (which looked like nothing appearing)

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11  | Next Page >