Posts

Showing posts from September, 2015

javascript - Module pattern callback implementation -

I am re-writing a simple app using HTML / CSS / JavaScript which can be used for images using intervals Creates animations with, and there is a bunch of buttons that control these animations. It is scaling and really messing up, with a logic mixed with DOM manipulations via javascript via javascript script file. So I design module patterns Based on your app's description, is there a problem with this callback implementation for the module? Or with module implementation? In this example, what is the best way to declare private variables and access them through public APIs? Gates and Setters? Are they really necessary? I want to write a readable code but I do not want to do super-architect things. (function ($) {$ .module = function (options) {var module = {options: $. (): (Callback: {start: false}}, options), start : Function (callback) {//console.log ('personal start method'); if (callback === "type of function") {callback ();}}} // public API ret...

c# - What triggers change notification in DependencyProperties? -

I am looking for a database in C # and want to understand what types of changes in a property (supported by dependence assets) actually trigger the update notification to trigger targets. I use simple setup of classes where I can test change in nested properties (sub-properties): // person name With a public class person {public string name {get; Set; }} // Class is giving dependency property as a public class to the best friend Friends: dependencyobject {public stable dependencyprofitprofitproperty = dependencyability Registration ("BestFreend", Typef (Person), Typef (Friend)); Get Public Insurance BestFriend {Return (Person). Gate value (bestfried property); } Set {this.SetValue (BestFriendProperty, value); }}} Now I attach the property of any other class to BestFriendProperty (as a source). I expected that the update notifications only work through this binding if I use the set of bestfriends: myBoundFriends.BestFriend = new person (); // myBoundFriends is a kin...

javascript - Using twitter bootstrap modal to create a gallery with images/content -

This is what I am trying to do, but I do not know how I have seen the gallery plugins and the module Has merged with the carousel, but no one can do what I want to do. I have a grid of thumbnails on my site which, at the click, I want to open a standard bootstrap model. Once the modal is open, I want the ability to link to the content from the next item, so that you can round through the items in the gallery / grid by clicking Next / previous to close / reopen the modes without re-opening. I do not have the code to show you at this point but this plugin is close to what I want to do: Except I do not want it to open the full browser width / height , And it will behave more like standard bootstrap modal. Also, the bootstrap model separates me all and instead of keeping the image in the form of content, gives a little more control over the content of the model. Any thoughts? HELP appreciated. You can: Thumbnail: & lt; Div id = "thumbHolder" & gt; ...

ios - Logical AND with Swift Optional in IF statement -

I have two properties, one of them is optional, these are defined below: Var advertiseCompleteBlock: (() - & gt; ())! Var is Advertiser: Boole = Wrong; Now, if I try to use it in my code like this below, the compiler throws an error when the error code 254 is created and failed. (self advertiser and self replaceable comp block) {self.advertiseCompleteBlock (); } But if I change it like this then it works fine: if (self.isAdvertiser & self.advertiseCompleteBlock) {If (Self.advertiseCompleteBlock) {self.advertiseCompleteBlock (); }} Can someone explain how these two blocks of code are different and what is wrong here? If advertise is really optional, then maybe it should be declared with someone? Instead ! Who says that it will always come into being. I put my original code in a test file as a simple function and removed the references of my own and compiled it properly. I do not know what will be the 254 error. What exactly do you want this code? ...

Add a second Wordpress Loop that displays latest posts in single.php -

I am creating my own theme, but only basic knowledge of PHP is searching for a way to do it online Yes, but it can not seem to be across. This is my development server's URL: I have a secondary loop in each page on the sidebar, which displays all the late posts. This is straightforward on the main index.php file. I'm not sure where it starts working on the Single.php file. I understand that he understands the concept of wordpress loop, and why it will not work within the category of post page, but there is no way around it? Thanks Add it to your sidebar: $ today = getdate (); $ Sidebarquery = New WP_Query ('year ='. $ Today ["year"]. Amp; monthnum = '. $ Today ["Som"].' & Amp; day = '. $ Today ["mday"]) ; While ($ sidebarquery- & gt; is_pos ()) {$ sidebarquery- & gt; The_post (); Echo & lt; Li & gt; '. The_permalink (); . '& Lt; / Li & gt; '; }

android swipe to dismiss listview won't remove item -

Text after " . I am using an ArrayAdapter and use this code to create a swipe to dismiss the listener to dismiss the feature. SwipeSystemSystem LIST We Touch Listener Touch Listener = New SwipDescription ListWeight Touch Listener (See list, new swipiodisme list live touch listener. Desississ callback () {@ Override public boolean candis (status of int) {delete} N true;} @ Override public Whoid OnDismiss (ListView ListView Int [] reverseSortedPositions) {(int position: reverseSortedPositions) of {mAdapter.remove (mAdapter.getItem (status));} mAdapter.notifyDataSetChanged (for);}}); ListView.setOnTouchListener (touchListener); // Setting this scroll listener is essential to ensure that during the catalog view scrolling, // we do not search for swipe. ListView.setOnScrollListener (touchListener.makeScrollListener ()); But to swipe every time it looks like it did the work but trying to get the item back. The log cat does not have any exceptions to me. Did anyone have thi...

gradle - Solved: AppCompat / Chromecast in Android-L Preview -

status: I'm currently building my new version I am also in the process of app and chromecast integration for Android L The app works fine, as long as I enhance the theme. Content with my custom style, but does not show the cast button. Problem: As soon as I change to theme. AppCompat, it gives me an error: Error: Error retrieving parent for item: No resource found which gave the name '@android: style / Theme.AppCompat.Light DarkActionBar 'matches. And this also goes for the Holo theme too. This is my build.gradle (the Libs folder is empty btw): The applicable plugin: 'com.android.application' android { CompileSdkVersion 'android-L' buildToolsVersion "20.0.0" defaultConfig {applicationId "com.myapp.myapp" minSdkVersion 'android-L' targetSdkVersion 'android-L'versionCode 1 versionName "1.0"} {buildTypes release {runProguard false proguardFiles getDefaultProguardFile ( 'ProGuard-androi...

objective c - Unable to Press Buttons in a subView -

