Posts

backgroundworker - Background worker within a function in c# wpf -

I have made a simple GUI in C # YPF (sorry I can not show a GUI because my reputation is below 10). This includes rich text boxes and some other controls umm ... read this application a file When reading the file while using a background worker, the file content will appear in the Rich Textbox line from the line. The function that reads the file is like this: public int parse_persoFile2 (string fname, backgroundWorker worker, DoWorkEventArgs e) {if (fname == null) return -1; System.IO.StreamReader ifs; Ifs = new system. IO.StreamRender (FNN); Int max = (int) e.Argument; Int p = 0; While (ifs.Peek ()! = -1) {string tempData = ifs.ReadLine (); If (tempData.Contains ("CMD = 5107") || tempData.Contains ("CMD = 5106") || tempData.Contains ("CMD = 5102")) {//field.AppendText (tempData.Remove (tempData final Index ('\\'). Remove (0, 4) + "\ r \ n"); //field.AppendText("--------\r\n "); //System.Threading .hread.Sleep (500); St...

css - How to change visibility on an html button before rendering the html it is in? Rails -

मैं एक html बटन & lt; button style = 'display: none' & gt; clear & lt; / button & gt ; = true । देखें & lt; बटन शैली = 'प्रदर्शन: कोई नहीं' & gt; स्पष्ट & lt; / button & gt; नियंत्रक $ शो = गलत डीएफ़ प्रिंट अगर $ शो # बटन बटन अंत की समाप्ति इस तरह से सरल? & lt; बटन शैली = 'प्रदर्शन: & lt;% = $ शो? "इनलाइन": "कोई नहीं" & gt; '& gt; स्पष्ट & lt; / button & gt;

javascript - XMLHttpRequest doesn't work asynchronously -

यह मेरा JS var req = new XMLHttpRequest (); req.open ( 'पोस्ट', '/ कुछ-स्थान', true); Req.send ("सर्वर-पक्ष संसाधित करने के लिए एक स्ट्रिंग"); Var resp = req.responseText; समस्या यह है कि यह काम नहीं करती। जब भी मैं प्रतिक्रिया देखने के लिए console.log (resp) का उपयोग करता हूं, यह एक खाली स्ट्रिंग है। लेकिन जब मैं दूसरी पंक्ति को req.open ('POST', '/ some-location', गलत) में परिवर्तित कर देता हूं; , resp संसाधित परिणाम मैं async को झूठे में सेट नहीं करना चाहता, हालांकि। क्या मुझे यह देखकर एक योजना जावास्क्रिप्ट है कि मैं क्या गलत कर रहा हूं? यह काम नहीं करता क्योंकि यह एक AJAX अनुरोध नहीं है आपको AJAX का उपयोग करना चाहिए यह बहुत जटिल नहीं है और आप पर निर्देश पा सकते हैं।

ios - Associate Facebook Account With Multiple Users in Parse -

In my application, I use the services of pars to connect users to Facebook. Attempts to connect to the account which are already connected to another user, an error has been given and the user is not allowed to connect. Since I am using an anonymous user in my app, this is a special problem, if the user deletes the app and installs again, because their old accounts are still present in the database connected to their Facebook account, but Now they have a new anonymous user account, and can not link the new account to Facebook. What is the best way to fix this problem for me? If I am not mistaken, then any user says that when your app is deleted, I will not be able to remove the old user from the database when I delete the app. I need to either log out the old user and log in to the new user when a new user tries to connect with Facebook or allows multiple users to link to the same Facebook account. Or I think the new anonymous user account is merged into the old account that is l...

build context for docker image very large -

I have created some different directories on the host machine because I try to know about the dock so that my dockfire is organized Able to My dockerfiles look just like this: My actual RPM is only 1 GB but when I try to do sudo docker build -t = "crystal / test". , I send buildconfig for Docker Daemon 3.5 GB. Is there anything else that I am unaware of as you continue to build Docker images? Is my storage being deposited, as I create more images in my other directories on my host machine? The Docker Client sends the entire "build context" to the Docker Daemon. That context (by default) is the complete code in the Dockerfile (hence, the entire rpms tree). You can set up a file to ignore the Docker files, you may want to experiment with it. Alternatively, you can move your rpms folder to a directory level above your Dockerfile , and only symlink Test. Enter rpm in the directory of the Dockerfile .

playframework - How to pass session values to different methods in play and slick? -

I have a recognized method in one of my playing form model objects: Def validateForm (form: form [forms.RegisterForm.registerFormData]). = {Val Name = form ("name") value.get Val test = TableQuery [UsersTable] .filter (. _ Name === name) .firstOption. Do Get.name if (test == something) {blah} else {blah}}} The actual implementation of the controller: Def Register Submit = DBAPN {root RS = & gt; RegisterForm.registerForm.bindFromRequest.fold (formWithErrors = & gt; {BadRequest (views.html.user.register (formWithErrors))}, formData = & gt; {Wall Valform = RegisterForm.validateForm (RegisterForm.registerForm.fill (formData) ) if (valForm.hasErrors) {BadRequest (views.html.user.register (valForm))} else {stuff}})} I can pass slick session validateForm method Are you At the moment I can not query for form validation because there is no session to use queries. I know that some of these references do not look beautiful, but since this post they have bee...

html - How to apply multiple css radial gradients to a single element -

मेरे पास मेरे div तत्व पर निम्न शैली लागू है: पृष्ठभूमि-छवि: -मोझ-रेडियल-ग्रेडिएंट (50% -10%, अंडाकार निकटतम-कोने, आरजीबीए (5, 5, 5, 0.7), आरजीबीए (0, 0, 0, 0) 100%); इसका वांछित प्रभाव ( div के शीर्ष पर केवल आंतरिक ड्रॉप छाया है) मैं div के तल पर एक ही प्रभाव को लागू करना चाहूंगा निम्नलिखित पंक्ति अच्छी तरह से करती है, लेकिन यह पहले ओवरराइड करने लगता है, इसलिए मैं केवल एक या दूसरे प्राप्त कर सकता हूं। पृष्ठभूमि-छवि: -मोज-रेडियल-ग्रेडिएंट (50% 110% , अंडाकार निकटतम-कोने, आरजीबीए (5, 5, 5, 0.7), आरजीबीए (0, 0, 0, 0) 100%); क्या कोई मुझे दिखा सकता है कि प्रति तत्व कितने रेडियल ग्रेडिएंट पृष्ठभूमि हो सकते हैं? मुझे पता है कि वेबकिट यह आसानी से कर सकता है, लेकिन मैं एक क्रॉस ब्राउज़र कार्यान्वयन / वैकल्पिक की तलाश कर रहा हूं। धन्यवाद पृष्ठभूमि-छवि: यूआरएल (), यूआरएल (), यूआरएल (), यूआरएल (), यूआरएल (); यूआरएल के बजाय पाठ्यक्रम आप ढाल डाल सकते हैं। और सभी आधुनिक ब्राउज़रों ने इस सुविधा का समर्थन किया है (अर्थात् आईई नहीं)। क्रम में इसे IE में उपलब्ध करान...