Posts

linux - Run scipt like sudo with Gksudo -

I'm new in linux I'm trying to mount and umount. ISO with nano script I put the script /home/user/.gnome2/nemo-scripts/ . My problem is, with gksudo I run su command like only 1. How do I run this script? #! / Bin / bash gksudo -k / bin / echo "got r00t?" BNAME = $ (basename "$ NEMO_SCRIPT_SELECTED_FILE_PATHS") sudo mkdir "/ Media / $ BNAME" --info --title "ISO Mounter" zenity if sudo is ISO9660 $ Income Tax - o loop mount --text "$ BNAME e $ NEMO_SCRIPT_SELECTED_FILE_PATHS" NEMO_SCRIPT_SELECTED_FILE_PATHS "/ Media / $ BNAME" if zenity --question --title "ISO Mounter" --text "$ BNAME successfully mounted. Open Volume?" Then the Nemo / Media / $ BNAME --no- the rest of the desktop fi exit 0 sudo rmdir "/ media / $ bname" zenity --error --title "ISO mounter" --text "$ can not be mounted BNAME! " There are a couple of ways to do this in your script above, you...

string - android error setting Drawable -

मेरे पास follwing कोड है फ़ाइल f = नया फ़ाइल (temp); ड्रायनीय डी = ड्रायबल.क्रेडिटफॉम्पेथ (एफ.एटएबेसोल्यूटपाथ ()); background.setBackgroundDrawable (घ); अस्थायी एक स्ट्रिंग है जिसमें एसडी कार्ड पर एक तस्वीर का पथ "/storage/emulated/0/Pictures/pic1.jpg" में होता है कोई भी विचार यह कैसे तय है? किसी भी मदद की सराहना की मार्क मुझे लगता है कि आपके पास इसका उत्तर है: और मुझे लगता है आपको इस अनुमति की आवश्यकता होगी & lt; उपयोग-अनुमति एंड्रॉइड: name = "android.permission.READ_EXTERNAL_STORAGE" / & gt;

ios - UITextView not saving markedTextStyle (UITextInput protocol) -

Marking text in a UITextView, but for some reason it's refusing to accept anything, I set it to setmarkedTextStyle With-the -Marked Textstyle always depends on zero, and the marked text always looks the same (maintains blue background and text color). [_Type text setting options: @ {UITextInputTextColorKey: [UIColor whiteColor], UITextInputTextBackgroundColorKey: [UIColor TranceLinkBlue], UITextInputTextFontKey: [UIFont fontWithName: @ "helvetia new-medium-medium" Size: 14.0]}]; When I distract text, trying to both of these before and after correctly marking the text, but it still maintains the default style, and for the style Returns zero. After a lot of tests, I can only say that this is a bug in SDK have no effect, and the returns of the gates are always zero. What can we read in this document: marked text such A dictionary of properties that describes how the marked text should be drawn. I told it to Apple as a bug (bug ID - 17 9 14881 ). ...

ruby - Carrierwave and rails fixtures -

मैं कैरियर वाव अपलोड के साथ पॉप्यूलर रेल फिक्चर (yaml) का उपयोग कैसे करूं? प्रलेखन इस को कवर नहीं करते हैं और कैरियरविवे विकी या तो नहीं है। मैंने कोशिश की है और मैंने यह सत्यापित किया है कि उपरोक्त रूबी कोड एक मान्य फ़ाइल ऑब्जेक्ट उत्पन्न करता है। मुझे संदेह है कि कहीं भी जुड़ने जा रहे हैं क्योंकि उनका इस्तेमाल केवल रेल कोडबेस में ही किया जाता है। इसके अलावा, मैं उनका इस्तेमाल करता हूं, इसलिए यह सब कुछ मायने रखता है। मुझे यह भी पता चला कि यह मेरी मदद करता है, और तुम भी। test_helper.rb वर्ग ActiveSupport :: TestCase # यहां सभी परीक्षणों के लिए उपयोग करने के लिए अधिक सहायक विधियों जोड़ें ... CarrierWave.root = Rails.root.join ('test / fixtures / files') # पथ आप पर निर्भर है def after_teardown सुपर कैरियर वाहक। स्कैन_cached_files! (0) एंड एंड क्लास कैरियर वाह :: माउंट :: माउंट डीफ स्टोर! # परीक्षण समाप्ति अंत में अपलोड नहीं किया जा रहा है मैं फिर अपने अपलोडर में डाल दिया: def store_dir Rails.env.test अगर? "चित्र" अन्य "अपलोड / # {model.class....

google compute engine - Is increasing the max. number of instances in the same zone possible? -

I need a large number of Google Compute Engine instances for which I am working on an experiment (~ 120) It does not matter how powerful every example is, I just use the n1-standard-1 example. The experiment needs to have all the examples in the same area, but I came to know that I can make only 22 ~ 23 instances in the same area. Will there be any way to increase that limit? Thank you in advance! is described here as your default per-sector quota: Google documents the doctor at the end of a link "quote change request form for" hope the

In django-guardian, how can I get all objects user has any permissions for -

In the Django-Guardian, how can I get all the objects user (even through groups) is one I am searching for all objects, there is no permission for a given user. & gt; & Gt; & Gt; Guardian.shortcuts import_objects_for_user from import & gt; & Gt; & Gt; Joe = User.objects.get (user name = 'joe') & gt; & Gt; & Gt; Get_objects_for_user (which, 'auth.change_group') [] & gt; & Gt; & Gt; Import_perm & gt; from guardian.shortcuts & Gt; & Gt; Group = group.bizject Create ('some groups') & gt; & Gt; & Gt; Assign_param ('auth.change_group', Joe, group) & gt; & Gt; & Gt; You can write codenames in a list for any permission, or use [/ b> . & gt; & Gt; & Gt; Perm.codename] for perm in Group_perms = [perm.cperms_for_model (group)] gt; & Gt; & Gt; Get_objects_for_user (joe, group_perms, klass = group, any_perm = true) [& lt; Some group groups...

jquery - mysqli_connect() connection error on webserver -

मैं $ connecDB = mysqli_connect ($ db_host, $ db_username, $ db_password, $ db_name) या मरने ('नहीं कर सकता डेटाबेस से कनेक्ट '); मेरे पेज के लिए लेकिन सही उपयोगकर्ता का उपयोग करने के बाद अपने वेब सर्वर पर "डाटाबेस से कनेक्ट नहीं हो सकेगा" दिखाता है, लेकिन यह स्थानीय होस्ट पर काम कर रहा है! कृपया मुझे सूचित करें कि क्या त्रुटि हो सकती है? क्या आप अपने वेबसर्वर पर स्थानीय होस्ट का उपयोग कर रहे हैं? यदि आपका डेटाबेस उसी वेब सर्वर पर होस्ट किया गया है तो स्थानीय होस्ट का उपयोग करें।