I have a subview of the rootViewController and when the call is done, the button can be pressed without error: Thread 1: EXC_BAD_ACCESS This is important code: AppDelegate: Main View Controller * MainVC = [[Main View Controller alloc] init]; Self.window.rootViewController = mainVC; and in the MainViewController class: Other ViewController * SomeView = [[OtherViewController alloc] init]; [Self.view addSubview: SomeView.view]; Loads OtherViewController xib as it executes the viewDidLoad stuff. However, when I try to push one of the buttons on the simulator (on OtherViewController ), I get the error above. More button code: IBOutlet UIImageView * image; // Other ViewController.m in other ViewController.h: (IBAction) button: (ID) Sender {Image.center = CGPointMake (Image.center.x + 1, Image.center.y); } There are breakpoints in Other ViewController.h and .m (everywhere with the button). No introduction has occurred in the program Adeliget: error UIAppli...

How to import local Python package in Amazon Elastic MapReduce (EMR)? -

I have two Python scripts that are targeted to run on the Amazon Lösich Map - as a Mapper and one of the reducers in the form of. I have recently expanded the mapper script, which requires some more local models which I have created so that they both live in a package called SentimentAnalysis. What is the correct way to import a Python script from the local Python package on S3? I tried to create the S3 keys that try to copy my file system, hoping that the relative path will work, but do not regret. What I am looking for in the log files after step 1: traceback (most recent call final): file "/ mnt / var / lib / hasoop / mapred / tasktracker / hadoop / Job Cache / Job_01407250000_0001 / try_201407250000_0001_m_000000_0 / work /./ sa_mapper.py ", in line 15, & lt; Module & gt; SentimentAnalysis Import NB, Error From LR Import: No SentimentAnalysis Name Module The related file structure is like this: sa_mapper.py sa_reducer.py SentimentAnalysis / NB Sentime...

java - Not printing out all of the statements written -

