This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
display_usage() { | |
echo -e "Usage:\n\t$0 <p> <n> <x>\n" | |
} | |
if [ $# -le 2 ]; then | |
display_usage | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MediaCodecs> | |
<Include href="media_codecs_google_audio.xml" /> | |
<Include href="media_codecs_google_telephony.xml" /> | |
<Settings> | |
<Setting name="max-video-encoder-input-buffers" value="9" /> | |
</Settings> | |
<Encoders> | |
<!-- Video Hardware --> | |
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > | |
<Quirk name="requires-allocate-on-input-ports" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpPort 8080 | |
HttpBindAddress 0.0.0.0 | |
RtspPort 8554 | |
RtspBindAddress 0.0.0.0 | |
CustomLog - | |
<Stream test.mp4> | |
Format rtp | |
File "/tmp/test.mp4" | |
</Stream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- vim: set ts=2 et sw=2 sts=2: --> | |
<configuration> | |
<system.web> | |
<customErrors mode="off" /> | |
</system.web> | |
<system.webServer> | |
<httpErrors existingResponse="PassThrough" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<gtest/gtest.h> | |
TEST(Rr, Empty) | |
{ | |
std::string str(""); | |
unsigned int num = reverse_and_replace(str); | |
EXPECT_EQ(0, num); | |
EXPECT_EQ("", str); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
unsigned int reverse_and_replace(std::string& str) | |
{ | |
// reverse string | |
std::reverse(str.begin(), str.end()); | |
// replace all '\' chars and count number of replaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
unsigned int reverse_and_replace(unsigned char* str) | |
{ | |
unsigned int replace_count = 0; | |
unsigned int str_len = 0; | |
const unsigned char from = '\\'; | |
const unsigned char to = '/'; | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <event.h> | |
#include <evhttp.h> | |
static void getindex(struct evhttp_request *req, void *arg) | |
{ | |
struct evbuffer *buf = evbuffer_new(); | |
size_t len; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "runtime"; | |
import "http"; | |
import "io"; | |
func HelloServer(c *http.Conn, req *http.Request) { | |
io.WriteString(c, "hello, world!\n"); | |
} |