Posts

Showing posts from July, 2014

php - Laravel Query Builder to Eloquent -

मेरे पास निम्न PHP कोड है: $ users = DB :: table (' उन '); यदि (इनपुट: है ('मिनएज') और amp; इनपुट: है ('मैक्सएज')) ($ उपयोगकर्ता = $ उपयोगकर्ता- & gt; जहां बीच ('उम्र', सरणी (इनपुट :: मिल ('मिनएज' ), इनपुट :: मिल ('अधिकतमएज')); } और अगर (इनपुट :: है ('मिनएज')) {$ users = $ users- & gt; जहां ('उम्र', '& gt; =', इनपुट :: मिल ('मिनेज')); } और अगर (इनपुट :: है ('अधिकतमएज')) {$ users = $ users- & gt; जहां ('उम्र', '& gt; =', इनपुट :: मिल ('अधिकतमएज')); } यदि (इनपुट: है ('सेक्स') और amp; इनपुट: प्राप्त करें ('सेक्स')! == "0") {$ users = $ users- & gt; जहां ('लिंग', '=' , इनपुट :: मिल ('सेक्स')); } $ उपयोगकर्ता = $ उपयोगकर्ता- & gt; पृष्ठांकित करें (15); वापसी देखें :: बनाना ('search.result', कॉम्पैक्ट ('उपयोगकर्ता')); हालांकि मैं एलोक्वायेंट के माध्यम से पुनः प्राप्त करना चाहूंगा...

facebook - FB.ui not returing post id in response -

I'm finding to follow this thread whether or not the user shares the link given to me Allow the user to reach the next level when they share. How am I doing this: FB.ui ({display: 'popup', method: 'share', href: 'url-here',} , Function (response) {console.log (response.e2e) if (response and response) {$ .ajax ({url: ajaxurl, type: 'post', data: {action: 'unlock_om_gmap'}, success: function ( Race) {}});}}); But every time its return object {e2e = "{" submit_0 ": 1406412308276}"} No post ID is anyone familiar with this issue? How do I check whether the user has shared my link or not? As I mentioned in the comments, to determine whether an open graph story Shared, you will need to check the property of the object_id in the response data, but it will only be available if the user is logged into your app using Facebook and given the code publish_actions

ios - Build Errors Using Cocoapods and AFNetworking -

Image
The first time I have used cocopod and it is not a good experience so far. I'm trying to build my project and I'm getting errors below: I have not got anything which googled and googled and googled, but useful. Does anyone tell me why this is happening? It is very disappointing because I have spent hours in setting up Kokopod and there is no luck! Edit: More detailed screenshot of error I have seen this issue before that when I have Libscale 3.0.dylib in my project Do not include the structure Go to Goal - Build Settings - Linked Frameworks and Libraries - Add and Clear and Clear that Framework

java - Using a random operator many variables -

I want to add a random operators so that I can randomly add / subtract / multiply / divide multiple variables. The code below does not work, I think this is because randomly generated operator is a four which is actually a value, so it has been added instead of being used as an operator. Anyway I'm new on this and any help would be great thanks! class squares {public static zero main (string [] args) {classb x = new classb (); Int a = 1, b = 2, c = 3, d = 4; Integer answer; // Trying to get answer / Answer = A (+, -, *, /) B (+, -, *, /) C (+, -, *, /) D / y = answer + a + X.randomOperator () + B + x.randomOperator () + c + x.randomOperator () + D; Println ("answer =" + answer); }} I create random operator sign in a different class. import java.util.Random; Public Class Classby (Public Care Random Operator) (Random RV = New Random); Int apple = RV.NextText (3); Four Operators; Switch (Apple) {Case 1: Operator = ';'; Breakdown; Case 2 : Operator = ...

c# - Modify the behaviour of JSON.NET to serialize a collection of objects to an array of IDs -

I want to modify JSON.NET so that when I want to serial a model from my API, An array sends an overall collection object. For example: class employee {public iconging Then when I send it via webapp request. Creatorespress (HTTTPTAS code.OK, new employee ()); Instead of: {"address": [{"id": 1, "location": "XX", "postcode": " XX "}, {" id ": 2," location ":" XX "," postcode ":" XX "}]} This sends just like this: {"addresses": [1,2]} I think this application should be wide and I do not want to modify it in a specific location. How do I use JSON.NET serializer? You can do that as a result you want to use a custom like this: Class IdOnlyListConverter: JsonConverter {Public Override Bull CanConvert (Type Object Type) {Returns (Typ (IEnumerable) .IsAssignableFrom (objectType) & Object Type! = Typef (string)); } Public override zero Wri...

google cloud endpoints - Unable to create Android Client ID in App Engine dev console -

I am trying to create a new Android client ID for a Google App Engine project dragon backend. I thought I was facing a bug with App Engine's new Dev console, but the error has also come with the old console interface. STEP: In my App Engine Project, I click on "Credentials" under "API & AP" title "ATH". Click the "Create new customer ID" Selected: Android app installed Place in my Android application package name: ca.ajwest.pythonapi Paste the SHA1 key created by the key toll ( I'm using a release keystore). Enable deep linking (although the problem still occurs when set to disabled) "Create Client Result: When the lightbox is faded, I have a new Android client ID with SHA1 and package name that I provided. However, while navigating away from the page or refreshing the credentials page, SHA1 is no longer listed on the entry, and Deep Linking is set to disabled (even if I have enabled it or not). What...

git - Linux kernel configuration - enabling CONFIGURE_LOCALVERSION_AUTO -

I recently cloned the Colonel of Legs Torvalds. I want to build and install this kernel in my laptop. But because I want to use "Colonel-Day", I want to enable the CONFIGURE_LOCALVERSION_AUTO option. But how should I enable this option, I do not know this. Where to get this option? menuConfig or xconfig , to the Linux kernel To configure these interfaces are used modified. The config file has been disappointed directly in your kernel source tree inside create menuconfig or make xconfig - anybody likes you. On the kernel configuration menu you will find the General Setup option, in this option to automatically append the version string , toggle it to enable / disable it.

javascript - Submit form after progress bar submit animation -

I need your help. I have some submit buttons with animation, here's a work demo: http://plnkr.co/edit/KhDdXWYnj3kVxhiKaEFL but submit now does not work, just ask and play the animation. Do not submit the form & lt; Button type = "submit" name = "send_approve" onClick = "return message1 ()" class = "progress-button" data-style = "rotated-back" data-perspective data-horizontal & gt; Enviar & lt; / Button & gt; This is the code for animation: []. Slice.call (document.querySelectorAll ('button.progress-button')) .forEach (task (BTN) {new progress button (BTN, {callback: function (instances) {var progress = 0, interval = set interval (function ( ) {Progress = Math. Middle (Progress + Math. Rendum) * 0.1, 1); Example._set progress (progress); if (Progress === 1) {instance._stop (1); Clear Interval (Interval); }}, 200);}}};}); Before the animation I did it and works fine, but now I just submi...

How to delete ManyToMany table with extra column using Hibernate/JPA -

Image
मेरे पास इस तालिका की तरह एक तालिका में 2 तालिकाओं हैं: मैं व्यक्ति या समूह तालिकाओं को हटाए बिना PersonOnGroup तालिका से एक रिकॉर्ड कैसे हटा सकता हूं? कास्केड का उपयोग करना या अनाथ को हटा दें? या फिर सीतनिद्रा में होना कोई दूसरा रास्ता नहीं है? ये संस्थाएं हैं: @ एंटिटी @Table (name = "groups") सार्वजनिक वर्ग समूह {निजी लंबे आईडी समूह ; निजी स्ट्रिंग का नाम; निजी स्ट्रिंग विवरण; निजी संग्रह & lt; घटना & gt; eventsByIdGroup; निजी संग्रह & lt; PersonOnGroup & gt; personOnGroupByIdGroup; @ आईड @ जनरेटेड वैल्यू (रणनीति = जेनरेशन टाइप। एओटीओ) @ कॉलम (नाम = "आईडी ग्रुप") सार्वजनिक लंबे समय में आईआईडी ग्रुप () {लौट आयोड ग्रुप; } सार्वजनिक शून्य सेटआईडग्रुप (लंबे आईडीग्रुप) {this.idGroup = idGroup; } // अन्य सेटर और गेटर्स @OneToMany (मैप किए गए = "इवेंट बीआईआईड ग्रुप") सार्वजनिक संग्रह & lt; इवेंट & gt; GetEventsByIdGroup () {वापसी घटनाओं ByIdGroup; } सार्वजनिक शून्य सेटइवेंट्सएआईआईडी ग्रुप (संग्रह & amp; lt; घटना & ...

c# - How to obtain a sheet number for a View with the Revit API -

I want to reach the sheet count of "view view" with Revit API. I have tried searching for parameters related to a scene, but it is not listed as a parameter by intellisense. I can see in a document or project that this is a read only sheet number parameter. foreach (element am in collection) {View View = AMI View As If (see Visual Type == ViewType.florPolon) {Usage (Transaction Transview = New Transaction (Doctor, "Set Ultimate")) {transView.Start (); Int testScale = 100; // Set the scale of the visual footage. Scale = testScale; // Get the name of the visual message + = "\ n See the name:" + visual.vinename; Message + = "\ n Scale after Set:" + View. Scale; TransView.Commit (); }} The style is right You need access to it through the parameters on the view Will be. BIP is recommended, but if you do not consider language specific then you can see the parameter by its name, which appears in the Rivet interface. I would also recommend...

javascript - Add muiltple values from function to each jQuery -

मेरे पास नीचे जो इस बेला में है & lt; ul & gt; & lt; / ul & gt; & LT; स्क्रिप्ट & gt; फ़ंक्शन टेस्ट () {var myNum = [1,2,3,4,5], myNumTxt = ['एक', 'दो', 'तीन', 'चार', 'पांच']; वापसी [myNum, myNumTxt]; } Var myTest = test (), myTestNum = myTest [0], myTestNumTxt = myTest [1]; console.log (myTestNum); console.log (myTestNumTxt); $ .each (myTest, फ़ंक्शन (इंडेक्स, वैल्यू) {$ ("उल")। एपेंड ('& lt; li title = "' + value [1] + '" & gt;' + value [0] + '& lt; / Li & gt; ');}); & Lt; / स्क्रिप्ट & gt; मुझे जो कुछ वापस करना है, वह मेरे ऐरे में प्रत्येक आइटम के लिए एक सूची आइटम है जिसका शीर्षक नीचे दिखाया गया शीर्षक पाठ में प्रदर्शित किया गया है। & lt; ul & gt; & Lt; li शीर्षक = "एक" & gt; 1 & lt; / li & gt; & Lt; li शीर्षक = "दो" & gt; 2 & lt; / li & gt; & Lt; li शीर्षक = "तीन" ...

java - InvalidClassException while deserializing blob field from database -

When I was trying to get the data drops from the database (mysql), I found the exception below. java.io.InvalidClassException: com.nmsworks.cygnet.tmf.mtnm.elements.SNCUserData; Local Class Incompatible: Stream Classes Serialvarsion UID = -7634696886161105104, Local Class SerialVersion UID = -7522169448179471613 I believe some code changes after data Stored in class database I did not declare a default serial version uid in class. I can see what the problem is. If I had declared a UID, then I would not have received this exception. My question is instead of storing the object in the database as Bbq, is there any other way of saving the object so that I do not need to serialize and deorize the object whenever I store it and store it again from the database? I do not want to declare a serial variant UID in class because it is a heavy structure, in return for which there are many serial objects, for which I have to declare the UID inside it. I believe that after the data ...

java - JPA Eclipse "Generating Tables From Entities" hangs forever -

On a Windows 8 64 bit machine, in Eclipse Luna, I get the form of JPA (EclipseLink 2.5.x) and your derby JDBC connection I use it. My firmness XML so far: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Persistence version = "2.1" xmlns = "http://xmlns.jcp.org/xml/ns/produstence" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" XSI: Schema Locations = "Http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> & Lt; Strength-unit name = "Report Witter" Transaction type = "RESOURCE_LOCAL" & gt; & Lt; Classes & gt; Com.example.clazz & lt; / Square & gt; & Lt; Classes & gt; Com.example.CommentBank & lt; / Square & gt; & Lt; Classes & gt; Com.example.CommentCategory & lt; / Square & gt; & Lt; Classes & gt; Com.example.CourseWork & lt; / Square & gt; &...

android - Fragment to activity intent not working -

So, I'm doing a project, and I have a piece called homepg_fragment.java and I try to link him I'm doing the image button to go to another activity called MensAllShoes but it keeps crashing, can someone help me? I'm new to Android programming, as you can see. This is my homepg_fragment.java package com .op.slidingmenu.slidelist; Import com.nyp.integrateshoebox.MensAllShoes; @SuppressLint ("NewAP") enhances the HOMEPG_Fragment slice of the public class (ImageButton Women, Gentlemen; Crate on Public Zero (Bundle Saved Instantstate) {Super.New (Saved Instantstate); setContentView (R.layout.homepg_fragment); Women = (ImageButton) findViewById (R.id.ladies1); gentlemen = (ImageButton) findViewById (R.id.men1);} public void cookies (views) {intent cookie = new intent (getActivity (), MensAllShoes.class); StartActivity (cookie);} Private Zero setContentView (integer viewallFragment) {// TODO auto-created method stub} @Override abstract View public onCreateView (L...

php - How to use web.config [IIS] to shorten a URL GET data -

I have tried to look around, but my query can not be found at all. I do not have enough knowledge to do this, but basically I want to shorten this URL: http://example.com/register/?ref=Liam to http://example.com/register/ref/Liam using IIS web.config You can use this web.config: & Lt; Rule name = "rule1n" stop processing = "true" & gt; & Lt; Mail url = "^ register /(.+)/(.*)$" /> & Lt; Action type = "rewrite" url = "/ register /? {R: 1} = {R: 2}" /> & Lt; / Rules & gt; Now if you open example.com/register/ref/r , then you example.com/register?ref=r

python - How to pass an argument to event handler in tkinter? -

widget.bind ('& lt; बटन-1 & gt;', कॉलबैक) # बाध्यकारी def कॉलबैक (स्वयं, घटना ) #do कुछ मुझे कॉलबैक () पर तर्क देने की आवश्यकता है। तर्क एक शब्दकोश वस्तु है। आप किसी अनाम फ़ंक्शन को परिभाषित करने के लिए उपयोग कर सकते हैं, जैसे: डेटा = {"एक": 1, "दो": 2} widget.bind ("& lt; बटन दबाएं;", लैम्ब्डा इवेंट, arg = डेटा: self.on_mouse_down (ईवेंट, arg )) ध्यान दें कि पास में arg सिर्फ एक सामान्य तर्क है कि आप अन्य सभी तर्कों की तरह उपयोग करते हैं: Def on_mouse_down (स्वयं, ईवेंट, आर्ग): प्रिंट (आर्ग)

go - How to use OR operator properly in Golang -

How can I do this simple in Goalge var planDate string date, ok: = Data ["date of appointment"] if! Ok {date of appointment = use Timestamp ()} and {planningDate = date} thanx I do not see any way to do this in the same line, because there is no one in you | can not be used, either the operands numbers are not. However, here is a solution in three rows (assuming: date is only a temporary variable): date of appointment, ok: = data ["planning Date "] if! OK {PlanDate = util.TimeStamp ()}

Apache access log -

I want to ask what is the final number on each request in the access log? 127.0.0.1 - - [27 / July / 2014: 12: 49: 31 +0300] "GET / battleWS / startServer / 11 HTTP / 1.1" 200 15 9 In this case it is 159 , sometimes it is empty - (dash). Can anyone tell me what this is? Thanks! The document says: (% b) The last part indicates the size of the object, the customer, the response headings If the client does not return any content, then this value will be "-". To log "0" for any content, use% B instead. The reason for this is because it asks because the resource has changed since the last time, so it does not really bring it again. For such simple questions Google is much faster than the SO :)

mongodb - Mongo group command with missing keys -

I am using Mongo as a tick database where I periodically keep data from time to time. . Later I use this data to learn about the data about the system. I have such a collection: [["date": ISOAD ("2014-06-16T03:" minimum ": 4," max ": 25} , {"Date": ISOAD ("2014-06-18T03: 48: 58.152Z"), "Minimum": 3, "Maximum" ": 8}, {" Date ": ISOAD (" 2014-06-18T 03 I group to group all the documents in the daytime: "48: 58.152 Jade"), "minimum": 8, "max": 12}] I use the command. db.stats.group ({keyf: function (doc) {var date = new date (doc) (date, date);} reduce: function ( Curr, result) {result.max = Math.max (curr.max, result.max); date.setHour S (0, 0, 0, 0); || 0); result.m = Math. Middle (curr.min, result.min || 0);}, initial: {}}); This gives me the result: [["Date": ISOAD ("2014-06-16 T 21: 00: 00.000Z" ), "Minimum":...

c# - IoC container in MVVMLight - How to pass concrete implementation to the specified element? -

I am currently facing the following problem with the IoC container from MVVM light - I have the interface IDataService , which is being implemented by two classes: DataService1 and DataService2 . I also have the main view model category, which has several dependencies, with one IDataService . The issue is, I do not have MainViewModel with DataService2 , another one, how can I do it? I have tried both "instances" of IDataService and MainViewModel , such as: class MainViewModel {// MainViewModel has many dependencies, Public Main Week Model (Xx, YY, Z, MM, NN, IDTA Service Service Services) {}} (...) Simple IOC Default. Registrar & lt; IDataService & gt; (() => New Data S Service 1 (), "A"); SimpleIoc.Default.Register & lt; IDataService & gt; (() => New DataService2 (), "B"); (...) var viewmodel = Simple Ioc.Default.GetInstance & lt; MainViewModel & gt; ("B"); // runtime exception but I get a ...

Octopress choose aside for each page -

I have several pages on my blog that are quite specific and I know which sidebar I want to show on every page On the one side I know that to control the sidebar content, some elements have to be specified in order to appear with some layouts In my case, these pages have each one Unique layout ( per-se ) is not required, they just Different sets are required. That's why I am reluctant to create a separate layout for each page so that I can control the asides with greater accuracy. "post-text" itemprop = "text"> You are right, you will need a new layout in which you can specify specific page_side. A good example of optimization that you will need to make here:

php - Convert such this array into variables -

I have this array in PHP, how can I convert one and two Can i and three in each of the variables (I just pasted the array before the items ) Array ([encoding] = & Gt; UTF-8 [Title] = & gt; Arrays [Link] => arrays.com [Item] => Array ([0] => Hey ([one] = & gt; This is one [two] = & gt; arrays.com [three] => here is my array) [items_count] => 100 [cached] => 0) You can use PHP function: extract ($ Array ['items'] [0]);

html - Stop Float at footer Jquery -

इस कोड का उपयोग कर रहा है: $ (window) .scroll (function () { यदि (($ (दस्तावेज़)। हाइट () - $ (विंडो) .scrollTop ()) & lt; = 500) {$ ("# content-5")। सीएसएस ({स्थिति: 'तय', शीर्ष: 'स्वतः ', नीचे:' 300px '});} और अगर ($ (विंडो) .scrollTop ()> = 30) {$ ("# content-5")। सीएसएस ({स्थिति:' तय ', शीर्ष:' 30px ', नीचे:' ऑटो '});} अन्य {$ ("# content-5")। सीएसएस ({स्थिति:' पूर्ण ', ऊपर:' 30px ', नीचे:' ऑटो '})}} }); और यह डेमो है इसका काम ठीक है, लेकिन मैं पता नहीं कैसे करना है, कि फुफ्टर पर elemnt रोक फ्लोट? कोई भी आपकी मदद कर सकता है? मैंने आपको बेला अपडेट किया है .... सीएसएस के अपना पहला ब्लॉक बदलते हैं। $ ("# content-5")। सीएसएस ({स्थिति: 'तय', शीर्ष: '0px', नीचे: 'ऑटो'});

How can I get the second column to line up perfectly using python? -

When I run the following code, then I'm trying to make the second column line completely: Import Mathematics X = 1.0, while X & lt; = 65536.0: Print X, '\ t \ t', math.log (x) /math.log (2.0) x = x * 2.0 Although the three lower lines of the second column are always Tabs do an additional time in relation to previous lines, even if how many '\ t I use. How can I fix this? You can use str.format and create the inside row Can be: import math = X, 1.0 while X & lt; = 65536.0:. Print "{: 7} {}" format (x, math.log (x) /math.log (2.0)) x = x * 2,0 1,0 0,0 2.0 1,0 4,0 2 , 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 64,0 6,0 128,0 7.0,06,0 8,0 512,0 9,0 1024,0 10,0 2048,0 11,0 4096,0 12,0 8192,0 13,0 16384,0 14,0 32768,0 15,0 65536,0 16,0 or zfill () to pad zero:. print "{} {}" format (STR (x) .zfill (7), math.log (x) /math.log (2,0)) 00001,0 0, 0 00002,0 1,0 00004,0 2,0 00008,0 3,0 00016,0 4,0 00032,0 5,0 00064,0 6,0 00...

How to pause an android app -

I want to create an application that displays some information on the screen, waits for a while and then some more Does the Android app have a simple order to stop? I'm using Android 4.2.2. You can use the handler class: Make an example: handler HK = new handler (); Use your example to run a post () method: Last Boolean Post Delayed (Runable R, Long William Millie) Runable R to be added to the message queue can be added to run after the specified time. The Post Delayed () method requires feeding with runnab, which contains the code that you must have after delay milliseconds. Runner class can be done as follows: class runner runnabel {public zero run (// // your code}} as a simple example: handler handler = new handler (); Handler. Post Delayed (New Runner (2000));

android - arabic font does not show very well -

I want to make an Android app in Arabic and I need some complex fonts AdobeArabic -Regular .ttf But this font has crashed and does not show the letter correctly. What should I do? A TTF should work, however, you have not provided any code. Check that this problem is the same for all custom fonts you use. If so, then your implementation may be wrong. Then I would suggest checking this tutorial:

apache - how to block all images on server .htaccess -

मैंने ऐसा करने की कोशिश की: पुनर्लेखन%% {HTTP_REFERER}! ^ Http: // ( Www।।)? Mysite \ .com [NC] रीराइटकंड% {HTTP_REFERER}! ^ Http: // (www।)? Mysite \ .com। * $ [एनसी] रीराइटरेबल \। (Gif | jpg | png) $ - [एफ] चित्रों को एक्सेस किया जा सकता है मैंने ऐसा करने की कोशिश की: सभी से इनकार करते हैं और अभी भी काम नहीं करता है, छवियां उपलब्ध रहती हैं तो बस चलें Https लेकिन एचटीटीपी काम नहीं कर रहा है: RewriteEngine RewriteCond% {HTTP_REFERER} पर! ^ Http (s) ?: // (www \।)? Mysite.com [NC] RewriteRule। ( Jpg | jpeg | png | gif) $ - [एनसी, एफ, एल]

Avoid repeating parts of a jquery script -

I am trying to check some input-fields before submitting a form. But this code looks a bit complicated for me as there are repeating parts, I think it is possible to customize / hesitate the code. What is done by the code: Check input If there is an error, then a class has been added If there is an error category -> the form will not be submitted I tried to keep some parts in a different function, but I did not find it :-( I think a different function would be better i.e. if I had two different input fields For the same case ... You can create a function to save a lot of code that check Submit (function) {$ ("tr"). Each (function () {var self = $ (this); Validate (self) ), 1, / ^ \ d + (-? \ D + | \ * * $ /, true Validated ATD (self, 2, / ^ \ d + (\. \ D + | \ * * * ($? \ D + (\. \ D + | \ * *) | \ d *) $ /, truth); Manyatteediti (self, 3 / ^ [A-GAA -jim] + $ / i);}); if (! $ ( '. error ") length) {event.preventDefault ();}}); function Valida...

angularjs - validate form fields before uploading file (Blueimp jquery file upload) -

I'm working on the blueimp file (the version of the Angularus), I want to validate the form before uploading the file, I have to say that names and details are included and I want these files to be provided before uploading. I have tried this code so far till the coaler wanted to use form validation $ scope $ ('Fileuploadsubmit', function (event, files) {if its file name} {// its a farm field} : File.name, templateName: _uploadTemp.name};});} and {form.submit = true}}); By doing so, I see an error on the filename, but also submits the file to the server. Is there any way that I can stop uploading the file and show the error ?? Any help would be appreciated, just to mention that using the BLUEIMP file, upload AngularJs version I have actually made a directive for this purpose. The code I pasted was for you to just give instructions on how the instruction should be. Sorry for not putting a working version, if I get time today / tomorrow I will make it wor...

.net - how to use UserId instead of user name in authentication ( Web Forms asp.net)? -

itemprop = "text"> I have Visual Studio 2013 Last I have created ASP.NET Web App (not MVC) .NET Framework 4 User Primary key is uniqueidentifier (GUID) with Forms, I found dafault Login.aspx, Register.aspx and other forms. There are codes using User.Identity.Name instead of the primary key User ID: as a result of the default = OpenAuth.GetAccountsForUser (User.Identity.Name) form. The main GUID of this user.Identity.Name to change, because more than two users can have the same name? "itemprop =" text "> ASPNET membership You are using providers: subscription user User = membership GetUser (User.Identity.Name); Guid guid = (Guid) user.ProviderUserKey; In the case of OHTH you do this. You should add `[InitializeSimpleMembership] 'at the top of the controller class if you use another controller in comparison to the AccountController. WebSecurity.GetUserId (User.Identity.Name); Also check this answer:

Assigning variables from mysql to php -

I am trying to send a username and password, which sends users from my database via email. How do I get this objective? I am using the current code below and whenever I receive an email, I realized there are spaces for $ username and $ password, which means that the database value is not being sent. & lt; ? Php $ to = $ email; $ Theme = "Details registered with BFS!"; $ Message = "Dear $ username, as requested, these are your login details."; $ Message = "Username = $ username password = $ password"; $ Headers = 'to: noreply@bfs.com'; $ Sentmail = Mail ($ $, $ theme, $ message, $ header); ? & Gt; Edit **** Full code change this: $ Username = mysql_query ("user select user where username = '$ user name' '); In: $ res = mysql_fetch_assoc ($ result); $ Res = $ res ['username']; $ Username = mysql_query ("Select from user where * username = '$ res'"); And this: $ res...

c++ - same #include statements in derived classes -

I have two questions We say that there are a base class and many derivative classes, derived Classes are all going to use the #include statement (as #include etc.) and base class of lines . 1. It is considered a good practice to write lines in derivative classes using the #include statement of the base class and using lines. File anyway? 2. Question about structure - The purpose of class B in class B in class A is, what is the purpose of class B, s # include` statements in a good practice File anyway? Thank you! say that there is a base class and many derivative classes, all #include in derivative classes The statement (such as #include gt; etc.) and is going to use lines of base squares. Not at all. First of all, you place not on top-level scopes in the lines by using . This is a common starting mistake. Second, do you think that the derived class needs all the #include s base class? The derived class header file is required to include a base-c...

assembly - What is the purpose of moving a register to itself as in "mov (%eax), eax"? -

जीसीसी के साथ सरल सी कोड को अलग करते समय मैं आया: mov (% eax) , Eax विधानसभा की मेरी समझ यह है कि जब आपके पास एक रजिस्टर के आसपास () है, तो आप कुछ संख्या मेमोरी एड्रेस को जोड़ रहे हैं, अर्थात, 0x4 (% eax) का मतलब रजिस्टर % eax से ऊपर 4 बाइट्स होगा। यहां, हालांकि, () है, तो ऐसा लगता है कि वह रजिस्टर में मान की प्रतिलिपि बना रहा है। मैंने पाया है कि % eax रजिस्टर को सामान्यतः चर लौटने के लिए उपयोग किया जाता है और यह पंक्ति तब होती है फ़ंक्शन कॉल के तुरंत बाद, मेरा अनुमान यह है कि यह निर्देश वास्तव में मशीन को कह रहा है कि जो कुछ भी % eax नामक फ़ंक्शन के लिए होता है (यानी, वापसी मान) और % eax वर्तमान फ़ंक्शन के लिए रजिस्टर करें। क्या यह सही है? यदि नहीं, तो मुझे क्या हुआ है, और यह वास्तव में क्या कर रहा है? () में एंड एंड सिंटैक्स मेमोरी डीरेंसिंग को दर्शाता है, आपको शायद प्रभावी पता वाक्यविन्यास के बारे में पढ़ना चाहिए। समतुल्य सी कोड eax = * eax; होगा, जिसका अर्थ है कि वर्तमान में मान eax का पता लगाकर स्मृति से 4 बाइट लोड करें और eax प्राप्त किए गए म...

ember.js - Create / Update multiple objects from one API response -

All new jsfiddle: Currently, I ask for an API Which return JSON like this For now the API can not be changed, which is why I have to work around it. [{"timestamp": 1406111961, "value": [1236.181, 1157.695, 698.231]}, {"timestamp": 1406111970, "value": [1273.455, 1153.577, 693.591]} ] (too many rows can be, at all) As you can see, timestamps in each line and after that My problem is that there is an array of values, that I really want to move that. Looking at the first row alone: ​​ {"timestamp": 1406111961, "value": [1236.181, 1157.695, 698.231]} Only some measurements taken in time will need to be created in my Amber Project: {"sensor_id": 1, // can be obtained from the array index "timestamp": 1406111961, "Value": 1236.181}, {"sensor_id": 2, "timestamp": 1406111961, "value": 1157.695}, {"sensor_id": 3, "timestamp": 1406...

javascript - What does the ! (exclamation mark) mean before selector in jQuery -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मुझे पहले से ही पता है कि ! को सामान्यत: "code" नहीं , नहीं , और null में जावास्क्रिप्ट में अभिव्यक्त करने के लिए उपयोग किया जाता है। लेकिन jQuery के चयनकर्ता से पहले उद्गार चिल्लाना क्या मतलब है? यदि (! $ ('चयनकर्ता')। हैक्सेल ('कुछ')) {कुछ करो} यह एक बूलीयन को अस्वीकार करता है। अर्थ: और गलत हो जाता है इस उदाहरण में इसका मतलब है: यदि (! $ ('चयनकर्ता')। हैक्लास ('कोई चीज़ हैक्लासेल फ़ंक्शन के परिणाम पर। ऐसा है जैसे आपने ब्रैकेट्स का उपयोग किया है (लेकिन आपको ब्रैकेट्स का उपयोग नहीं करना है, जावास्क्रिप्ट जानता है कि इसका मतलब है)। ! ($ ('Selector')। हैक्लास ('कुछ' ) / * उदाहरण के लिए रिटर्न सही * /) / * अब यह झूठी है * /

Android Accelerometer wiggling -

When I lean my mobile phone fast or left to move the player in my app, Time. How can I remove this effect and make it as smooth as it would jump into a doodle? I am using the raw accelerometer sensor event value to add player coordinates. Is there an algorithm or should I just use the sensor differently? Public Zero {if (event.sensor.getType ()! = SENSOR) on Sensor Change (Sensor Event Event); Return; If (this.isRunning ()) {spieler.setMoveSpeed ​​(-vent.values ​​[0]); }} You need to use a low pass filter, The problem you're experiencing from this will accelerate the accelerometer value Example code: float rawX = event.values ​​[0]; Float rawY = event.values ​​[1]; Flat rawjaj = event.values ​​[2]; // Apply Low-Pass Filter mGravity [0] = Compass (Rawts, Mg. [0]); Marguerite [1] = Commass (raw, mg. [1]); Marguerite [2] = Compass: (Rawts, Mg. [2]); For more information on checking a short pass filter

greatest common divisor - Implementation of the in-built __gcd method in C++ -

Does the built-in __GCD method in the stell-algorithm library use Euclid's algorithm in its implementation? The source code appears / ** * Rotate it Is a helpful function for RAIS special algorithm * It gives the largest common denominator of two integer values ​​* / templates & lt; Typename _EuclideanRingElement & gt; _EuclideanRingElement __gcd (_EuclideanRingElement __m, _EuclideanRingElement __n) {While (__n! = 0) {_EuclideanRingElement __t = __m% __n; __m = __n; __n = __t; } Return __ meter; } So, it uses Euclidean algorithms. EDIT: I forgot a little question, this is the implementation in the header for G ++ 4.9.1.

java - Rounding to one decimal place -

I am currently working on a temprature converter app. Everything works but I get more than 5 decimal And I have tried to look at it and search on Google, but I do not know how this place is where I display text in main.java: text = (EditText) findViewById (R.id.editText1); Result = (TextView) findViewById (R.id.tvResult); Float input value = float. Perfotto (text .gettext () .toString ()); Decimalable df = new decimal time ("# 00."); String s = (String.valueOf (Convert Farrals. Convert CelsiumFofrenheit (Inputville)); String D = (string.valuef (convertphorrals. ConvertFrennetTellousus (inputwolves)); If (Celsius button. (Czech)) {Results. System Text (D); CelsiusButton.setChecked (wrong); Fahrenheitbutton.setChecked (true); } And (result.set text (s); fahrenheitButton.setChecked (wrong); celsiusButton.setChecked (true);} And here's where I count it: // Celsius converts to Public Static Float Convert Fearhen Heatoconcealus (Float Fahrenheit) (Returns (Fahrenhe...

android - Can't see the bitmap I saved to new directory -

I was looking for a way to save bitmap (with the name of my app) in a folder, like this The default gallery will recognize it from. So I managed to save the image, but I can not see it with the gallery or my PC (using Explorer) This is my code: // internal memory (bitmap BMP) {string appname = "mypad"; String file_path = environment GettyStyle StorePaulic Directory (Environmental. DIRECTORY_PICTURES) + file. Separator + appname; File directory = new file (file_path); If (! Dir.exists ()) dir.mkdirs (); // image file file file = new file (dir, "img" + "_" + system. Contenttime millilias () + ".jpg"); FileOutputStream Out = Null; {Out} Try new FileOutputStream (file); Bmp.compress (bitmap.compress format.jpeg, 100, out); Out.flush (); Out.close (); Out = null; } Hold (exception e) {e.printStackTrace (); }} I can see it using some file manager installed on my galaxy, but it does not help much. I know that I should notify the gallery usi...

javascript - How to delay computed properties to recomputed themselves in Ember.js? -

This question came from the homepage of Ember.js with component example , here's the code: App.GravatarImageComponent = Ember.Component.extend ({Size: 200, email: ', gravatarUrl: function () {var email = this.get (' email '), size = This.get ('size'); return 'http://www.gravatar.com/avatar/' + hex_md5 (email) + '? S =' + size;}. Property ('email', 'size') }); When I try this example, I saw that every time I input a character, the browser will request an avatar. If there are 30 characters in my email address, 30 requests will be removed until the right one is returned to the server. I think it is very inefficient, is not it? After digging the guides, I did not know that there is a way to solve this problem, so I was wondering: is it possible to say, like 1000ms, a calculated property for Insert? Or is there a better way to deal with this kind of scenario? You can redeem it, which gives you a similar sense of typin...

android - Why after pressing "ok" button in numeric sofkeyboard the alphanumericsoftkeyboard appears? -

When I click on the edit numeric keyboard app, type some fragments and then pressing "OK" shows the normal keyboard. Which is binded, not an editor, the numeric keyboard should just disappear. How to install it? & lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http: // schemas android.com/tools" xmlns: ad = "http://schemas.android Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: paddingLeft = "@ Dimen / activity_horizontal_margin." Android: paddingRight = "@ Dimen / activity_horizontal_margin" Android: paddingTop = "@ Dimen / activity_vertical_margin "Android: paddingBottom =" @ Dimen / activity_vertical_margin "Android: Orientation =" vertical "tool: Reference =" MainActivity "& gt; & Lt; TextView android: text = "@ string / short_instruction" Android: layou...

elasticsearch - How to retrieve more data from aggregation when array of items is aggregated? -

This question is related. The difference is that I try to collect "languages" on the field which is an array and there are several entries in it such as: {id: 1, name: "english"} . Here is a mapping: Languages: Properties: Name: Type: "string" index: "not_analyzed" id: type: "long" i like this: aggs: languages: terms: field: "languages.id" aggs: languageName: terms: field: "languages {"Key": {"key": 175, "doc_count": 1, "language name": {"bucket": [{"key": "Latin", "Doc_count": 1}, {"key": "lingala", "doc_count": 1}, {"key": "Quechua", "doc_count": 1}, {"key": "t nested for some reasons All language names return for aggregation single So, how do I get language id ... I correct language name? You have to use nested gathering, " "" ...

java - PostgreSQL getSequence current value and pass to id -

I have a question that triggers functions / triggers in postgreSql. I follow the following 2 sections: Abstract public square person () {int personid; } The public class employee enhances the person () {int employeeid; } I have a sequence of "hibernitis" So what do I want to achieve: By putting in employee I want to get the current value of Hibernate_centence and this is " Employed "so that the two IDs are equal. then trigger: make the trigger equal before putting the employee removal process on the setid; The function should do this: Make the function set () 'Update employee sets the numeric form of employee' = select currval (hibernate_sequence ) Where personid = select Currval (hibernate_sequence) 'language sql; But I do not know how to get it. Postgresc doku I am not clear at this point ... You will need to do this in hibernation Not in PostgreSQL Hibernate brings blocks of ID and caches them. So the value of postgre SQL...

javascript - Uploading images via two upload buttons -

I have found this. There is a provision for uploading an image (or an input button) and I need two. I tried to make a copy again at once, but what do I need to give the desired result? Code: & lt; Input type = "file" & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> & Lt; Script src = "jquery.image.upload.preview.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Upload (preview) ({callback: function (res) {res.after.empty ()) (res.img) {jpg} Res.after.append ($ (" "), $ ( '& Lt; img & gt;', {"Src": res.img.src, "width": (res.img.width> 200)? "50": res.img.width}))} }}}}}) & Lt; / Script & gt; & Lt; Input type = "file" & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>...

java - xpath how to get quantity of links on page? -

Image
For example, I'm searching for something in Google, instead I get search results, and I'm using xpath or any other locator Need is the essence of all the links on the results page? Any suggestions? If I was doing this for a google search, then first let me link one. You can select a code in Chrome and inspect the element , then right-click on the newly selected element, and then copy the APAP Example: I get // * However, by clicking on it [@ id = "rso"] / div [1] / li [1] / div / h3 / a it is only li [1] and Because of the div [1] will select a single element, which limits the query, you may have to write XPath to // * [[id = "rso"] / div / li / Div / h3 / a , which selects all 10 search results.

Python:Detect if the current line in file read is the last one -

I am reading a file in a Python line through a line and I need to know which during reading Line is the last, something like this: f = for the line in the open ("myfile.txt") f: if the line is the last line: #d smth I found it to complete and complete the files to count the lines, etc. Do I just find out that the current line is last? I tried to go and check "\ n" existence, but in many cases backlash of previous lines has not been en. Sorry if my question is unhelpful because I did not get the answer SecondLastLine = None None with LastLine = Open ("myfile.txt") as infile: Second Listline, Last Line = Infil.Redline (), infile.readline () for row in Infill: # dot Stuff secondsLastline = Last Line LastLine = Line #Last LastLine

c++ - My range for loop doesn't work -

I have to print the vector size and all the contents inside it. But it is not repeated for my loop, it does not go above one, but rather the value of the whole loop stays at 0. #include "stdafx.h" #include & lt; String h & gt; #include & lt; String & gt; # Include & lt; Iostream & gt; # Include & lt; Cctype & gt; #include & lt; Vector & gt; # Include & lt; List & gt; Using std :: string; Using Std :: vector; Of vector & lt; Int & gt; V2 (10); (Auto i: v2) {if (i == 0) {std :: cout & lt; & Lt; V2.size () & lt; & Lt; Std :: endl; } Std :: cout & lt; & Lt; "Element Value" & lt; & Lt; (I) & lt; & Lt; "Is" & lt; & Lt; V2 [i] & lt; & Lt; Std :: endl; } So I only want to print the size once. Then print each element value that I know will be 0 by default. But it only displays "Element Value 0" 9 times. If you print the size of t...

ios - Timestamp (milliseconds) in Swift -

I am getting a creation date for an object in the database as milliseconds (in the era or by whatever value of milliseconds #) And would like to change it with a string in Swift! I think I would need a data type of CUNSoundLang? I'm trying something like this, but it produces wrong number: var test: CUnsignedLong = 1397016000000 println (test) // outputs 1151628800 instead! I think this is the wrong data type, so what would you recommend to everyone in such a situation? I was working in Java that was working for a long time, which was working. Thank you! 32-bit platform, CUnsignedLong is a 32-bit integer, which is 1397016000000 is not enough to catch the number. (This is different from Java, where tall is usually 64-bit integer.) You can use UInt64 or NSTimeInterval ( You can use NSDate methods, which can be used for double type ).

python - Removing words with CAPITAL letters in between -

मेरे पास ऐसे शब्द हैं: 'ओजजैनीटी', 'बराक ओबामा', 'फैलाने योग्यमैप', 'एमएच 17', 'एमएच 17' मैं पाठ को साफ कर रहा हूं जो कि कोटिंग भाषाओं के साथ हल्के से मसालेदार है मैं 'ओजजैक्टीयर' जैसे शब्द खोजना चाहता हूं जो निरंतर अर्थात् बिना किसी सफेद स्थान और कैपिटल अक्षरों के (जैसे कुछ कोडिंग भाषा टोकनों की तरह) के बिना। मैंने कोशिश की: re.search (r '\ w + [ AZ] + ', शब्द) जो उचित नाम भी ले रहा है मुझे भी परिणाम होना चाहिए: सच: 'objQuery', 'फैलाने योग्यमैप' किसी भी शब्द के बीच में कैपिटल अक्षरों वाले । शब्द अल्फ़ान्यूमेरिक वर्णों के साथ शुरू कर सकते हैं मैं पात्रों के माध्यम से लूप कर सकता हूँ और ऐसा करने के लिए एक बूलियन फ़ंक्शन बना सकता हूं, लेकिन मैं कुछ कम की तलाश कर रहा हूं। '' बराक ओबामा ',' एमएच 17 ',' MH17 ' मुझे लगता है कि आप इसके लिए खोज रहे हैं। \ b [Az] + (?: [Az] [az] +) + \ b & gt; & gt; & gt; S = "objQuery बराक ओबामा expandableMapF...

angularjs - Pass resolved objects into controllers defined by a string in angular-ui router -

I have a set of objects that can be solved using: solve I have a Controller is also I define it by giving it a string name, but I have to pass it in the solution items I know that this can be done: Resolution: {title: 'my contacts'}, administrator: work ($ radius, title) {$ scope. Title = 'my contact'; }} But I need to: Resolution: {title: 'my contact'}, controller: 'result editor'} How can I pass my controller in the 'title' in this sense? "Post-text" itemprop = "text"> Try it out ( it should work ): // state configuration ... {Resolve: {Title: function () {Return 'My Contacts'; }}, Controller: 'MyCtrl'} // Controller app.controller ('MyCtrl', function ($ radius, title) {$ scope.title = title; console.log ($ scope.title); // - & gt; ; 'My contact'});

android - Get pixels from bitmap, display them results in wrong order -

Image
I have just written some code that captures an image, it stores pixels in an array and every pixel Displays again, so the ending image should be shown. I took the following picture: This is a 32x32 png image that I have chosen to use as an example. This is my output: As you can see, the result is more pixels than 32x32. Here my code looks: First of all, an array was created, which should get all pixel notifications of the image: Private bitmap B = bitrive (getResources), undertroadable. Test); Private int = b.getWidth; Private int H = BGhatite; Private int pixels = w * h; Then I used a method to store the bitmap pixels in the array: b.getPixels (pixels, 0, w, 0) , 0, w, h); I thought it should be, now I can drag the pixels into my view: Public Waste On Draw (Canvas Canvas) {Super. Canvas); Paint P = new paint (); For (int i = 0; i I do not know what my error is, maybe someone can help me? Your algorithm is incorrect, and often a little bit of ...

php - array does not check the other array -

My code does not work, it does not check, what can I do? $ Ex_requests = explosion (',', "1,2"); If (in_array ($ ex_requests, array ('1', '2'))) {echo "OK"; } Else {exit; } blank page when you type as needle (first parameter, items to search) to in_array () , the haystack (second parameter, items to search) must be an array of arrays . In your case, the following will work: $ ex_requests = explosion (',', "1,2"); // In the next line, the first argument is an array / and the second argument is array of arrays ... if (in_array ($ ex_requests, array (array ('1', '2'))) {echo "ok"; } Else {Echo "Not OK";} This will print exactly as expected.

c++ - Argument name in function prototype -

In the form of an EF function declaration, three things are necessary i.e. Return value type The name of the function (argument type). But the logic name is not required when I remove the logic name ( arr [] [maxcols] ) from the function prototype ( void readMatrix (int arr [] [maxcols]) Why the program generates an error; ) In simple words. Read Zero Matrix (Antar [] [Maxols]); // OK and no error zero read matrix (int); // But this error generates an error when the argument name is not mentioned in the function prototype. Because is not related to [maxcols] For an announcement without the name, type: void f (int [] [maxcols]) and raw arrays are usually a poor choice. Use the std :: vector or std :: array .

time - Easiest way to do a millisecond countdown in C? -

What is the easiest way to count the milliseconds in C (minimum: seconds: milliseconds) and display it on the screen can go? To measure the exact time between screenshots, I need to execute the program in CMD prompt window and see the seconds. # include & lt; Sys / time.h & gt; Straight Timewall SS1, SS2; Ss1.tv_usec; // First timestamp gettimeofday (and ss1, NULL); // Type the screenshot capture code ss2.tv_usec; // Second timestamp gettimeofday (& ss2, NULL); Note that tv_usec will give you time in Microsecond and 1 millisecond = 1000 microsounds . Check for other similar solutions.

mysql - Fatal error: Call to undefined function mb_detect_encoding() in C:\inetpub\wwwroot\phpMyAdmin\libraries\php-gettext\gettext.inc on line 177 on IIS 8 -

I'm trying to set up phpMyAdmin on IIS 8 (running on Windows 8) to work with MySQL I am I downloaded the English version from the website, and removed the main files at C: \ inetpub \ wwwroot \ phpMyAdmin. Whenever I try to launch the configuration page from the local host, I get the following error: Fatal error: Undefined function in C: \ inetpub \ wwwroot \ phpMyAdmin \ library \ php Call mb_detect_encoding () - JetExtex \ gettext.inc on line 177 I have tried the solution, and when I get permission to use phpMyAdmin, let me out of my pages One gets a 500 error, in which only one is the original php / html Letters I'm using PHP 5.4.30 and phpMyAdmin 4.2.6.

objective c - What is the difference between declaring a member in the extended interface versus in the implementation? -

I think I was really looking for two very different behaviors for the same. Define my personal members in this class extension: @interface class A () @ property classbie * b; @xm @ interpretation class - (classa *) init with class B: (classby *) newbie {self.b = newbie; Self return; } - (class B *) getB {return self.b; } or define my personal member in such a class implementation: @interface sqi (@ @ @ @ applyingment class A class B * B; - (Classes *) initWithClassB: (Class B *) newB {b = newB; Self return; } - (Class B *) getB {return b; } The way I am using this code, I create classbie objects, initialize class objects with classb objects, and then add class objects to variable colors - (zero) init {self.classAList = [[NSMUTABARARROL] INIT]; [Self. Classist Aid Object: [[Class A Alok] Initwthclass B: [Self Built Class B1]];; [Self. Classist Aid Object: [[Class A Alok] Initwathclass B: [Self-Made Class B2]];; [Self. Classlist Aid Object: [[Class ALLO] Initwthclass...

ios - Displaying A PFUser's Objects -

Image
मेरे पास तीन विचार हैं पहला दृश्य PFUsers में PFQueryTableViewController वस्तु क्लाइंट के साथ प्रदर्शित करता है। उपयोगकर्ता PFUser पर दबा सकते हैं, तो यह ग्राहक ऑब्जेक्ट पर जानकारी के एक गुच्छा के साथ विस्तार से दृश्य दिखाएगा। मेरे पास एक बटन पॉइंट्स होता है, जिसे मैं उन बिंदुओं को दिखाने का प्रयास कर रहा हूं जो क्लाइंट ने उस सीजन में बना दिया है, यह उसका स्वयं का ऑब्जेक्ट है पॉइंट्स मैं यह सब PFQueryTableViewController में दिखाना चाहता हूँ तो मैं क्या कर रहा हूं, यह दिखा रहा है कि PFUsers बिंदु वस्तु पिछले PFQueryTableViewController में दिखा रहा है। यहां बताया गया है कि स्टोरीबोर्ड में यह कैसे दिखता है (मुझे पता है कि यह भ्रामक लग सकता है, इसलिए मैंने छवि को जोड़ा) यहां मैं ग्राहक वस्तु प्राप्त करता है: - (id) initWithCoder: (NSCoder *) aCoder {आत्म = [सुपर initWithCoder: aCoder]; यदि (स्वयं) {// कस्टम तालिका / // self.parseClassName = @ "ग्राहक" पर क्वेरी करने के लिए className; // डिफ़ॉल्ट सेल शैली self.textKey = @ "name" के लेब...

java - ScheduledThreadPoolExecutor executeNow(); -

If a button is pressed, then how do I tell Scheduled Extra Accelerator to execute my work? For example, if I have something like this: sht.scheduleAtFixedRate {New Runnabel} {@Override Public Zero () {method1 (); Method2 (); Method 3 ();}}, 0, 5, time unit MINTES); The methods that are within sht will be executed every 5 minutes but what I have to do is to run them "now". I can not call methods because there are some reasons. I want something like this: sht.executeNow (); base execute () method executable Interface allows queued work for immediate execution. You should keep in the context of the scheduled Runnabel work and submit it for immediate execution on the click of a button. If you want to reset the scheduling after clicking the button, you can do the last Runnable delete the task With the method being remodeled it is being scheduled again, in that case, the execute () method will not be required because you get an immediate executi...

exception - java.nio.channels.ClosedChannelException -

I am working with Neo (non blocking mode). When the server stops, and I am getting the following exception: java.nio.channels.ClosedChannelException . P> Every 1 second, I am trying to connect to the server (via connect method) and get the same exception: java .nio.channels.ClosedChannelException . The server is up, I'm getting the same exception and can not connect to the server. I do not understand why the server is getting an exception after the server is started? How do I resolve this, (How can I try to reconnect to the server?) Thanks socket channel is closed. You have closed it in your code, and then have continued to use it. Or perhaps you can ignore ConnectException .