नमूना चलाने: लाइसेंस मान्यकर्ता एक अंतिम नाम दर्ज करें: ab bA एक अंतिम नाम दर्ज करें : एबीए बीए दर्ज करें जन्म के वर्ष: ए 12 वी दर्ज करें जन्म के वर्ष: 1 9 7 ड्रायवर का लाइसेंस संख्या दर्ज करें: ए 123-4567-9801-23 निरंतर मेरा कोड है: import java.util.Scanner; सार्वजनिक वर्ग पांच { निजी स्थिर स्ट्रिंग मिलनाललाइट (स्कैनर स्क) {System.out.println ("लाइसेंस सत्यापनकर्ता"); System.out.print ("अंतिम नाम दर्ज करें: अब बीए"); स्ट्रिंग लास्टनाम = स्क। एनएक्सटाइन ()। ट्रिम (); अगर (lastname.length () == 0) lastname = getLastName (sc); Int numspaces = 0; के लिए (int i = 0; i & lt; lastname.length (); i ++) {if (Character.isSpace (lastname.charAt (i))) {numspaces ++; } और अगर (! वर्ण। लिटटर (lastname.charAt (i))) {lastname = getLastName (sc); } यदि (numspaces & gt; 2) {lastname = getLastName (sc); }} वापस अंतिम नाम; } प्राइवेट स्टैटिक बूलियन कैरेक्टर (चार चारएट) {वापसी झूठी; } सार्वजनिक स्थैतिक स्ट्रिंग लेयर आइफबर्थ (स्कैनर स्क) {System.out.print ("जन्...

microdata - Local Business Locality and Region in rich snippet -

I am trying to markup my site with local business microdata. But the problem is that I am in Vietnam and what is the standard area and area in Vietnam do not know. Can anyone give me some guidance? thank you in advanced! and there are optional fields inside it. area refers to city, city, village etc. The area refers to those areas which are divided into a country which is probably either for Vietnam or it is a complete one.

apache - Static text on rewriterule -

I am trying different ways to create URLs like this: I have tried: RewriteRule ^ Postal-zip / ([0-9] +) $ code.php? Thecode = $ 1 [L] and RewriteRule ^ Postal-zip / ([0-9] +) $ post-zip / code. Php? Thecode = $ 1 [L] There are some more things but I have not got the result, do anyone have any ideas about this? Your rules look good. It looks like mod-rewrite is not turned on. First, before your rules, make sure that you have: option + follow link - to work for it, , set both to and If you are not sure if the mod_rewrite is also installed, phpinfo (); if you are unsure of .htaccess files; Look at the list of modules installed in the output of , by default, mod_rewrite is not enabled for .htaccess files If you are managing your own server, then Open httpd.conf and make sure that there is one of these lines in the WebRot directory block: Allow Override File InfoSo or Allow All Code>

What's the difference between rand() and mt_rand(), as of PHP 5.4? -

आधिकारिक दस्तावेज के अनुसार, mt_rand () रैंड () से चार गुना तेज होनी चाहिए। लेकिन मैंने जो दावों को पढ़ा है, उसके बाद दो के बीच कोई अंतर नहीं है, मैं (जो PHP 5.4 है)। परिणाम लगभग समान है। तो, PHP 5.4 और उसके बाद के लिए रैंड () और mt_rand () के बीच अंतर क्या है? मैं किसको उपयोग करने के लिए निर्धारित करता हूं? एक झपकी से चार गुना तेज अभी भी एक झपकी है विशेष रूप से इसे एक अंतर्निहित समारोह में एक व्याख्याकृत भाषा में माना जाता है, प्रदर्शन को यह सबसे विशिष्ट विशेषता नहीं होना चाहिए। के अनुसार: डिफ़ॉल्ट रूप से, PHP रैंड () फ़ंक्शन के साथ libc यादृच्छिक संख्या जनरेटर का उपयोग करता है। Mt_rand () फ़ंक्शन इस के लिए एक ड्रॉप-इन प्रतिस्थापन है। इसका इस्तेमाल करते हुए ज्ञात विशेषताओं के साथ एक यादृच्छिक संख्या जनरेटर का उपयोग करता है, जो कि औसत लिबसी रेंड () प्रदान करता है, की तुलना में चार गुणा तेजी से यादृच्छिक संख्या का उत्पादन करेगा।

php - Force login after ajax request -

KP php 2.4 via IP. My problem sometimes after the session is inactive or logout in another tab The request does not work because the user has already been logged out. My question is how can I verify the user to redirect to the login page. My function, which is used to filter my requests, is used on my user control class // class UsersController public function beforefilter () {parent: beforeFilter (); // Allow user to log out $ this- & gt; Auth-> Allow ('logout'); } thanks if (! $ - & gt; Session-> Read ('Auth.User')) {// Redirect Here}

c# - jquery Ajax responsetext "There was an error processing the request" -

I am getting this error "There was an error processing the request" In my local environment, the code starts working properly This line Utility. WrightLogEvent ("TestService", strmessage); Anyway, if this line has failed or not, I should still be able to receive messages coming from the server because it is handled properly. But since I did not get any feedback from the server, it means that my webmath is not accessible. Given that the code below works, do I need to set something in the Web to do such a thing? Config? Or can I start inspecting the IIS, which can give me some clues? Thank you. $ ('# lnkTest'). Click (function ('click event firing!'); $ .ajax ({type: "post", url: "/_layouts/ServiceForm.aspx/TestService", data: "{}", Datatype: "Jason", Content Type: "Application / Jason; Charset = UTF-8", Success: Work (Response) {If (reaction D & amp; Response D. Lang and gt; 0)...

ios - if delete first section - app crash -

If I delete the last cell in my sections, then I have to delete the section to start - This work is right, but if I delete my first section - app crash and delete my last sections - Add button What happens? My code - (minus) deleteExerciseFromCustomTable: (NSIndexPath *) indexPath {[[_exercises objectAtIndex: indexPath.section] removeObjectAtIndex: indexPath .row]; [_previewTable start update]; [_Remove Removal Delete RAATI and XEpath: @ [IndexPath] with RA-Animation: UITTViewerAnonymous Right]; [_previewTable End and Update]; If ([[object Otandaksaksaksaks: Indekspethksekshn] count] == ​​0) {[_group removeObjectAtIndex: indexPath.section]; [_previewTable start update]; [_praviawtable Deletesekshns [Nsindeksset Indekssetvithindeks: Indekspatksekshn] Vithrovnimsn: Uitblaviawrovnimsnrigt]; [_previewTable End and Update]; }} - (NSInteger) tableView: (UITableView *) tableView numberOfRowsInSection: (NSInteger) section {if (section == [separate group count]) {return 1; } An...

python - Index syntax in Java equivalent to [1:] -

In a dragon, you can do arr [1:] , which means the index ends with 1 has gone. Is there an equivalent in java? The closest I can think for (int i: arr.length) {...} Post text "itemprop =" text "> Assume that arr [1 :] returns a copy of the array arr where you get all the elements from index 1 end, use Arrays.copyOfRange (arr, 1 , Arr.length);

go - Whats the correct golang way to do this: -

It seems a bit stupid, definitely a better way? err = SendMessageAndWait DB, "This is an exam") If mistake! = Zero {fmt.Println ("Error sending message", mistake) returns} err = DoSomething (DB, "this is an exam") If mistake! = Zero {FMT. Error = SendMessageAndWait (db), "This is a third test") If mistake! = Errl = (any exam is "), if mistake! = Zero {fmt.Println (" error in sending message ", err) Zero {fmt.Println ("Error sending message", error) Returns} ... x10 ... Sadly, this is in go, but in a way you can make it cleaner: func isError (mistake error, pre string) error {if Mistake! = Zero} log. Printers ("% v:% v", formerly, fault)} returned Error} func check some () error (error), error (pre-string) {B Errul} {Err! = Nil {log.Printf ("% v:% v", prior, err) b = true} {Return noil} func main (if error: = is error (check some (), "some fail"); Err! = Nil {return / * err * /...

android - Get Data to Static From NonStatic Java -

सार्वजनिक वर्ग पुनःप्राप्त गतिविधि गतिविधि को बढ़ाता है {स्थिर स्ट्रिंग dateData; स्थिर इंट पसंद; @ ओवरराइड संरक्षित शून्य को क्रिएट (बंडल सहेजा गया इन्स्टैंसस्टेट) {सुपर.नक्रेट (सहेजे गए इन्स्टेंसस्टेट); setContentView (R.layout.activity_retrieve); } सार्वजनिक शून्य शो डेटपेकरडायलोगफॉम (देखें वी) {पसंद = 1; DialogFragment newFragment = नया DatePickerFragment (); NewFragment.show (getFragmentManager (), "डेट पिक्चर"); } सार्वजनिक शून्य शो डेट पिक्चर डाइलागटो (देखें वी) {पसंद = 2; स्ट्रिंग दिनांक चयनित; DialogFragment newFragment = नया DatePickerFragment (); NewFragment.show (getFragmentManager (), "डेट पिक्चर"); } सार्वजनिक स्थैतिक शून्य पॉप्युलेटसैटडेट (इंट साल, इंट महीने, इंट डे) {dateData = "+ + + +" / "+ महीने +" / "+ वर्ष; यदि (पसंद == 1) {संपादन टेक्स्ट की तारीख से = (संपादन टेक्स्ट) खोजव्यूबीआईआईडी (आर.आईड.डेटटेटो); & Lt; ------ त्रुटि स्थिर स्थिर सामग्री पर यहां पर है dateFrom.setText (dateData); } अन्य {संपादन टेस्ट तिथि} =...

onmouseover,onmouseout javascript not working in google chrome -

onmouseover, onmouseout Javascript is not working in google chrome. The project is working in Mozilla. & lt; Script type = "text / javascript" & gt; Function toolmaid (id) {var image = document.getElementById (ID); If (id.style.display == "block") {id.style.display = "none"; } Else {id.style.display = "block"; }} & Lt; / Script & gt; & Lt; Div onmouseover = "Toggle Me ( Two problems in the call on your function, unquoted strings Fix this way ... & lt; Div onmouseover = "toggleMe ('I & lt;? = $ Id? & Gt;')" ... & lt ;! - Note the quotation ^ ^ - & gt; Second, you are using the wrong reference in your function to access the property style it should be the image i.e. if (image.style.display == "block") {image.style.display = "none"; } And {image.style.display = "block"; } All being said, I use data attributes instead of wire inj...

heroku - rake asset:precompile for rails 2.3.18 -

मैंने हैलोकी रूबी संस्करण 1.9.3-पी 547 रेल संस्करण 2.3.18 पर एक रेल अनुप्रयोग तैनात किया है जब मैं व्हाइब्रिक सर्वर का उपयोग ठीक से काम कर रहा हूं, लेकिन यूनिकॉर्न सर्वर का उपयोग नहीं कर रहा है, इसका अर्थ है कि यह जावास्क्रिप्ट, सीएसएस और सभी का समर्थन नहीं करता है, यह इस तरह की त्रुटि दिखाता है ActionController :: RoutingError (नहीं मार्ग मैचों "/images/search.jpg" {: method = & gt;: get}): इसलिए मैंने इस आदेश $ बंडल एप रेक संपत्ति की कोशिश की है: precompile RAILS_ENV = उत्पादन RAILS_GROUPS = संपत्ति लेकिन यह इस तरह की त्रुटि दिखाता है रैक निरस्त! पता नहीं कैसे काम की संपत्ति बनाना: प्रीकंपाइल ' रेल 2.3.18 में भी संपत्ति नहीं है। कृपया मुझे इसका समाधान करने में मदद करें। धन्यवाद अग्रिम में रेल 2.3 में कोई संपत्ति पाइपलाइन नहीं है आपको /images/search.jpg के माध्यम से इसे एक्सेस करने के लिए search.jpg में सार्वजनिक / चित्र / डाल कर रखना होगा। जावास्क्रिप्ट और स्टाइलशीट के लिए वे समान हैं आपको बस एक फ़ोल्डर सार्वजनिक / जावास्क्रिप्ट और सा...

node.js - Azure mobile service javascript back end how to set and read cookies? -

So I have this blue mobile service with a look back end but I am called a specific API when a cookie Will need to be stored. My login API is set up and working correctly and I want to set up a cookie, but I am unable to get anything from blue documents about cookies. So basically how can I store a cookie from the end of jazz javascript backs and how can I get it later from the table operations script to check its validity? Edit: I refer to the query of the Express API, which says blue that its request and response are from objects but whenever response.cookie ('token' , 'Value', {maxAge: 3600000}) I still can not access it from the requested object on other APIs. You currently do not have access to HTTP request headers (including cookies) from within table scripts Should access them in a custom API) If you think this is an important feature, please add a new feature request.

Javascript: Insert new rows into table by checking row top position -

Image
I want to insert two new lines when the top position of a line is greater than one limit in pixels. Have tried, but it is not working properly. I am adding these two rows to the page break and repeating the table headers purpose. Print Preview of this code is running: The header should only be repeated on the next page. var x = document.getElementsByTagName ('tr'); Var roto paul = 0; Var tIndex = 0; Var deductVal = 0; Var TablesID = document.getElementById ("testID"); {RowTopVal = x [i] .position () for (Var i = 0; i & lt; x.length; i ++). Top; RowTopVal = WrightTwelve - deductVal; If (1200 & lt; rowTopVal) {tIndex = i; Var line = tableId.insertRow (tIndex); Var cell1 = row.insertCell (0); Var cell 2 = Row.Intel (1); Var cell3 = row.insertCell (2); Var cell4 = row.insertCell (3); Var cell 5 = Row.Intel (4); Cell1.innerHTML = "x"; Cell2.innerHTML = "Y"; Cell3.innerHTML = "z"; Cell4.innerHTML = "P"; Cell5.inne...

java - How to compile multiple proto files in single command? -

I have a protocol file which is in the directory alone and I am looking for a way to create classes in single command of those files I am Protobuf documentation says that we need to use the - proto_path argument for this. C: \ Shekhar \ proto_trial> Drive C is the directory of dir volume c: \ shaker \ prototo_trial 07/25/2014 12:16 pm & lt; DIR & gt; . 07/25/2014 12:16 pm & lt; DIR & gt; .. 07/25/2014 12:16 pm & lt; DIR & gt; Java_op 07/25/2014 12:16 230 map.proto 07/23/2014 04:24 PM 161 message.proto 07/25/2014 12:17 PM 1,228 responses. Proto 3 files 1,619 bytes 3dir (s) 50,259,398,656 bytes free I have used the - proto_path argument below C: \ Shekhar \ proto_troll> Protocol --proto_path = C: \ Shekhar \ proto_trial - java_out = c: \ shekhar \ proto_trial \ java_op * .proto but I am getting the following error message.proto: The file is not within any path specified using --proto_path (or -i). You must specify a --proto_path that c...

javascript - jquery ajax json parseerror valid json data -

हाय im parseerror ajax call jquery - servlet का उपयोग कर। खो जाने पर आईएम ओह, कृपया क्या करें और "सबटाइल" से डेटा मान्य json {"सफलता" है: सच है, "चयन करें": {"partidAll": "DA04321;"}} अगर मैं डेटा प्रकार: 'जेसन', यह काम ठीक है। लेकिन फिर मैं इस कोड का उपयोग नहीं कर सकता अगर (data.success) {चेतावनी ("सफलता !!"); // चेतावनी ("सफलता" + डेटा। चयनपर्टीड.partidAll); } तो, अजाक्स, कृपया $ ("# select1") को सलाह दें। परिवर्तन (फ़ंक्शन () {dataString = "Optionselected =" + $ ("# Select1 विकल्प: चयनित")। पाठ (); चेतावनी ("डेटास्ट्रिंग:" + डेटास्ट्रिंग); $ .एजेंड ({प्रकार: 'पोस्ट', यूआरएल: 'चयन करेंएजेक्स', डेटा: डेटास्ट्रिंग, डेटाटाइप: 'जेसन ', सामग्री प्रकार: "आवेदन / जेसन; वर्णसेट = यूटीएफ -8", संदर्भ: यह, सफलता: फ़ंक्शन (डेटा, टेक्स्टस्टैटस, जेकएक्सएचआर) {अगर (डेटा.success) {चेतावनी ("सफलता !!"); // अलर्ट ("सफल...

c# - How to get Datetimepicker with seconds in asp.net? -

I have a job on which I have to filter the records by date and date. The date from 'MySQL' is like '2014-07-18 20:03:08'. At the front end, I used DatetimePicker in the text box..Detmatomicor format returns '2014/07/09 14:00'. Therefore, it is not possible to compare DB's dateform and datetime format. I want a dead time picker with a second .. help me DateTime Picture stores a datetime in the value property. You can add the necessary seconds for it: DateFrom.Value = DateFrom.Value.AddSeconds (seconds); The Datatimepicker format returns '2014/07/09 14:00'. Use columns in datetime-MySQL instead of using SQL-Parameters and pass directly to DateTime : // If you want to add seconds, but I do not see any reason for this / maybe you want to add to-date, you can add one day - a second date. Value = date Value Adwords (1) .endsconds (-1); (MySqlConnection conn = Using the new MySqlConnection ("connStr")) {try {conn.Ope...

objective c - Remove KVO observer issue -

I have a menu controller that is connected to the visual context with a weak reference. View Controller is in the context of the menu controller. The menu controller views some of the collection views in the view controller when the menu controller is deleted, then I delete [self.viewController.collectionViewAbusverver: for myself: the keypath: keypath]; , but in this place itself ViewController is already zero. In what place do I remove the KVO Supervisor? I believe that you do this in another way you should add the supervisor to the View Controller , Not in the menu controller: [Object addObserver: menuController forKeyPath: @ "openingBalance" ...]; Just pass the menu controller as a logic for the addObserver: method and apply the ValavForKeyPath: method in the menu controller . You can remove the supervisor when you need it (I believe you want to do it in the delok method), still in view controller, in that scenario when your view controller If it...

vb.net - Corrupt string when writing to Oracle DB -

I'm serializing some data for XML, then writing output to an Oracle DB. The serial data can be very long and is writing for a long pillar type (it will never reach the maximum value of long, which is something like 32,000 characters) Sometimes when your data is written, it appears to corrupt and just "?" Display and many other control characters, sometimes write works perfectly. The function I always give XML with no problem, the problem occurs when the data is written. This is my serializer function:. Private function in sequence (in the form of myObject object) // a string ... dim x = new System.xml.Serialization.XmlSerializer (to myObject object to object [GetType] ()) String stringWriter = New stringWriter () x.Serialize (stringWriter, myObject) Dim test = stringWriter.ToString () return stringWriter.ToString () stringWriter.Close () termination function Then I am writing the data that I am returning the DHB using the NHBnet, I will not include this ...

php - .htaccess POST data blocked -

I send mail data to my original index by a post which will redirect: & Lt; Form action = "index.fp? Menu = blog and section = admin" method = "post" & gt; But these rows in .htaccess blok POST data: rewrite% {HTTP_HOST} ^ example .com $ RewriteRule ^ (. *) Http: //www.example.com/$1 [QSA, L] I'v tried some other people but the same problem: #RewriteRule ^ (. *) Http://www.example.com/$1 [QSA, L, R = 301] #RaverRail (. *) Http://www.example.com/$1 [QSA, L, R = 301] #RewriteRule ^ (. *) Www.example.com/$1 [QSA, L, R = 301] # Rev. Rule ^ (. *) Http://www.example.com/$1 [QSA, NC , P] #Doesn There are some other posts with this kind of problem but I did not find my solution I How can I send a postage? Php? Menu = blog & amp; Section = admin Thank you! Try these rules Rewriting product.php? Product-12.html from Id = 12 RewriteRule ^ Recycling Engine on the Product - ([0- 9] +) \. Html $ Product.php? Id = $ 1 Rewrite p...

ios - UITableView and UITableViewCell from XIB bug? -

After I'am UITableView with UITableViewCell Trying> .xib Programmatically but I do not know what I'm doing wrong I've read some tutorials and it seems that I'm doing everything right, but it does not work. People can help me How I'am Loading UITableView and Cell Import Foundation Import UIKit Class GamesViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {var GameTableView: UITableView? ; Override funk viewDidload () {gameTableView = UITableView (frame: self.view.frame, style: UITableViewStyle.Plain); GameTableView !. Delegate = self; GameTableView! .dataSource = self; GameTableView! Var nib = UINib (nickname: "Taskellview", bundle: zero); GameTableView !. RegiststerNib (nib, forCellReuseIdentifier: "cell"); Self.view.addSubview (gameTableView); Super.viewDidLoad (); } Override funk received Rasiv Memorial Warning () {Super DID Rescue Memory Warning (); } Festival tableView (tableView: UITableView!, DidSe...

android - OkHttp - Enable logs -

I used retofit to paste HTTP requests and Jason, and I found it a great way to turn on debug logs. Logs are allowed to see body requests, url ... which is very useful. As the use of retofit ohity, I am wondering if there is a way of enabling logs for each request in the OHHTP. Interceptors feature is currently in review, but you can create your own version of okHttp with convenience by implementing code changes. You can apply your kind of functionality // Create an interceptor that captures requests and the information you want, log in requester = New request interceptor () {public request execution (request request) {Log.i ("request information", request.toString ()); Return request; // withdrawal request request}}; OKHTP Client Client = New OKHTP Client (); & Lt; RequestInterceptor & gt; RequestInterceptors = client.requestInterceptors (); RequestInterceptros.add (logRequests); The bridge is included in the request if you want to see more. I have to g...

ruby on rails - Many counts into a join? -

मैं यह क्वेरी करना चाहता हूं: SELECT COUNT (DISTINCT a.id) गणना के रूप में, राशि (बी.आईड) के रूप में एक INNER से जुड़ने से बी.आईडी = बी.आईडी WH = B.otherfield = 0; एक पर 1 गिनती के साथ: aclass.joins (: b) .where (bclass: {"otherfield" = 0})। Count ( : Id) और कैसे एक गिनती अलग करना है? गिनती (अलग: आईडी) ? गिनती (: आईडी, विशिष्ट = & gt; सच) ? धन्यवाद! रेल 3 में: aclass.select ( "अलग करें a.id")। जुड़ती है (: बी)। जहां (bclass: {अन्य फ़ील्ड: 0})। पंक्ति रेल 4 में: Aclass.distinct.joins (: b) .where (bclass: {अन्य फ़ील्ड: 0}) .काउंट (: ​​आईडी)

c# - Microsoft.TeamFoundation create project -

Here's some information about tfs sdk for teamfoundation. D Want to create a project within the selected collection in TFS using its own script Unfortunately I'm not getting any decent documentation: / I already I've been able to create a collection from pure script using ITeamProjectCollectionService and method QueueCreateCollection () . I believe that this SDK has an option to create a project somewhere else. Did any of you work with this SDK? I have a powerful script for creating a project standards and this team uses Foundation Server Powertools is. "Microsoft Visual Studio Scrum 2013.2" / source control: new / verbose / noportal tfpt.exe createteamproject / collection: $ collectionURL "/ teamproject: $ teamproject" / procsstemplate: / Pre> Note: Team Explorer must be installed on the same machine; Its version should be equal to or more than the TFS version. Unfortunately, there is no alternative to choosing Git version cont...

visual studio 2013 - VisualStudio SDK LanguageService samples -

I'm looking for examples of language service usage Implementing a language for the "oak" for the latest VSSDK 2013 samples , But for whatever reason it does not use the LanguageService and says what I have to do to implement custom language in VS. I have problems with the custom color of the token, but because the docs are unorganized and there is no available version in it I can not understand it. Itemprop = "text"> I'm going to post it as an answer, but I will not accept it because this is not what I was looking for. Although it is best that I can find:

ios - Multiple Segue from Table View Controller -

I have a table view with different information, which the user can update. One of them is "Pilot Information" when users click on this line then they are taking other view controllers where they fill the information of the pilot. (Name phone number etc.) then they can save or cancel both of them, from which they can be returned to the previous table view controller. What I want to do is that the users will be able to click on the pilot information again, and if they choose, the data that they enter and edit, add a solution to each other and use it using the following code Had to give a unique identifier (The pilot is the name of the unit in my original data model, the name of the updatepilot that I had given the segue.) - (zero) ready FORSegue: (From UIStoryboardSegue *) Sender: (ID) {If ([[segue identifier] isEqualToString: @ "UpdatePilot"]) {NSManagedObject * selectedPilot = [self.pilots objectAtIndex: [[self.tableView indexPathForSelectedRow] line]]; Pilot...

javascript - Nexus 5 site - scroll slider inside device - how to do that? -

I think the Nexus 5 site (like) wants to get the same effect - as it remains in Nexus and It's sparkling screen while I'm scrolling (this is the fourth part). My case is that there is only one section on my site, but with an iPad the content on both the center and the text and I just want to change the picture inside the iPad when I am scrolling. Any thoughts, please? Thanks a lot! Take a look at this: The original Control the slider via 'scroll' event and position - scrollTop () For example: if (/ * some condition $ (document) .scrollTop () * /) {if ($ ('$ img2'). CSS ("margin-top") == "295px") {// If image below is $ ('#img2') . Emamate ({"margin-top": "0 px"}, 300); // Slide the image}} See full code here: Note: In my example, all the content after the slider and .

mysql - Pattern for LIKE in SQL Statement -

I would like to select all the rows that begin with any character. SELECT * FROM as the table WHERE field '[AG]%'; I would like to show the type of rows: ID data 993 DEF055900960 994 DEF055900961 995 DEF05 9 0064 996 DEF056102254 997 DEF056131201 I have tried RLIKE and REGEXP arbitrarily and in addition the upper case AZ OT in the pattern has been added. Why the following is not working? SELECT * from table WHERE field RLIKE '[a-z]'; I went from here to read

java - How to lock if condition until both conditions are true? -

I have a program that parses the data of the last one hour from the log file and places it in another file. I need to keep walking status until the program gets an hourly data. One hour data will be written by the server in the log file. How do I stop the situation until one hour of data is reached? Reversed lines fileRed reverse = new ReversedLinesFileReader (file); Printwriter author = new printritter (f2 + "/" + filename 1); ; String line; While ((line = reverse.readline ()) = faucet {list & lt; String & gt; StringList = Arrays.asList (line); If (line condition (static. SPEEDO)) {timeFromLine = getTimeFromLine (line); TimeFromSystem = getSystemTime (); Timegap = propertyreader.jetproperty value ("timegap"); Format.setTimeZone (TimeZone.getTimeZone ("GMT")); Timeline = format.parse (timeframeline); TimeSystem = format.parse (timeFromSystem); TimeGapDate = format.parse (timeGap); StartTimeLong = timeSystem.getTime (); TimeGapLong = timeGa...

unit testing - Why does MSTest fail to deploy some test input files when there are more than 128 tests? -

We run automated tests on a build server that uses Jenkins to view source code, create and test MSTest runs by running it on. By the time we did not add 129th unit test, everything worked fine. Then some tests fail mysteriously which fails the examinations, all input files that need to be deployed in the TestResults directory. However, when 129th test is added, those input files are not deployed! Note that other tests require input files but they deploy. Whatever we have done: It does not matter which test project is added to the 12 9th Unit Test or what is in the new test (example To assign: Array aqual (1, 1);) Manually run MSTE on the command line (Visual Studio 2010 x86 tools) when building server when logging in as my build server 128 Even more tests occur, this test fails even though There is no likelihood of doing this with S, or the fact that automated tests are being run under different user accounts (systems). Copy the code created from the build server to my lap...

javascript - Redirect the page to back if URL changed -

मेरा होमपेज यूआरएल // localhost: 8090 है, यह index.html के साथ main.js यदि यूआरएल को // localhost: 8090 / icons / sample.png में बदल दिया गया है। मुझे // localhost: 8090 के रूप में उपयोगकर्ता को पिछले पृष्ठ पर रीडायरेक्ट करना होगा। मैंने कोशिश की: main.js यदि (window.location.href.indexOf ("आइकॉन्स") & gt; -1) {window.history.back ()); } यह काम नहीं करता है। पेज केवल छवि प्रदर्शित करता है आधुनिक ब्राउज़रों में (IE8 +, एफएफ 3.6 +, क्रोम), आप बस हैश बदलते सुन सकते हैं विंडो पर ईवेंट। $ (window) .bind ('hashchange', फ़ंक्शन () {window.history.back ()} / * बातें * /}); कुछ पुराने ब्राउज़रों में, आपको एक टाइमर की आवश्यकता होती है जो लगातार location.hash जांचती है। यदि आप jQuery का उपयोग कर रहे हैं, तो ऐसा एक ऐसा प्लगिन है जो वास्तव में करता है। फ़ंक्शन हैशहैंडलर () {this.oldHash = window.location.hash; this.Check; Var = यह; Var पता = समारोह () (यदि (that.oldHash! = Window.location.hash) {window.history.back ()); }}; This.Check ...

java - Spring 3.5 how to add HttpSessionEventPublisher to my boot configuration -

I want to hear events in session life cycle. I & lt; Listener & gt; Have read about linking & lt; Audience category & gt; Org.springframework.security.web.session.HttpSessionEventPublisher & lt; / Audience & gt; & Lt; / Listener & gt; to web.xml but I do not have this. I'm using the SpringBootServletInitializer extension class. How do I add this listener? You can use ServletListenerRegistrationBean > @ Baynes Public Service Listener Registration Bank & lt; HTPASIONAVENT PUBLISHER & gt; HttpSessionEventPublisher () {New Service Listener Resistance Bean & lt; HTPSessionEventsProjector & gt; (New HTTP installation event publisher ()); }

java - How to use Android TextToSpeech in CodenameOne? -

I would like to include text-to-speech functionality in my Codenam One Android app, but I do not think it's working As the codenamed one does not provide this capability in its API, I am trying to create an original interface to handle Google Maps cn1lib as an example. Even I have so far: NativeTTS.java public class Expands NativeTTS NativeInterface {Public Entry Script String (string hello); } NativeTTSImpl.java public class NativeTTSImpl apply OnInitListener, LifecycleListener, IntentResultListener {Private TextToSpeech tts; Public Zero Starter () {AndroidNativeUtil.addLifecycleListener (this); } Public Zero removal () {AndroidNativeUtil.removeLifecycleListener (this); } Public Entry Script String (String Text) {Return TTSAP (Text, TextAutoPitch. UEUUFOOSHH, blank); } Intake on public Zero {if (status == TextToSpeech.SUCCESS} {tts.SsetLanguage (Locale.US); }} Public Boolean supported () {back true; } Public Zero (intit codecode, int resultcode, intent data) on ac...

Inject TableName as Parameter for Update & Insert on GenericEntity in ServiceStack Ormlite -

I have 3 tables of the same structure, so I have created the following unit using the service stack public class generic entities {[alias ("COL_A")] public string column {received; Set; }} To retrieve the results, I use the following code's code. In this I give a table name like "table" / "tablebie" so that I can get the appropriate results. db.Select & lt; GenericEntity & gt; (W = & gt; w.Where Where (Experian). Orders (O = & gt; O. Column A). ("Table A");); I use the following code to delete db.Delete & lt; GenericEntity & gt; (W = & gt; w.Where (q = & gt; q.ColumnA == "A") ("Table A");); With () I can say SELECT & amp; What is the DELETE operation in such a way to insert and update? I am using Snippet code below to update and enter Enter db.Insert (New GenericEntity () {}); update db.Update & lt; Generic Antity & gt; (New GenericEntity {ColumnA...

javascript - "Uncaught TypeError: undefined is not a function" for jQuery droppable -

I want to enable elements to drag and drop them into special elements containers but when I load my website I get it in my console: Uncustom Type error: there is no undefined function ... presentation-categories.Which? Version = 1: 23 . The line is 23, where $ (".panel-body"). Defroppable ({ starts. I have the full $ (".panel-body"). DropperBill (...); and then draggable works, but I need a drop-container. This is the actual presentation-categories. JS : Var left = wrong; $ ("drag-able-presentation"). DrugGable ({adend to: ".", Zandex: 99 99 99 99 9, placeholder: "Sortable - placeholder", back Return: Correct, cursor you: {left: 67, top: 43}, hey On: function () {var presBackground = $ (this) .book ('slide'). Css ('background'); var presentname = $ (This) .find ('strong') .html (); var assistant = $ (' '). Html (presentationName) .css {Background: presBackground}); Return Assistant;}...

python - Elasticsearch unlimited size -

I am listening to a traffic and these traffic statistics are constantly inserted for elasticsearch and I with my dragon script I want to find these data. Here is a small part of my Pyro code, test = es.search (index = "argus_data", body = dict (query = search_bags ["query"] , Size = "1000") # I want to do this "unlimited") print (test) I do not know what my size is because I have constantly new data How to manage Please help me solve this problem, thanks. You can do this: test = es.search (Index = {'test'], doc_type = ['test'], size = 1000, to_ = 0) then to _ slowly Do not get all the data till you get it. from_a ??? Start offset (default: 0)

postgresql 9.1 - Django QuerySet changing IN to ANY(array[...]) -

We have found some slow-moving queries in our DB and I think that by changing some of them to the original SQL can be solved. Looking at the following: Model.obies FILTER (rel_id__in = [1,2,3]) Output ( select all, from field "model" WHERE ("rel_id" I want to convert the SQL to: select all, field "model" ( From WHERE ("rel_id" = any (array [1, 2, 2])) I know that this can not be an optimum approach, but EXPLIN analysis Gives very little data from the second query. So my question is, possible This can be done like this: Model.objects.extra (where = {'rel_id "= any (array% s)'% (str (your_list)))) Other you might want to resort to using.

struct - Need to format fieldname of structure in MATLAB -

I have the field name in which for matlab structure (.) when I create the structure , Invalid field name error such as areaname = 'frak .01' structure S. (FieldName) = 25; You can use to change an invalid name such as 'Freq.01' is something that is valid name (this is only available in relatively recent versions of MATLAB.) In older versions of MATLAB, you can use.

nlp - Difference between ontology and wordnet -

What is the difference between the word and netol? As far as I know that literally can be extended to otology, if so, how can we do this? Many different ontologies are wordnet one of them.

webserver - Accessing my node.js by others? -

मैंने अपने node.js सर्वर को सफलतापूर्वक लॉन्च किया है, और इसे http : // स्थानीयहोस्ट: 3000 मैं दूसरों को अपने डेवलपमेंट सर्वर को कैसे देखूं? मेरे पास बाहरी आईपी नहीं है। विकास के चरण में त्वरित साझाकरण के लिए एक विशेष एनपीएम मॉड्यूल कहा जाता है। सुरक्षा चिंताओं के कारण उत्पादन विधि में इस विधि का उपयोग न करें। इसे स्थापित करने के बाद localtunnel का उपयोग कर ( npm install -g localtunnel ): एलटी --पोर्ट 3000 कमांड चलाने के बाद यह आपके बाहरी रूप से पहुंच योग्य URL को आउटपुट करेगा, इस यूआरएल को अपने दोस्तों के साथ साझा करें।

jquery - xmlhttp.send() within .each() sends only the last record -

I'm trying to teach myself some php and Ajax for a pet startup project - $$$ $ someone Real technical man :-) Anyway, this is the background. I have selected a data in the HTML table, when an submitted function is called in the update. To select the selected record (radio button) I loop through the table and call them the update line file, assign a row and loop through each line and send the record to add to the database when I have If there is a JavaScript alert statement then all records are added to the database. But if I comment the warning then only the final record is added. I have tried to add 3 seconds, 5 seconds delay in the loop. Here is the code snippet - some variables are set out of this loop and there is no problem with the values. $ row.each (function () {var $ rowcells = $ (this) .find ('td'); // Divide the entire row into columns var name = $ rowcells Eq (0) .text (); // Name of the selected relationship name = $ rowcells.eq (1). Child (). Val (); /...

html - Google Polymer create menu tree -

Image
I want to create a menu tree using the polymer core-menu. The table in my database is: The table has a category with sub category. I want to show it as a menu tree, I did something like this: & lt; Polymer-element name = "category-list" attributes = "show" & gt; & Lt; Templates & gt; & Lt; Style & gt; : Host {Display: Block; Width: 100%; } .cat_item {margin: 10px; Background color: RGB (255, 255, 255); } & Lt; / Style & gt; & Lt; Category-service id = "service" categories = "{{categories}}" & gt; & Lt; / Category-services & gt; & Lt; Selected core-menu = "1" selected index = "1" id = "core_menu" & gt; & Lt; Template repeat = "{{category in categories}}" id = "t" if = "category.has_child == '1'" & gt; & Lt; Core-Submenu label = "{{category.category_name}}" icon = "settings" value = ...

c# - Where do I put a piece of code that I want to run right before a multi-form Windows form app exits? (no matter how the program exits) -

I have a C # application that contains multiple versions, and there is no special that will always be closed last Where should I place a piece of program (i.e. dumping some information in the file) to make sure how any program goes out, before the program closes? Well, a method to do whatever is right before exiting a main method Have to call. ETA: By default, the main method is in the program.cs file. Here is an example of what I mean static zero main () {Application.EnableVisualStyles (); Application.SetCompatibleTextRenderingDefault (wrong); Application.Run (New Form 1 ()); // ** This code will not reach when form1 will be closed. Boole blah = true; DoWhatEver (blah); }

c++11 - Is there any C++ standard class/function which is similar to GetTickCount() on Windows? -

अहस्ताक्षरित int टिक = GetTickCount (); यह कोड केवल विंडोज पर चल रहा है, लेकिन मैं सी ++ मानक पुस्तकालय का उपयोग करना चाहता हूं ताकि वह कहीं और चला सके। मैंने std :: chrono , लेकिन मुझे GetTickCount () । जैसे फ़ंक्शन नहीं मिल रहा है क्या आपको पता है कि मुझे std :: chrono आप विंडोज के शीर्ष पर कस्टम chrono घड़ी बना सकते हैं GetTickCount () । फिर उस घड़ी का उपयोग करें पोर्टिंग में, आपको बस पोर्ट करना पड़ता है उदाहरण के लिए, मैं विंडोज पर नहीं हूं, लेकिन ऐसा एक ऐसा बंदरगाह ऐसा दिख सकता है: #include & lt; chrono & gt; // विंडोज के सिमुलेशन GetTickCount () अहस्ताक्षरित लंबे समय तक GetTickCount () {नामस्थान std :: chrono; वापसी की अवधि_कास्ट & lt; मिलीसेकंड्स & gt; (स्थिर_क्लॉक :: अब ()। Time_since_epoch ())। गणना (); } // घड़ी पर निर्मित विंडोज़ GetTickCount () संरचना टिकिकॉटलक्लॉक {टाइप किए गए साइबंस किए गए लंबे लंबे प्रतिनिधि; Typedef std :: मिली अवधि; Typedef std :: chrono :: अवधि & lt; rep, अवधि & gt; अवधि; Typedef std :: chrono :: time...

erlang - processes spawned on connected nodes get same PID -

I have 4 along nodes that work together on multi-process applications. In my order there is a process monitor which pulls the area of ​​the field processes and 3 other nodes handle the process space and movement. On the monitor I use the ETS database to store locations when the key process is PID, I have found that the nodes make processes, which have the same PID, which clearly with the management of the entire system. Comes. I have tried to connect these processes to: net_adm: ping (...) net_kernel: connect (...). Hopefully, when the nodes know about each other, they will give the information of different PID but this will not work. PID can be printed on the same, eg & lt; 0.42.0 & gt; , but this is just an output convention: PIDs are printed with the first number 0 on the local node. If you send this PID to another node and print it there, then it will be sent to & lt; 2265.42.0 & gt; or similar will be printed. PIDs are always associated with t...

javascript - How can I get JSON from an API into a view of my Angular app? -

मेरे पास JSON ऑब्जेक्ट है जो localhost: 9000 / api / और मुझे लगता है कि JSON डेटा को localhost: 9000 / # / query मुझे एक मार्ग मिला है । जब ('/ क्वेरी', {templateUrl: 'views / query.html', नियंत्रक: 'QueryCtrl'}) और एक नियंत्रक: 'सख्त उपयोग'; Angular.module ('myApp')। नियंत्रक ('QueryCtrl', ['$ scope', 'query', फ़ंक्शन ($ दायरा, क्वेरी) {$ scope.queries = Query.query ();}]); और दृश्य: & lt; h1 & gt; क्वेरी & lt; / h1 & gt; & Lt; ul ng-repeat = "क्वेरी में क्वेरी" & gt; & Lt; li & gt; {{क्वेरी}} & lt; / li & gt; & Lt; / ul & gt; ऐसा लगता है कि या तो "प्रश्न" खाली खाली है, या फिर दृश्य सिर्फ नियंत्रक से ठीक से जुड़ा नहीं है। ऐप.जेएस में भी यह कारखाना है : एक्सपीरिया ('क्वेरी', ['$ संसाधन', फ़ंक्शन ($ संसाधन) {रिटर्न $ संसाधन ('/ api', null, {'update': {method: 'डाल' } }); }]); JSO...

html - How to make inline-block elements to grow vertically -

Image
I have two inline block elements (the first image) first fixed a width. The second does not have fixed width because the container can grow horizontally, so it should be filled. When the second element is bigger (second image) then it wraps down. But what do I need to do is to grow the element (third image) vertically. I also need text to protect line breaks. you max-width: calc (100% - LABEL_WIDTH) Can apply to .element class. Change the label's width to LABEL_WIDTH. In this way you can define the width for labels instead of using two percent values. See this JSFiddle for a work example: Support calc () For a table of browsers see this link: li {Display: inline -block; Vertical-alignment: top; List-style-type: none; } .label {width: 7em; } .element {width: calc (100% - 7em); White-space: pre-line; }