Posts

Showing posts from March, 2014

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) या मरने ('नहीं कर सकता डेटाबेस से कनेक्ट '); मेरे पेज के लिए लेकिन सही उपयोगकर्ता का उपयोग करने के बाद अपने वेब सर्वर पर "डाटाबेस से कनेक्ट नहीं हो सकेगा" दिखाता है, लेकिन यह स्थानीय होस्ट पर काम कर रहा है! कृपया मुझे सूचित करें कि क्या त्रुटि हो सकती है? क्या आप अपने वेबसर्वर पर स्थानीय होस्ट का उपयोग कर रहे हैं? यदि आपका डेटाबेस उसी वेब सर्वर पर होस्ट किया गया है तो स्थानीय होस्ट का उपयोग करें।

java - Button Click - Copy file from APK Package to Android Path. But How? -

I am trying to create a simple application that will copy a file from the "property" folder of the APK package (e.g. MNT / Sdcard / android / data / com.testdev.testapp when clicked button1. But I do not know how to do it. Is it possible or is there any remedy? Can anyone help me? Thanks in advance Step # 1: Receive the call Asset Manager For getAssets () any reference (for example, your activity ). step # 2 : Open () at Asset Manager to get InputStream at the costume. Step # 3: Use standard Java file I / O to copy from InputStream to an FileOutputStream to point to a point on external accumulation.

Combine objective-c enum in swift -

After I am using the Vehicle Fitness API (which is in Objective-C) in my fast application I am trying to combine bitwise multiple items with enum which is not NS_ENUM. It is defined as: typedef enum {/ ** specifies non-existent sensor * / WF_SENSORTYPE_NONE = 0, / ** specifies bike power sensor * / WF_SENSORTYPE_BIKE_POWER = 0x00000001, / ** Specifies the bike speed sensor. * / WF_SENSORTYPE_BIKE_SPEED = 0x00000002, / ** Specifies the bike cadence sensor. * / WF_SENSORTYPE_BIKE_CADENCE = 0x00000004, ...} WFSensorType_t; As a result of the following: 'WFSensorType_t' is not convertible to 'Bull' WF_SENSORTYPE_BIKE_SPEED | WF_SENSORTYPE_BIKE_CADENCE // WFSensorType_t The hard part I think passes for sensorType another WAV API object that accepts a WFSensorType_t Need to be done, so can not wrap the enum in something else otherwise it will not be able to pass it back to the existing API. Any ideas? You can try: itemprop = "text"> Y...

c++ - assign `this` to `MyClass *instance`, `instance->member` is not referencing same memory as `this->member` -

मेरे सीपीपी कार्यान्वयन में मेरे पास है: स्थिर MyClass * उदाहरण; सभी युक्त स्कोप (घुंघराले {}) के बाहर आज़ादी से चलती है मैंने इसे nullptr करने के लिए भी आरंभ करने की कोशिश की है। शून्य MyClass :: myMethod () {instance = this; लॉग ("हैलो,% d,% d", wList, उदाहरण-> डब्लूएलआईएस); उपरोक्त लॉग सदस्य ऑब्जेक्ट पॉइंटर wList के लिए एक मनमाना स्थान दिखाता है, लेकिन उदाहरण उसी डेटा की ओर इशारा कर देना चाहिए जो कि यह करता है, और इसलिए वही wList , लेकिन यह नहीं है example-> wList अभी भी 0 है। यहां क्या हो रहा है? के रूप में मार्क रोटोम ने टिप्पणी में नोट किया, आप एक संकेतक को प्रिंट करने के लिए % d फ़ॉर्मेट स्पेसिजर का उपयोग नहीं कर सकते हैं, आपको अपने कोड को पोर्टेबल होने के लिए % p का उपयोग करना होगा पॉइंटर्स के लिए % p के अलावा कुछ भी उपयोग करने के लिए तकनीकी रूप से अपरिभाषित व्यवहार है, लेकिन सभी संभावनाओं में आप देखेंगे कि यह 32-बिट सिस्टम पर ठीक काम करेगा। हालांकि, 64-बिट सिस्टम पर, जिस पर मैं दांव लगाता हूं आप का उपयोग कर रहे हैं, यह ऊपर चल ...

debugging - Xcode's 'po' fails to identify the variable I wish to study. Wny? -

Image
Environment: Xcode 6 Beta 4 I'm just trying to check the text value using the debugger . However, the debugger fails to identify the static variable (through 'Walk'). This is also true for Wars. Why? Funk Textfield Shawl Ritter (Textfield: UITFixified) - & gt; Boole {myText = "Hello World" The Text = TextField.Text! Here is the debugger result: (lldb) PO textField error :: 1: 1: error: the unrecognized identifier Use 'text field' textfield ^: 11: 5: Error: Use of unresolved identifier '$ __ lldb_injected_self' $ __ lldb_injected_self $ __ lldb_wrapped_expr_29 ( ^ (lldb) Po myText Error :: 1: 1: Error: Uses of Unsolved Identifier 'myText' MyText ^: 11: 5: Error: Use of unsolved identifier '$ __ lldb_injected_self' $$ __ lldb_injected_self. $ __ lldb_wrapped_expr_30 ( ) (P) Thetext Error :: 1: 1: Error: Unsolved Identifier 'theText' theText ^: 11: 5: Error: Unsolved Identifier '$ __ lldb_injected_self Use...

security - Should Nonces Be Used During Log-In? -

गैर-आधारित प्रमाणीकरण के निम्नलिखित उदाहरण प्रस्तुत करता है: ग्राहक अनुरोध सर्वर नॉन (यानी, बाद में "सर्वर नॉन" के रूप में संदर्भित) के साथ प्रतिक्रिया करता है। क्लाइंट का उपयोग करता है सर्वर नॉनस, अपने स्वयं का ग्राहक, और एक हैश उत्पन्न करने के लिए उपयोगकर्ता इनपुट कोड। क्लाइंट उपयोगकर्ता-इनपुट किए गए उपयोगकर्ता नाम, ग्राहक को नकार और सर्वर पर हैश भेजता है। सर्वर अपने डेटाबेस से सर्वर नॉन और यूजर पासवर्ड दोनों को पुनर्प्राप्त करता है, संभाव्यतः यूज़रनेम के जरिए। सर्वर सर्वर को नॉन, क्लाइंट नॉन और पासवर्ड को जोड़ता है एक हैश उत्पन्न करने के लिए सर्वर हैश का सिर्फ क्लाइंट से भेजे गए हैश से उत्पन्न हैश। यदि हैश मैच, क्लाइंट प्रमाणित है यदि नहीं, तो क्लाइंट अस्वीकार कर दिया गया है। इसका अर्थ यह नहीं है कि सर्वर साउंड टेक्स्ट में उपयोगकर्ता पासवर्ड को स्टोर करता है? सुरक्षा सिद्धांतों के सकल उल्लंघन में वास्तविक पासवर्ड की बजाय पासवर्ड की नमकीन हंस को बचाने की सलाह देते हैं? यह प्रोटोकॉल मूल रूप से एक है। इसका उपयोग वास्तविक रहस्य (ईपी...

Testing PHP code in dreamweaver -

I am currently developing a simple web based application which is using HTML, CSS, PHP and Javascript. I am developing it with Adobe Dreamweaver 3.0 and I have used procedural PHP for server-side script writing. Now, I want to test PHP code. Can anyone tell me how can I check the procedural PHP code in Dreamweaver? Your site to test locally to install a web server and PHP on your computer the wanted. I recommend you XAMPP. The easiest way to set up what you need.

objective c - Need to scroll to visible the image in table cell in ios -

I have created an application to view some data using a URL. I used asynctask to stop the main thread block, but after the page is loaded, I need to view and scroll my images but it does not display every image here My code is ViewDidload method - (zero) viewDidoadload {[Super Viewedload]; Self.tableView.dataSource = self; Self.tableView.delegate = self; _myObject = [[NSMutableArray alloc] init]; NSData * jsonSource = [NSData dataWithContentsOfURL: [NSURL URLWithString: url]]; Id jsonObjects = [NSJSONArilationJSONObjectWithData: jsonSource option: NSJS reading; RemoteContributor error: zero]; NSArray * DataDek = [JasonObjects ObjectForcae: @ "Data"]; (Attorney * l = [[attorney alok] init]; USINCRAR (qi, data); transmissions_acific (sending_jet_man_qu), ^ {l.uiImage = image;});}; [_myObject addObject: [L initFromDictionary: dicData]]; }} IndexPath {static NSString * CellIdentifier = @ "SettingsCell"; UITableViewCell * cell = [tableview] dequeueReusabl...

flash - Generate a Static Unique ID for every Computer without storing it locally in ActionScript -

I want to create a unique ID for every computer and it should be constant every time the ID is generated , Which means that we do not need it to be stored in local storage because most of our users disable local storage, is it possible? I tried to find a way to get the user's MAC address in the ActionScript, so I can make a unique ID from it, but I think it is not possible in pure action and flash player. Any ideas how can I get it? AFAIK You can not do this unless you create an AIR application (and use the Class NetworkInfo By -) However, any security you do not make is a security measure, users can always fool your system. Anything generated by the client machine can always be fake on the client machine ... CPU / MB serial, make sure, just make a hook that asks the program every time for this. Or just to change the code of the SDF, the client changes the "legitimate" number on the machine that it sends to the server, to change. You must make it sufficient...

python - Hide or unhide a QLabel at the same location -

Image
मैं 'अमान्य उपयोगकर्ता नाम' और 'अमान्य पासवर्ड' QLabels को केवल तभी दिखाऊंगा जब उपयोगकर्ता नाम और पासवर्ड क्रमशः गलत हो, अन्यथा मैं उन्हें छिपाना चाहता हूं। I छिपाने () और शो () विधियों का उपयोग करने की कोशिश की, लेकिन QLabels एक अलग पॉप-अप विंडो में शो () विधि के साथ प्रदर्शित की जाती है, ऊपर दिखाए गए स्थिति में प्रदर्शित करने के बजाय (ब्लैक बॉक्स में)। मैं पायथन में कोड लिख रहा हूं। कृपया सुझाव दें। पुस्तकालयों का आयात किया गया: PyQt4 से आयात सिस्टम आयात करें। QtCore आयात * PyQt4 से .QtGui आयात * कोड नीचे दिया गया है: # लेबल्स self.ErrorUsrName = QLabel ("अमान्य उपयोगकर्ता नाम") self.ErrorPasswd = QLabel ("अमान्य पासवर्ड ") #Buttons self.Lbutton = QPushButton (" लॉगिन ") self.Cbutton = QPushButton (" रद्द करें ") # लिन संपादन स्वयं। यूसराना = QLineEdit (" उपयोगकर्ता नाम ") self.Passwd = QLineEdit (" पासवर्ड ") स्वयं UsrNa Me.selectAll () #Grid लेआउट self.grid = QGridLayout () self.grid...

Find versionnumber and versioncode of apk generated by android studio -

I know that .apk files are zip files and when we remove them, find some information about the app Can pars the MANIFEST file insertion for This is very useful for someone like me who is going to make an app store, at least I can get the name and version code of the version of the app. But when we make a signed APK, the version name and version code in the Android-Studio is not defined in the MANIFEST file. We should define them in the build.gradle file. So now when users upload files in my app-store, how can I find the version code and the name of the version and find out that this is not the case with the older versions? Just click the AAPT in / from / your / Android-sdk / build-tools / your- Api-version-available /... Use an example command execution: aapt dump badging theuserapp.apk And it will respond with something like this: Package: name = 'com.blabla.theuserapp' versionCode = '2000' versionname = '2.0.0' Of course, the tool is ...

java - sql query work when run it in sqlDeveloper but not work using hibernate -

I have a query that I want to run using Hibernate Native SQLLQuery SQL Developer It works fine, but when hibernate is run, it throws the exception . . Reason: By: org.hibernate.exception.SQLGrammarException: org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert Could not remove ResultSet (SQLExceptionTypeDelegate.java:82). . . Reason: java.sql.SQLSyntaxErrorException: ORA-00911: Invalid Character Here is my SQL query: select car_id from car.plate car where is the car. Order '% 12%' by CAR.CAR_ID; > your semicolon ";" Remove cheers.

Python how to add number to string -

I want to add a number to my URL to look like this: www.exemple.com/001 www.exemple.com / 002 ... www.exemple.com/009 www.exemple.com/010 ... www.exemple.com/100 www.exemple.com/101 So I make this script in Python url = 'www.exemple.com/': if y & lt; 10: y = '00' + y elif y and lt; 100: y = '0' + y and: pass url + = str (y) print url but I have this error: indentation Error: unindent does not match any external indentation level Any idea to fix this and thanks a lot guys If I understand your question, I think that you Url = 'www.exemple.com/' # & lt; Like something like - Example for x in xrange (1, 11, 1): Print Url + "{0: 03d}". What format (x) prevents at 10 and output www.exemple.com/001 www program file Mple.com/002 www. Exemple.com/003 www.exemple.com/004 www.exemple.com/005 www.exemple.com/006 www.exemple.com/007 www.exemple.com/008 www.exemple.com/ 009 www.exemple .com / 010

Populate a dropdown list in php from mysql table -

Is it possible to populate a dropdown list in PHP, which only shows 1 column of data table? This is my PHP file, in this way I get the rows back from the database. I want only 1 column of a MySQL table to be displayed in a dropdown list. & lt ;? Php // includes all Sangginion included_on ($ _ server ['DOCUMENT_ROOT']. / ELTS /eLTS_lib/libSanggunianManagement.php "); $ StrMessage; $ MySanggunianManager = New SanggunianManager (); if ($ mySanggunianManager- & gt; getAllSanggunian ($ strMessage )) {Print "& lt; Table id = 'myTable' class = 'myTable' border = 0 style = 'font-size: 12px;' & Gt; "; Print" & lt; Tr & gt; "; Foreach ($ mySanggunianManager-> arrHeaders $ strHeader) // print" & lt; Th bgcolor = '# 003f22' & gt; "$ strHeader." & Lt; / Th> "Print" & lt; Br> "Foreign exchange ($ mySanggunianManager-> arr objects as $ myRow) {Pri...

html - how to submit form data using JS ajax without appending it to url? -

I want to submit a form using AJAX Javascript and want to get the parameter value in the servlet name element? Please guide. thanks use the post instead GET To use jquery with the method AJAX, you will need to put your form in a Jason object If your form is like this & lt; Form id = "form1" & gt; .... & lt; Input id = "idvar1" type = "text" name = "var1" & gt; & Lt; Input id = "idvar2" type = "text" name = "var2" & gt; & Lt; / Form & gt; You can use the AJAX method like this: var data = {'var1': $ (# idvar1) .val () 'Var2': $ (# idvar2) .val ()}; // (you) ($ ("$ form1" url, data: data / * here you will send data of your form * /});}); More info about $ .ajax here More about this post here

unity3d - Unity Google Play Games Android - How to get Current Player's Score and the score above it -

I am using Google Play Games Integration plugin for Android, and I'm trying to get 2 things I am Get the score of the current player Obtain the straight player's score from the current player (unless they are in the first place) I have seen some examples here how to do this in plain Android, but I'm not sure how to do this with the Unity plugin. Any leads? Thanks in advance, any help is appreciated. :)

jquery - Navigation controller in tabbar controller, to show detail view from tabbar button -

I'm having trouble optimizing a tab bar controller. Please understand that I do not have permission to post an image because I had already joined it. My app has a tabbar controller as the rootbase controller only the first tab is associated with a navigation scene with a three-level hierarchy (see table - 2 table view - detail view). Like the UI of the 'Run Keeper' app, I want a 'shortcut' button in the center of my tabbar, which shows the Quick Details view of the first tab. In other words, please imagine an iPhone music app, with adding the 'Play Now' button in the tabbar. For a tab's UI, I added a button as the view of the root view controller at the center of the tab bar. It worked, but I failed to implement other things; Methods for shortcut behavior After touching the center button, I think the steps to do this are: (i) to show the tab for the first time (Ii) See the first table (iii) Select a cell from the first table view (previou...

android - Do you need to check Google Play Services connection in every activity? -

I have followed this tutorial and received a code of work:. The Google Design Guidelines begin to say that it is paramount that the apps are verified in the services. However, only GooglePlayServicesUtil.isGooglePlayServicesAvailable (this) is running; In my main activity, am I not weakening in other activities? I think it might happen if I add that code, then it makes a lot of messier, what's the proper way? Personally, I'll only check in main activity. This is the way whether PlayServices are available or not. If you are sufficient to check it once, the worse case is that they uninstall the Plaswiver, while still in your app and your next Play services call failed. There is not a high probability and possibly less risk (depending on your app stability requirements).

How to push the array of data to another array through javascript without loop -

I have a Jason array like data {"alphaNumeric": []} Want to push any other array [mentioned below] objects in data with this loop concept {{"Id": "1", "alpha": "one"}, {"id": "2", "alpha": "b" "}]}. I used the code below: data. Alpha enumeric push (data.Numeric); But output is: data {"alpha numeric": [[{"id": "1", "alpha": "a" }, {"Id": "2", "alpha": "b"}]]}. {{"Id": "1", "alpha": "a"}, {"f", "id": "2", "alpha": "b"}]}. Help solve me. data. Alpha annumer .conkat (data.Numeric);

vba - Numbering a file and copy files ends with a specific digit -

I need to copy the file I already created (a.txt) and copy it so I have a1.txt Will be a2. Txt a3.txt etc. Unless I do not receive the A999999.txt, for example a4453.txt is copied files into a separate folder. What is the best way to do this? Vb / batch file favorites. thanks =] Daniel. @echo off set for "different_folder = c: \ diff" / l %% Copy ("a.txt" "%% n.txt") to n (1; 1; 999999) / f %% f ('Dir /ba*.txt ^ | findstr / i / e' 3 Txt '') (Copy "%% ~ ff"% different_folder%) has not been tested.

c++ - pthread function from a class -

मान लें कि मेरे पास एक वर्ग है जैसे class c {// ... शून्य * प्रिंट (शून्य *) {cout & lt; & lt; "नमस्ते"; }} और फिर मेरे पास एक सदिश है c vector & lt; c & gt; वर्गों; Pthread_t t1; classes.push_back (ग ()); classes.push_back (ग ()); अब, मैं c.print () पर एक धागा बनाना चाहता हूं और निम्नलिखित मुझे नीचे दी गई समस्या है: Ouput त्रुटि: 'शून्य * (tree_item :: Em>) (शून्य ) 'शून्य' ( ) (शून्य ) 'तर्क के लिए' 3 'से' int pthread_create (pthread_t *, const pthread_attr_t *, शून्य * ( ) (शून्य ), शून्य *) ' आप' टी इसे जिस तरह से आपने लिखा है, ऐसा नहीं है क्योंकि सी ++ क्लास सदस्य फ़ंक्शंस में छुपा हुआ यह पैरामीटर पास किया गया है। pthread_create () को पता नहीं है कि का मान क्या है का उपयोग करें, इसलिए यदि आप उचित प्रकार के फ़ंक्शन पॉइंटर को विधि का कास्टिंग करके संकलक के चारों ओर ले जाने का प्रयास करते हैं, तो आपको एक सेगमेंटेशन गलती मिलेगी। क्लास को बूटस्ट्रैप करने के लिए आपको एक स्टैटिक क्ल...

Solr query for same keyword returning different results? -

I am using the text_general type to search in the Solr index with the configuration below. & lt; FieldType name = "text_general" class = "solr.TextField" statusIncantgap = "100" & gt; & Lt; Analyzer Type = "Index" & gt; & Lt; Tokenizer class = "solr.StandardTokenizerFactory" /> & Lt; Filter class = "solr.SnowballPorterFilterFactory" /> & Lt; Filter class = "org.apache.solr.analysis.WordDelimiterFilterFactory" generWordParts = "1" generNumberParts = "1" catenateWords = "1" catenateNumbers = "1" catenateAll = "1" splitOnCaseChange = "1" splitOnNumerics = "1" protected Basic = "1" stem EnglishPositive = "1" /> & Lt; Ignore filter class = "solr.StopFilterFactory" = "true" word = "stopwords.txt" /> & Lt; -! In this example, we will only use synonyms ...

javascript - How to ration amount in purely functional style -

I need to distribute some quantity for the array of people according to my score. The rule is that their demands Anything that is done according to their condition is fulfilled. Javascript using Low-Dash (): var zodiac = 1000, people = [[name: 'joe', score: 40, demand: 400}, {name: '' Su 'Score: 30, Demand: 350}, {Name:' Kim ', Score: 25, Demand: 300}, {Name:' Ron ', Score: 20, Demand: 250}]; Function delivered (people, zodiac) {return _.map (_ (people, 'need'), function (person) {var ration = Math.man (person demand, amount); zodiac - = ration; // The state is (mutation) that I want to save from the return. Deal (person, {ration: ration}}}); } Console.log (Distribute (people, zodiac)); Result: [{Demand: 400, name: "joe", ration: 400, score: 40}, {demand: 350, name} Name: "Roe", Ration: 350, Score: 30}, {Demand: 300, Name: "Kim", Ration: 250, Score: 25}, {Demand: 250, Name: "Ron", Ration: 0, S...

html - Mustache.to_html not returning anything -

I have a total (3) templates in my page and this overlay template is third and last one is the first two basically The template is written as well and they work fine. But for some reasons, console.log (html) does not return any of the following: & Lt; / Div & gt; {{OverlayTemplate}} & lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ (Function () {$ .getJSON ('/ scripts / art.json', function (data) {var overlaytmpl = $ ('# overlayTmpl'). Html (); var html = mustache.HTML_to (overlaytmpl, data) ; Console.log (html); $ ('# overlay'). Html (html);});}); & Lt; / Script & gt; ** On the first two templates, the console.lag fineens HTML output. I do not know why something hanging on this JSON file has been validated ... Please help me out of being mad This block of code should have a hex. Does anyone have a magic wand? This can help you - Change your template like this: & lt; Script id ...

Generator expressions in Julia -

I tried to apply generator expressions in Julia, but I got an error that I do not know how to fix . / P> Julia & gt; JSON julia & gt; Path = "test.txt" Julia & gt; JSON. Pars (readline (open)) with 16 entries Dict {string, ac}: "nk" = & gt; 1 "Sai" = & gt; "Monster" "C" = & gt; "US" "HH" = & gt; "1.usa.gov" "r" = & gt; "Http://www.facebook.com/l/7AQEFzjSi/1.usa.gov/wfLQtf" "a" = & gt; "Mozilla / 5.0 (Windows NT 6.1; WOW64) Apple WebKit / 535.11 (KHtml, like ..." H "=> gt; wfLQtf" t "= 1331923247" G "=>" A6qOVH " "Teas" => gt; "America / New York" "Law" => {42.576698, -70.954903} "l" => gt; "orofrog" "hc" => 1331822 918 "GR" => ; "MA" "U" => "http: //www.ncbi.nlm.nih.gov/p...

generics - Why doesn't Java iterator constructor signature has iterator type? -

This can be just a question on the signature layout of the Java Itater constructor. Iterator type must be specified on class definition (an abstract type T or something as in the form); Thus, why its related manufacturer Public GunmenIterator (list list) does not contain the T iterator type? However, generally the normal type of T is used in the iterator, is it an alternative to match with other methods? Public Squares GunmenIterator & lt; T & gt; Uses the IETATOR & lt; T & gt; {Private list & lt; T & gt; List; Private Iterator & lt; T & gt; ITER; Public GunmenIterator (list & lt; T & gt; list) {this.list = list; This.iter = list.iterator (); } Public static zero major (string [] args) {Eitreter & lt; Integer & gt; Gunchainers = new gunfighter iterator & lt; Integer & gt; (Gunman); }} As shown above, iterator type & lt; Integer & gt; must be present in the beginning (otherwise, compiler warnings wil...

javascript inside php if specific user -

I'm new to PHP, so maybe this is a stupid question. I have some code that show a livechat for all Wordpress users. Should reach, in level 7, and those who do not show anything to any other level. // Check if current_user_on_level ($ level_id) returns true or false if (current_user_on_level (7)) {& lt ;! - Start of Zopim Live Chat script - & gt; & Lt; Script type = "text / javascript" & gt; Window. $ Zopim || (Function (d, s) {var z = $ zopim = function (c) {z ._ push (c)}, $ = zs = d.create element (s), e = d. GetElementsByTagName (s) [0] ]; Z.set = function (o) {.z.set _.push (o)} z._ = []; z.set ._ = [];. $ Async =! 0;. $ SetAttribute ( 'Word-phrase', 'utf-8'); $ .src = '// v2.zopim.com/?0xObfhlxyhOFFN07eRruAdGFbEDphAiO';zt=+new date; $ type =' text / javascript '; e.parentNode.insertBefore ( $, E)}) (document, 'script'); & Lt; / Script & gt; & Lt ;! - End of zopime live chat script - & gt; } Oth...

Load string from Delphi stream in Oxygene -

I am new to oxygen and I want to read the strings from a stream which was produced by Delphi. I get this stream through TCP Here's how I save strings on the client side: As you can see, I first add the size of the string of the stream and then the content. My current method of loading a wire from a stream on the server side (oxygen) looks like this: "LoadStringFromStream" (const aStream: NSInputStream): String; Start Var Bluff: array of [1024] uint8_t; Var len: integer: = 0; Lane: aStream. Read more (buff) Maximax (1024); If LAN & gt; 0 Then start the len.stringValue; Var data: NSMutableData: = NSMutableData.alloc (). InitWithLength (0); Data.appendBytes (@buf) Length (Buff [0]); Exit NSString.alloc () InitWithData (Data Encoding) (NSStringEncoding.NSASCIIStringEncoding); End; End; But this hole gives content and not the current part. EDIT: Oh, I had a mistake in the server application ... Now I am able to read the wire, but not to read the integer valu...

c - Why are directory files not read using fread? -

I was going through an example from Maurice Baque's Unix Book. He writes a simple copy program as outlined below. Although it fails when the input file is a directory file, I stumbled upon opendir and some other such APIs - should I use it? If a binary file can work with this, then why is the directory file considered different? Unix is ​​not everything in the form of a file, even if it is being interpreted by this program. How can I increase this program to support a directory file and then create a Maconod? I want to test this, suppose I am in / home / user1 and a $ / Copy / home / user user-home-clone and mknod to see how this directory will be different from home, I think the user-home-clone does not have any reference to itself, but all other files will be in the / home / user [even if it is a user called a file -hock-clone / home / user) because when we copy Used to command, so was not there? #include & lt; Stdlib.h & gt; # Include & lt; Std...

html - activex controls and scripts running on website -

OK, I'm still making a full start, I'm having some problems and in designing some websites Some successes, but I The question is why does my website always generate such a thing Internet Explorer has restricted this site from running Active X Controls or scripts. Obviously, because I'm trying to run some scripts, my question is how can other sites without working without asking me without permission, how can I work without asking myself The website does not want zero functionality if no permission is given. Thanks in advance, and I know that this is not a very technical question but really should know, thanks again. What happens is that Internet Explorer applies many restrictions for scripting in local files. If you want to develop a web site, then you will need to install your local web server sooner or later (AP pain, or if you prefer to be on Microsoft side, IIS ). You can not find this problem with other sites because you do not load from your hard...

git - Get all commits during working hours (or after hours) -

Is there any way to get a list of earnings at that time, which is 09:00 and 17 : 00, and their time The only thing that I can think of is sending output to a file, and then trying to parse it ... I think this looks like "code =" git log - like = "2014-01-05 09:00" - " First = "2014-01-05 17:00" . See reference here:

How to do GOOD right justify in python? the string before str.rjust() has various length -

Image
इस तरह मैं इसे अब मुद्रित कर रहा हूं, लेकिन मैं चाहता हूं कि सभी नंबर एक ही स्तर पर हों, लेकिन मैं ऐसा नहीं कर सकता, क्योंकि ईमेल की अलग-अलग लंबाई - hotmail.com, mail.com ईमेल: ईमेल में ईमेल के लिए: current_email = email.split ("@ मेरे कोड: def count_domains (तिथि, ईमेल): प्रिंट (तारीख) my_emails = ", 2) [1] my_emails.append (current_email) unique_emails = सूची (सेट (my_emails)) श्रेणी में x (len (unique_emails)): प्रिंट (str (unique_emails [x])। Rjust (2) +": "+ Str (my_emails.count (unique_emails [x]))। Rjust (4)) इस तरह से कुछ के बारे में: प्रिंट ((str (unique_emails [x]) + ":") .ljust (20) + str (my_emails.count (unique_emails [x] ))। Rjust (4))

Excel VBA XML HTTP - Code not working on Windows 8 -

I have the following function that returns the HTML document for the URL I use the HTML Doc given in another function I am here. The function works perfectly on Windows 7, but not on window 8, unfortunately, does anyone help me write written code that works on both Windows 7 and 8? I think I need to use a different version of the XML HTTP object. Reset global variable in the form of GetHtmlDoc (object DM) as the string in the form of a string) PageSrc = Set "html" = Create object with nothing (" MSXML2.XMLHTTP "). Open "GET", URL, True .Set while .readyState & lt; & Gt; 4: Doovents: Wend A = .statusText 'Check for any server errors if .statusText & lt; & Gt; "OK" then check for 'WinHTTP error' Msg = GetWinHttpErrorMsg (.Status) 'if msg = "msg msg = .statusText' error number and return message GetPageSource =" Error: "& amp; Titas & amp; "-" & amp; Close the Msg func...

perl - MockModule's mock not being called? -

I have a module that uses random numbers in it. For testing purposes, I want to set it before giving a number to the random number generator set. Under test, my code includes such dependency: Use Math :: Random :: MT Q (RAND); and uses this: My $ currdice = int (rand ($ true) + 1); And my joke is done as such: $ my fake; BEGIN {$ mockRand = Test :: MockModule-> New ('Math :: Random :: MT'); Use_ok (LogiDice); } $ MockRand- & gt; Counterfeit ('rand' => sub {return1}); ($ Successes, $ output) = LogiDice :: roll ("3d10", "ww"); OK ($ successes == 0, "Whitewolf Mode can return 0 successes") or Diage ("Reported". $ Successes. "Successes instead."); I am always getting the success of random numbers rather than expecting 0 (because the random number should always be 1, which should always fail). Is there something like how I did QW? Am I using MockModule incorrectly? Should I use MockMDU? I tried...

powershell - $Variable not recognized as $null -

I have a SP list that pulls the sharepoint sites data. If it is empty then the variable still says That's not it. $ SPSites = ($ employeeAITIM .field ["SharePoint site membership"]). FEATURESWEELSTEXT ($ employee AITIM ["SharePoint Site Membership"]) PSC: \ Windows \ System 32 & gt; $ SPSITES PS C: \ Windows \ system32 & gt; $ Spsites.COUNT 1 PS C: \ Windows \ system32 & gt; Test-path variable: \ spsites true What's going on here? Is this white space? How can I not do if the $ null statement? I found this, but I need to say the opposite that if there is no zero or white space then this if ([string] :: IsNullOrWhiteSpace ($ spsites))

ios - PerformSegueWithIdentifier does not work -

I am trying to use self.performSegueWithIdentifier to change the view on the storyboard A JSON file is loaded remotely, for that I am using Swift class "agent" so that an HTTP request can be done. When I type "done" out of the variable self.performSegueWithIdentifier ("toView2", sender: self) then everything is working is. Why is not this working? I think there is something to do with "sender: myself" but I do not know how to solve it. I have not received any error on Xcode, it just loads data from my server and then nothing happens ... In fact, the problem is that you have entered the queue on one side and just to get the main line and putting the Seg in it, it will work very well.

Integrating batch script into Java GUI? -

This question is also asked by me: As I do not have the appropriate answer for my question That is why I decided to ask again in the stack overflow again in another short and sweet manner. Disclaimer: I have edited the question in that site, this is the reason why I could not find the appropriate answer for my question. I have this batch script which should be integrated into Java coding. But this is the first time that I am unifying so I do not know how it should be done. It would be nice if someone could answer my question on that site. But if you are not, then it would be nice to provide an example of integrating multiple selection batch scripts in Java. Email through your original post, I can conclude that your solution will be quite simple: private static string cmdline = ""; personal stabilized Last string scripfile = "MYSCRIPT.sh" public GUI () {setTitle ("family"); setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); setbound (100, 100, 45...

ios - ADMOB Memory Leaking? -

Image
Whenever a new advertisement comes, I am using Swift language for ADMOB, my memory is increasing. I think there is a leaking without any other AdMob everything is fine difference on:. ViewWillAppear Function GADInterstitial Override (Animated: BULL) {difference = GADInterstitial () inter.delegate = self inter.adUnitID = "****" on request: GADRequest = GADRequest () request.testDevices = ["***"] Inter.loadRequest (request)} and I am using UIActionAlert to appear in the self.inter.presentFromRootViewController (manually ) Memory report link: Am I doing something wrong? I am using ARC, can I release interstitials by myself? EDİT : I tried GADBanner as well. I'm just opening the app; I am not doing anything else and the memory is increasing. viewWillAppear function override (animated: boole) {banner = GADBannerView () banner.delegate = self banner.adSize = kGADAdSizeSmartBannerPortrait banner.adUnitID = "****" var Request: ...

.net - Http Web Server - big response packet issue C# -

I'm creating an HTTP web server primarily for an uptime uptime monitor, but wanted to expand it more It has more general use. One problem is that when a customer requests for an image (for example) 1 MB +, then I do not know how to split image data to fit within the MTU size of the pack. Below is the data that I am using to send data. (StreamWriter AutoFlush is enabled) Send Private Zero (Stream Stream, String File Location, bool useGzip, String contentType, String ResponseLine, bool CloseConnection, String Server) {writer.Write (ResponseLine + "/ R / n"); Author. Type ("server:" + server + "/ r / n"); If (CloseConnection == true) the author Write ("connection: keep-alive" + "/ r / n"); // if (useGzip == true) / write ("connection: close" + "/" / r / n "); Writer (Writer: "Content-Type:" + contentType + "/ r / n"); Writer. ("Content-Length:" + Stream + Longer + "/ ...

php - Ubuntu 12.04 Mysqli not working -

I am trying to use mysqli at an Ubuntu 14.04 vps and it is not working. Here's my code: & lt; Body & gt; & Lt; P class = "title" & gt; & Lt ;? Php echo $ cppsname? & Gt; & Lt; / P & gt; & Lt; Div id = "container" & gt; & Lt; Form id = "login" ACTION = "& lt ;? Php $ _SERVER ['PHP_SELF']? & Gt;" Method = "post" & gt; & Lt; P & gt; Username: & lt; / P & gt; & Lt; Input type = "text" id = "user" name = "user" & gt; & Lt; Br / & gt; & Lt; P & gt; Password: & lt; / P & gt; Input Incorrect username or password "; }}} Other {resonant "and This code works however on the local host. Anyway, I have searched a lot of forums for this problem, they have edited all the responses by saying mysql (which I have done) or edit php.ini to cancel a line. And I did. Here I have performed in my ...

Triangular number sequence using Scala's Fibionacci -

उद्देश्य एक त्रिकोणीय संख्या अनुक्रम (1, 3, 6, 10, 15) बनाना है , 21) स्काला की फाइबोनैचि और छठे अंक का उपयोग करके लौट जाना है। टेस्ट परीक्षण ("त्रिकोणीय") {जोर (गणना त्रिकोणीय (1, 3) === 21)} मुख्य डीआरएफ त्रिकोणीय (ए: इंट, बी : Int): इंट = {आलसी वाल एस: स्ट्रीम [इंट] = एक # :: एस। स्कैन लेफ्ट (बी) (_ + _) एस (5)} परिणाम [info] - त्रिकोणीय *** असफल *** [जानकारी] 18 बराबर नहीं था 21 (CalculationTest.scala: 37) [त्रुटि] विफल: कुल 9, विफल 1, त्रुटि 0, उत्तीर्ण 8 [त्रुटि] असफल परीक्षण: [त्रुटि] testingscala.CalculationTest [त्रुटि] (परीक्षण: परीक्षा) sbt.TestsFailedException: परीक्षण असफल [त्रुटि] कुल समय: 5 एस, पूरा 27 जुलाई 2014 7: 55:16 अपराह्न स्कैन लेफ्ट एक फ़िबोनैकी अनुक्रम बनाने के लिए काम करेगा, लेकिन त्रिकोणीय बनाने के लिए नहीं। 2, 3, 4, 5 और बाद में 6 को अंतिम अंक में जोड़ने के लिए कौन सा विकल्प इस्तेमाल किया जाना चाहिए, जिसके परिणामस्वरूप 1, 3, 6, 10, 15, 21 कैसे कुछ के बारे में val त्रिकोणीय: स्ट्रीम [इंट] = स्ट्रीम.फ्रेम...

matlab - Power spectral density of FFT -

I have a piece of code that gets FFT of a part of the signal and I try to get the PSD now I am here. , FS = 44100; Cj = sqrt (-1); % T = .6; DT = 1 / FS; Left = test (:, 1); Correct = test (:, 2); Time = 45; Interval = .636; W_range = Time * FS: (Time + Interval) * FS-1; I = left (w_range); Q = right (w_range); N = interval * fs; F = -Fs / 2: FS / N: FS / 2-FS / N; S = I + cj. * Q; % Signal ss = greasy (s, 201); Sf = (fftshift (fft (ss (1: n)))); % FFT (1) plot of signal data (f, (* 20 * log10 ((SBF)) / max (abs (sf))))) To get the PSD, I need to increase the sf in just 2 power, or do I need to do something? 20 * log10 (abs (sf)) or 10 * log10 (abs ( Sf) ^ 2) . However, this generally means that the calculation of PSD estimates made in this way is a huge deviation. There are several numbers in it which can be used to improve the guesswork. Applying sections of data in a simple one, executing FFT, resulting in PSDs being average (i.e., average of square-magnitudes). ...

ios - Solution For Monitoring and Maintaining App's Size on Disc -

I am creating an app that uses extensive CoreData and many of my models have UIImage and NSData properties ( For images) and videos). Since this is not a good idea to store the data directly into the coredata, I have created a file manager class that writes files in different buckets of documents, depending on context and the type of media type. My question is now how do I manage the document directory? Is there any way to find out how much space the app has used from its total allocated space? In addition, what is the best way to go about cleaning those directories; Whether files are written every time or only on app launches, check them on the Act. Find out how much space the app has used from its total allocated space What is a method? The application does not have the total assigned space limit, they are limited to the amount of space on the device. To scan the directory, you can find out how much space you are using for these files by using NSFileManager . There ar...

iOS:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (_NSInlineData)' -

एनएसडीटा * imgData; यदि (! _groupImageView.image) {imgData = [एनएसडीटा डेटाविड्थडेटा: UIImagePNGRepresentation ([UIImage imageNamed: @ "Replay.png"]]];; } अन्य {imgData = [एनएसडीटा डेटाविड्टाडेटा: UIImagePNGRepresentation (_groupImageView.image)]; } NSError * त्रुटि; NSURLSessionConfiguration * कॉन्फ़िगरेशन = [NSURLSessionConfiguration defaultSessionConfiguration]; NSURL सत्र * सत्र = [NSURL सत्र के साथ सत्रसंपादित करें: कॉन्फ़िगरेशन प्रतिनिधि: स्वयं प्रतिनिधि क्यूउ: शून्य]; NSURL * url = [NSURL URLWithString: [NSString stringWithFormat: @ "% @ समूहों / बनाएं", [sharedObj getSiteUrl]]]; NSMutableURLRequest * अनुरोध = [NSMutableURL अनुरोध अनुरोध विथURL: url कैश पॉलिसी: NSURLRequestUseProtocolCachePolicy timeoutInterval: 60.0]; [अनुरोध जोड़ें वैल्यू: @ "एप्लिकेशन / जेसन" एचटीटीपी हैडरफिल्ड: @ "कंटेंट-टाइप"]; [अनुरोध जोड़ें वैल्यू: @ "एप्लिकेशन / जेएसन" एचटीटीपी हैडरफिल्ड: @ "स्वीकार"]; [सेट करेंएचटीटीपीप्रणाली: @ "पोस्...

javascript - My ng-change is not firing on my Angular/Rails app -

I am creating a notecard application and for some reason my ng-change is not firing at all. I do not know what the problem is, I tried a breakpoint in JS, to verify that it is not actually firing. I think I'm missing something, it's positive. I just need the eyes of the other eyes. Here js var app = angular.module ('catalyst', ['fay']); App.factory ('faye', ['$ fay', function ($ faye) {return $ fa ("http: // localhost: 9292 / faye");}]); App.directive ('stickyNote', function (feather) {var linker = function (area, element, ethers) {element.draggable ({stop: function (event, ui) {Faye.publish ('/ UI / board', {Id: scope.note.id, x: ui.position.left, y: ui.position.top});}}); Fei subscribe ('/ ui / board', function (data) {// if update If the same note (data. Id == scope.note.id) {element.animate ({left: data.x, top: data.y});}}); // To create it, some DOM start Element Element.css ('top', '5...

statistics - Partially nested/blocked experimental design in R -

There are 10 participants in the design of the experiment to get them all to go through A, B, C, D for treatment. However, going through 1-5 conditions for participants, E, F and participants, through 6-10 conditions, H I am using the NLM package to deal with longer data I stop the list-wise extinction of participants. Measured variable = dv, fixed effect = position, random effect = participant). When everything is just crossed, then I have it: lme (DV ~ cond, random = ~ 1 | ppt, data = outputdata, method = "ml", na.action = What are the prescribed figures for the first part (conditions A, B, C, D), while the second part E, F and G, H are nested ... Any help or guidance will be appreciated! Thanks. /p> I think your design can be considered as a planned "missing" design, where a part of the subjectThey are not in contact with some conditions in the planned manner (see Enders, 2010). If these values ​​are "completely lost completely" then you...

php - How to link database information into a bootstrap table using XAMPP? -

I think something in my table is going wrong, as I get the error: WARNING: mysql_connect (): A connection attempt was unsuccessful because the connected party did not respond properly after a while or the established connection was unsuccessful because responding to the host failed failed to answer. In C: \ xampp \ htdocs \ bootstrap-3.2.0 \ docs \ list.php on line 44 A connection attempt was unsuccessful because the connected party did not respond properly after a period of time Or the established connection failed because the associated host failed to respond. PHP is quite basic when I try to load my page: mysql_connect ("localhost", "root", "") or Die (mysql_error ()); Mysql_select_db ("drinkdealz") or die (mysql_error ()); $ Result = mysql_query ("select from friday") or die (mysql_error ()); While ($ row = mysql_fetch_array ($ result)) {// print the contents of the entry 'echo' & lt; Tr & gt; '; E...

php - Parsing a Markdown style link safely -

I wrote a few code to match and parse the link of this style: I have this code which is to remove the link text, Then the URL itself, then stick them in a HERF link. I am worried that maybe I am reminding someone in a way to inject the XSS, because I am going to a decent amount of characters. is it safe? $ pattern_square = '\ [(* *?) \]'; $ Pattern_round = "\ ((*. *?) \)"; $ Pattern = "/".$pattern_square.$pattern_round."/"; Preg_match ($ patterns, $ input, $ matches); $ Word = $ match [1]; $ Url = $ match [2]; $ Word = ereg_replace ("[^ -_ @ 0- 9a-ja-z.]", "", $ word); $ Url = ereg_replace ("[^ - A-Za-z0-9 + & amp; # /% | = ~ _ | |:]", "", $ Url); $ End = "& lt; a href = '$ url' & gt; $ word & lt; / a & gt;"; It seems that the work is fine, and it does exclude some stupid URLs, including semicolon and backlass, but I care about those URLs is not. If ...

Get value from Javascript JSON object by referencing specific property name -

I am using Google Apps Script (JavaScript) so that I can retrieve a user's details. The code to get the user is: var url = 'https://www.googleapis.com/admin/directory/v1/users/'email+++++++++++++++++ + PublicApiAccessKey 'key =?'; Var scope = "https://www.googleapis.com/auth/admin.directory.user.readonly"; Var fetchArgs = googleOAuth _ ("user", field); FetchArgs.method = "GET"; FetchArgs.muteHttpExceptions = true var userObject = UrlFetchApp.fetch (url, fetchArgs); The response is as follows: {"kind": "admin # directory # user", "id": string, "tag": etag , "Name": {"givenName": string, "freeman": string, "full name": string}, "asen": boolean, "delimited admin": boolean, "last lagoon time How do I get value of fullName Logger.log (Object.prototype.toString.call (userObject)) // Return [Object Going Object] Logger.log ...

ios - NSUserDefaults not cleared after app uninstall on simulator -

This could be the real NOOB sound! I want to know that the user is entering my application for the second time, so I am using the NSUserDefaults to keep the number of runs. I have implemented the following code in my rootViewController method in the viewDidLoad method: NSUserDefaults * userDefaults = [NSUserDefaults StandardUserDefaults]; NSLog (@ "hello% ld", (long) [userDefaults fullcolor: @ "runcount"]); If ([userDefaults integerForKey: @ "runCount"]! = 1) {// 2nd run [userDefaults setInteger: 1 forKey: @ "runCount"]; NSLog (@ "not 2 runs"); } Other {// seconds run or more NSLog (@ "2 runs"); } [Synchronize UserDefaults]; Everything works fine, but the problem is that when I uninstall (delete and re-install) the application and data should be cleaned, but it will Not after the installation is the last data of the app still showing I'm running my app using the encoded 6-beta on the iOS simulator and I...

javascript - Excluding Layouts in express but keeping CSS -

I'm unable to find a way to exclude my layout in Express. I tried to do the response .Redder ("index", {layout: wrong}}; But for that page CSS What is the best way to disable the layout but to keep the CSS? In addition to this, I use the app. Static ("public"); and my CSS is in the public folder. This is happening because your layout is CSS. Try to create a layout with code to include your CSS and anything like: / * For this example use handler templates / / lt; link rel = "stylesheet" type = "text / css" href = "styles.css" /> {{{body}}} This will include only CSS and then display your content. Yours The code containing the CSS is {{body}}} is the code to insert your content. It is not possible to include CSS without layout, as long as your content is not in it. If you want to use the {layout: false} then the code contained in the CSS ( & lt; link rel = "stylesheet" ty...

How to compare colors in iOS -

I need to compare one color to another with an array of colors and determine which other colors Is most seeming. I do not know a lot about color theory, I think L * A * B * is a colorpace that is most used to compare the colors, perhaps using the delta metric , But I also believe that this color space is not supported in iOS. I know to get color in HSV or RGB, but I do not know that they can be transformed into L * A * B * colorspace program or if a method of cruel power is to be used in other colors One of the colors is compared which is supported by iOS Any help will really be appreciated.