Vote count: 0 I am currently developing a webapp using docker-compose and Docker. Currently, there is a front-end Nginx reverse proxy-server in one container and a Rails app in another container. Sometimes, the Rails app needs to make changes to the Nginx configuration files. I've implemented this by mounting the configuration directory as a shared volume in both containers. However, to force Nginx to reload its configuration files after the Rails app modifies it, it needs to send a HUP signal to the Nginx process. At the moment, I am implementing this by mounting the host's /var/run/docker.sock into the Rails app container and using a gem to ask the host Docker to send the signal to the right container. This works fine but now I'm worried about security. If the Rails container is compromised, then the attacker will have root access to the host. I thought about creating another container who's sole job is to broker access to the socket and exposing a limited API to the main Rails...
ادامه مطلبVote count: 0 Hi guys please help me on how to save all data coming textbox and i store it to datatable and i can view it to datagridview. How can I save all the data to database. Advance thanks, here's my sample code: private void add_Click(object sender, EventArgs e) { if (txtAddEmail.Text.Trim() == "") { MessageBox.Show("Please enter Email Address.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtAddEmail.Focus(); txtAddEmail.Visible = true; retu; } dt.Rows.Add(txtAddEmail.Text); dgvEmailAdd.DataSource = dt; txtAddEmail.Text = ""; SaveEmail(); } private void SaveEmail() { try { string strDBConfig = Application.StartupPath + @"MedXPro.xml"; using (SqlCoection co = PSCSClass.DataCoections.MDFCoection("", "", false, "", "", strDBConfig)) { using (SqlCommand cmd = new SqlCommand()) { cmd.Coection = co;...
ادامه مطلبVote count: 0 Having a file with just one column of data like for example: 10 2 34 4.5 16 I'd like to plot a stack of horizontal lines as plotting a horizontal line from let's say -3 to 3 (x range) for a y value equal to the first row (10 in the example), then replot a another horizontal line ranging form x=[-3:3] with a y value equal to the second row (2 in the example), and so on. How can I do it? asked 26 secs agoGilberto Zapata Let's block ads!...
ادامه مطلبVote count: 0 I'm using YouTube helper library to embed video in iOS app(https://github.com/youtube/youtube-ios-player-helper).I'm getting following message in console while ruing app and showing black color in youtube player view.Message is "NSURLSession/NSURLCoection HTTP load failed (kCFStreamErrorDomainSSL, -9813)".I have also enabled arbitary loads of transport security in info.plist file.Thanks in advance. asked 45 secs agoNikhil Kshirsagar Let's block ads!...
ادامه مطلبVote count: 0 I am trying to create a new document wherein some of the field values would come from the current document. Note that current document is not in edit mode. There are three buttons in the current document: Edit Document //Validate inputs myForm = window.document.forms[0] myForm.Refresh.click() myForm.Edit.click() Add Guest //Validate inputs myForm = window.document.forms[0] myForm.AddGuest.click() Close myForm = window.document.forms[0] myForm.Close.click() Once the Add Guest button is clicked, it must be able to access the lotusscript agent which can be found in another hidden button, "AddGuest". @Command([ToolsRunMacro]; "AddGuests") Once the Add Guest button's clicked, there must be a new form coming up but some of the field values (first name, last name, etc.) must retain and the form must be editable so I can save it as new document (not a response). Can anyone help me with the agent code to do that? asked 11 secs agoRagome Let's block ads!...
ادامه مطلبVote count: 0 I would like to show only partners that a user is assigned to, I have a list of partners as below: { "_id" : ObjectId("57c1cfa16c9cdc9007b26f8a"), "__t" : "Partner", "createdAt" : ISODate("2016-08-27T17:36:33.648+0000"), "updatedAt" : ISODate("2016-08-27T17:36:33.648+0000"), "user" : ObjectId("57c1cf776c9cdc9007b26f7b"), "descr" : "asdkalksdasdasd", "name" : "partner1", "__v" : NumberInt(0) },{ "_id" : ObjectId("57c1cfe76c9cdc9007b26fd2"), "__t" : "Partner", "createdAt" : ISODate("2016-08-27T17:37:43.784+0000"), "updatedAt" : ISODate("2016-08-27T17:37:43.784+0000"), "user" : ObjectId("57c1cf776c9cdc9007b26f7b"), "descr" : "sdfdsfsdf", "name" : "partner2", "__v" : NumberInt(0) } In my user model I have this: partners: { type: [{ type: Schema.ObjectId, ref: 'Partner' }] },...
ادامه مطلبVote count: 0 I wanted to write a bash script that reads a word in a file and then tries to loop through the alphabet until it finds the word. This is the code I have worked out so far but I am not very sure what to do from here and any help would be appreciated. maxlen=5 while -r file; do for i in {a...z}; do done done < ~/textfilelocation asked 33 secs agouser3925467 Let's block ads!...
ادامه مطلبVote count: 0 I have a form that uses a picture as its background image. I want to create a label and make the backcolor of it transparent. i tried to change the backcolor on d property backcolor to transparent. but that only changes the labels back colour to white asked 56 secs agoAsa Let's block ads!...
ادامه مطلبVote count: 0 I have plotted a 3-dimension figure which is the 3-D cloud water content from a Cloud Resolving Model. I would like to save it and preserve the image information that I can rotate it along different direction after I have saved it. I know it's possible to save it as format fig in Matlab and do what I want only using Matlab to open it. Is any other format of image that can do the same thing with open Matlab? Actually I am not familiar with this part and not sure what's key word is more about this question. asked 23 secs agoJen Let's block ads!...
ادامه مطلبVote count: 0 Here is the code I have: async.auto({ client: service.findCLient, existingChat: ['client', service.findChat], chat: ['client', 'existingChat', service.createChat] }, (err) => { if (err) retu service.handleError(err); service.emitChatEvent(); service.editMenu(); }); What is the best way to handle it by using Bluebird Promises? asked 40 secs agoLeestex Let's block ads!...
ادامه مطلبVote count: 0 I am trying to figure out any way how to upload full length videos on Dailymotion that exceed more than 60 minutes. I know we caot upload more than 60 minutes according to Dailymotion privacy and policy but if you look at this link http://www.dailymotion.com/Rajshri this person uploaded full length movies which mean there is way. so i am really excite to know about it. Hope you will help me. thanks asked 19 secs agoNasir Ahmad...
ادامه مطلبVote count: 0 Does YouTube data API supports multiple track audio streaming? I've a live streaming solution which can do broadcasting to YouTube. Was looking for adding multiple audio tracks. So I wanted to know if YouTube supports multiple audio tracks. I could not find any such details in YouTube data api page. asked 30 secs agoVGH Let's block ads!...
ادامه مطلبVote count: 0 I am trying to embed a video from youtube with the following code: func setUpVideo() { let width = webView.frame.width let height = webView.frame.height let frame = 0 bmiWebView.allowsInlineMediaPlayback = true let videoUrl = "https://www.youtube.com/embed/GCALWdwKr48" let htmlUrl = "" webView.loadHTMLString(htmlUrl, baseURL: NSBundle.mainBundle().bundleURL) } I'm able to load the video initially with white background but when it loads it looks like below. I'm not sure why there is a white background. If someone can tell me how to remove that will be really helpful. Thank you. asked 28 secs agoAlakh Let's block ads!...
ادامه مطلبVote count: 0 I have a webview control and request some search in Youtube. There are lot's of result videos. Users click one of them. How to get the video URL playing? asked 46 secs agoRonaldo.K Let's block ads!...
ادامه مطلبVote count: 0 I've been building an AI Speech Recognition program by looking at a tutorial from youtube and it runs proper;y without any errors. But it doesn't recognize my voice input. I'm using System.speech library. This is the code that I used enter code here using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Speech.Synthesis; using System.Speech.Recognition; namespace VoiceBot { public partial class Form1 : Form { SpeechSynthesizer s = new SpeechSynthesizer {}; Choices list = new Choices {}; public Form1() { SpeechRecognitionEngine rec = new SpeechRecognitionEngine { }; list.Add(new string[] { "Hello", "How are you?", "What time is it?" }); Grammar gr = new Grammar(new GrammarBuilder(list)); try { rec.RequestRecognizerUpdate(); rec.LoadGrammar(gr); rec.SpeechRecognized += rec_SpeachRecognized; rec.SetInputTo...
ادامه مطلبVote count: 0 I want a list of all video ids from a certain chael. I have tried current_user.chael.videos, but that retus a lot of stuff. I honestly dont know what to try from here. thanks in advance asked 2 mins agoZaviermiller Let's block ads!...
ادامه مطلبVote count: 0 I'm trying to cover a video with a div so it's not visible. Then when you hover over the div it's heigth shrinks to let the video controls visible. I don't know why I get this weird glitch: https://i.gyazo.com/aff58e50903009f7515a9cbd9b045f91.mp4 This is the slice with the video and overlay in question: Style here: .ytsound-cover{ background: #fff; height: 250px; position: absolute; width: 301px; } .ytsound-cover-lower { background: #fff; height: 205px; position: absolute; width: 301px; } Whole thing is loaded inside an ng-view. But anyway, here is all the source code, I'm hosting it on github: https://github.com/Vacanor/gifsound I'd love some pointing towards why that is happening. PD: I don't know if it does have any effect but I use flexbox asked 3 mins agoMrSpeed Art Let's block ads!...
ادامه مطلبVote count: 0 I need to know the actual width and height of a YouTube video embedded in my website. Here's a crude illustration. I've searched through the API docs and I haven't found a way to do this. I've noticed the player variable contains a method called showVideoInfo() which overlays exactly the data I want on the video player... but unfortunately since it is in the iframe I'm unable to access it from JavaScript. Is there any way to do this without having a backend script that queries the JSON API? Because I'd seriously rather not have to do that. asked 2 mins agoMichael Phillips Let's block ads!...
ادامه مطلبVote count: 0 I am using the foloowing api for fetching the playlist of youtube chael: https://www.googleapis.com/youtube/v3/playlistItems?key=*********************&playlistId=PLtS_xRaINoXVqR9JTzwkcMLaOIq0uj831&part=snippet,contentDetails&format=6&maxResults=50&fields=items some of the videos is not available so how can i exclude those videos ? asked 1 min agobhaskar Let's block ads!...
ادامه مطلبVote count: 0 Is it possible to add to ViewFlipper 2 different layouts one YouTubePlayerView ? I tried to do something like the code I added, but the player collapses.Is there any way to initialize the player again after the ViewFlipper shows the next view?...
ادامه مطلب