Posts

Showing posts from July, 2011

Implement counter prolog -

I am developing a board game in PROLOG and to make the interface more entertaining for the user, I decided to add A grid (0-> 4) with the coordinates as shown below: 0 1 2 3 4 --------- 0 | X x x x x 1 X o o o 2 O x o x x3 X x oo4 O x x x After developing some code, I came up with an issue about the counter for vertical coordinates when I hit the counter index + 1 , Then the status quits immediately after applying the rule given below: printgrid: -% writes only horizontal grid ('\ t (write), Write (0), write (''), write (1), write (''), write (2), write (''), write (3), write (''), write (4), nl , Type ('\ t'), Write ('------------------'), nl printbauer ([head | tail]): - index = 0, index index + 1,% stops here - ---------- Write (''), write (index), write ('|'), write (''), print rou (head), printbauer (tail). PrintBoard ([]) Print Rou ([Head | Tail]): - Write (Head), Write (''), Pri...

jquery - Apply same function in data-rel order -

I have several objects that I delays () and want to apply. Fidine () function but the function needs to be applied in the order of data-reliance numbers. In addition, I need to delay the increment of 100 for each object ... Here is a worksheet. I want to delay it with the requirement of data-rel = "1" with 0 data-rel = "2" ; Div class = "feedin" & gt; & Lt; P class = "m" data-relay = "1" & gt; 1 & lt; / P & gt; & Lt; P class = "m" data-relay = "3" & gt; 2 & lt; / P & gt; & Lt; P class = "m" data-relay = "2" & gt; 3 & lt; / P & gt; & Lt; / Div & gt; script: $ (".me") .hide (); $ (".me") .each (function () {$ (this) .delay (0). FadeIn (500);}); simply calculate by value in delays Code> Relay $ (".m"). Each (function () {var el = $ (this), rel = el.data ("rel...

php - how to ajax GET data on already data that received as ajax -

Hello friends, sorry if my question is tired. This is my problem. is a simple search bar that lists the records matched in Ajax, i.e. personal details. To show the complete database information of specific fields from the database with the save record, there is a field called "see more" here I get the results to get the ID values ​​to get on your anchor tag GET I am using So my question is how to use more links as an AJAX request to get results. You have to make an AJAX call and the ID will show details. One approach would be Now in JS $ ('. Readmore'). ('Click', function (e) {e.preventDefault (); / / link to Href href = VAL = $ (this) .attr ('href'); // Request an acquisition Get $. Get ( LinkVal, function (data) {// Create some containers where you will display full details $ (".result") .html (data);});}); That's it, hope it will help you in the right direction and will point you to

php - Symfony2 count visited sites per user -

I'm trying to count how many pages the user visited during their login. I have created a service that is listening to the kernel :: termininate event that goes to a user at another site at all times System class ActivityListener applies EventSubscriberInterface {Personal $ principle; Private $ session; Public function __ composition (Registry $ principle, session $ session) {$ this- & gt; Theory = $ principle; $ This- & gt; Session = $ session; } Public stable work receiving memberships () {Returns array (kernel events :: Terminatet = & gt; Increase PageGrak '); } Public Function Increase Page Count () {$ em = $ this- & gt; Theory-> GetManager (); $ Log = $ em- & gt; GetRepository ('bundle: userlog') - & gt; Search (array ('sessionId' =>> $ this-> session-> getId ())); If ($ log) {$ log = $ log [0]; $ Log- & gt; IncreasePageCounter (); // The number of jobs in the unit increases by $ em- & gt; Continues ...

Customizing action bar in android shows default action bar first -

I am new to Android, while while customizing the action bar, I saw that it was the first old (default) action bar Shows first, it shows the customized action bar. Also, I want to set the text color for the title of action bar. My code snippet is public class MainActivity ActionBarActivity Extension (MenuItem searchItem; Search View Searchview; @ Override Protected Zero to Create (Bundle Saved Instantstate) {Super.Nocrat (Saved Instantstate); Actionbar AB = MillSport ActionBar (); ab.setTitle ("Amendment"); ab.setIcon (R.drawable.ap); Ab.setBackgroundDrawable (New ColorDrawable (Color.parseColor ("# 00AA00")); ab.setSubtitle (" Amendment "); setContentView (R.layout.activity_main); I think there should be some stupid mistake. please Try it out .. Create a Theme.xml as & Gt; & lt; Item Name = "Android: Actionbarstyle" & gt; @ Style / MyActionbar & lt; / item & gt; & lt ;! - Other activity and action bar ...

performance - Compare two cell arrays for identical rows - MATLAB -

I have a cell string matrix with lines 40,000 and a 400 . I need to find the row (rows) in the first matrix which corresponds to the second . Please note that there may be several recursive. It looks like: 40,000 lines like Anna Frank Anna George Jane Peter Anna George Jane Peter etc. Here I got the advanced George Jane Peter The only way was to find two For between functions and a if but it is quite slow: for i = 2: size: big size, 1) For j = 1: size (small, 1) if zodiac (member (large table (i, 1: 2)), smallest (j, 1: 2))) == 2 total_r (size (total_r, 1) + 1,1) = i; Finally end I assume that your input is set in this way - '' '' Anna '' Frank '' Anna '' George '' Jane '' Peter 'Anna' 'George' 'Jane' 'Peter' 'Little' 'Anna' 'George' 'Jane' 'Your To solve the case, two methods can be suggested here. Approach # 1 ismem...

Java Compilation task and classpath option not working -

I was trying to create a class to compile some .java that I will create on runtime, but not me You can get it to work properly. This is my code file bin = new file (Args [args.length-1]); System.setProperty ("java.home", "C: \\ Program Files \\ Java \\ jdk1.7.0_60"); JavaCompiler Compiler = Toolpace .getSystemJavaCompiler (); Standard Java File Manager Levelsfile Manager = compiler.getStandardFileManager (empty, null, empty); {StandardJavaFileManager.setLocation (try the standard location. CLASS_OUTPUT, arrays.asList (bin)); } Hold (IOException e) {System.err.println ("invalid bin directory"); E.printStackTrace (); } List & lt; String & gt; Option = New Arreelist & lt; String & gt; (); Options.add ("- Xlint: uncontrolled"); Options.add ("- classpath"); Options.add ("e: \\ ParentProject.jar"); Println (option); Collection Task Compilation Task = Compiler.Titask (blank, standardJW file manager, blank, op...

angularjs - angular service call error: net::ERR_INSECURE_RESPONSE -

मुझे त्रुटि मिल रही है net :: ERR_INSECURE_RESPONSE जब मेरी स्क्रिप्ट को कोणीय मेरी WCF सेवा का उपयोग करने की कोशिश करता है तरीका। इसे काम करने के लिए, वेबसाइट पर पहुंचने वाले हर ब्राउज़र को एजेक्स कॉल में इस्तेमाल किए जाने वाले यूआरएल को खोजने और मैन्युअल रूप से अपने विश्वसनीय साइट्स पर प्रमाण पत्र जोड़ना होगा। क्या एक वास्तविक प्रमाण पत्र खरीदे बिना इसे स्वचालित रूप से पूरा करने का कोई रास्ता नहीं है? & lt;? Xml संस्करण = "1.0"? & Gt; & LT; क्रॉस-डोमेन-नीति & gt; & Lt; साइट नियंत्रण अनुमति-क्रॉस-डोमेन-नीतियों = "मास्टर-केवल" / & gt; & Lt; अनुमति-पहुंच-से डोमेन = "*" / & gt; & Lt; allow-http-request-headers- से डोमेन = "*" हेडर = "*" / & gt; & Lt; / क्रॉस-डोमेन-नीति & gt; फिर भी वही त्रुटि मिली net :: ERR_INSECURE_RESPONSE निम्न शीर्षलेख भेजे गए हैं एक्सेस-कंट्रोल-अनुमति-मूल: * एक्सेस-कंट्रोल-अनुमति-पद्धतियां: प्राप्त करें, प्रवेश-नियंत्रण-अनुमति दें-हेडर: प्राप्त करें...

playframework 2.0 - Issue in using securesocial-master SNAPSHOT jar with play activator application that uses jdk 1.6 for compilation -

I am using securesocial_2.11-master-SNAPSHOT.jar in my play application . My application was first successfully compiled using jdk1.7. Now I will have to use jdk1.6 in my application. So while compiling the applications that come under error by using the "activator compile" command it seems that securesocial-master has been compiled with jdk1.7. How can I use the securesocial master jar in the application of play that uses jdk1.6? [warning] Error reading API class file: java.lang.UnsupportedClassVersionErro r: securesocial / core / java / baseUser Service: Unsupported key. Minors version 51.0 java.lang.UnsupportedClassVersionError: securesocial / core / java / safety action: U nsupported major.minor version 51.0 at java.lang.ClassLoader.defineClassCond on Java.lang.ClassLoader.defineClass1 (Basic Law) (ClassLoader.java: 631) on java.lang.ClassLoader.defineClass (ClassLoader.java:615) on java.security.SecureClassLoader.defineClass (SecureClassLoader.java14

ios - Converting nsstring to macro (#define) -

इस सवाल का पहले से ही एक उत्तर है: 7 जवाब मुझे सर्वर से प्राप्त होता है निम्नलिखित JSON: {..... "id": "predifined_id", ...} कोड में मेरे पास एक int Predifined_id के लिए परिभाषा: #define predifined_id 5 जिसका अर्थ है कि यदि मैं कोड में predifined_id का उपयोग करता हूं तो इसे int = 5 में अनुवाद किया जाएगा। मैं JSON को पार्स करने के समय यह मान कैसे प्राप्त कर सकता हूँ (5)? ​​ मैंने JSON को NSDictionary में कनवर्ट कर दिया है, लेकिन उस मूल्य के लिए जो मुझे प्राप्त होता है @ "आईडी" कुंजी NSString मेरे कोड में मैं इसका उपयोग करता हूँ : एनएसआईएनटेगर पूर्णांक वैल्यू = [डीसी [@ "आईडी"] पूर्णांक वैल्यू];

php - How to get arrays difference -

मेरे पास 2 बहुआयामी arrays है। Array1 उपलब्ध नामों में से कुछ: Array1 ([0] = & gt; अर्रे ([मात्रा] = & gt; 13 [idname] = & gt; 3 [x_name] = & gt; नाम -3) [1] = & gt; सरणी ([मात्रा] = & Gt; 5 [idname] = & gt; 4 [x_name] = & gt; नाम -4)) और उपलब्ध सभी नामों वाले Array2: Array2 ([0] = & gt; Array ([id_x] = & gt; 3 [x_name] = & gt; नाम -3 [id_l] = & gt; 4) [1] = & gt; अर्रे ([id_x] = & gt; 4 [ X_name] = & gt; नाम -4 [आईडी_एल] = & gt; 8) [2] = & gt; अरे ([id_x] = & gt; 5 [x_name] = & gt; नाम -5 [आईडी_एल] = & gt; 7) [3 ] = & Gt; अरे ([id_x] = & gt; 6 [x_name] = & gt; नाम -6 [आईडी_एल] = & gt; 5) Array1 [] [idname] = Array2 [] [id_x] और Array1 [] [x_name] = Array2 [] [x_name] (ofc ...) P> मेरी इच्छा आउटपुट Array2 से प्रत्येक तत्व होगा कि Array1 में ऐसा नहीं है ... इसलिए: Arraydesire ([0] = & gt; अर्रे ([id_x] = & gt; 5 [x_name] = & gt; नाम -5 [आईडी_एल] = & gt...

php - XML to wordpress real estate website -

I want to integrate into Jupiks website your WordPress Ristet website and I uploaded via XML feed Jeepiks . This is a demo API I demo wants to address me that will be integrated into the WP website and put it in a property list will be like Thank you you can use such $ xmlparseado = simplexml_load_file ( 'http://services2.jupix.co.uk/ API / get_properties.php clientid = 35871cc1b6d9ec6237aaaf94aa0e0836 & amp ;? phrase = cvYG9f'); Echo "& lt; east & gt;"; Print_r ($ Ksmlprsedo); Echo "& lt; / pre & gt;"; Go out;

html - Echo drop down list in a PHP Form -

I'm trying to display my drop-down list in my PHP form, but when I open it on the browser I am blank page, I have tried to open the page by removing the list and it runs properly. I tried to run the drop down list code independently and it runs properly. I have examined more codes, but there is no benefit. The form is in a function as shown below: function showForm () {included ("library / daloradius.conf.php"); Enfo "& lt; b & gt;" $ ConfigValues ​​['CONFIG_SIGNUP_MSG_TITLE'] "& Lt; / b> Form Name = 'Signup' Action = '" $ _ Server [' PHP_SELF ']. "Method = 'post' & gt; & lt; table & gt; & lt; tr & gt; & lt; td> & lt; b & gt; first name: & lt; / b & gt; & lt; ; / Td> & lt; td & gt; & lt; input type = 'text' value = 'conference' name = 'firstname' /> & lt; / td & gt; & lt; / tr & Gt; ...

java - Multidimensional array column swap -

There are no numbers after identifying that element in a specific column of a multi-dimensional array. Two columns array of this multidimensional array. Actually I would like to swap the content of column 6 in column 6 with those people, after determining whether the elements in column 6 are or not, so if the element number of column 6 Let's create a new array and insert the old array content in the new array, but once the column moves to the fourth column of the old array, it gives this element the 6th column of the new array and vice versa. . I have been able to successfully identify the attempts given below about the attempts given below that the elements of my column 6 are or not, in the 6 me now, with the people swapping the elements in 4 There is doubt about logic. //! & Lt; Public String [] [] sortedByDateUsageStatsData (String [] [] unsortedUsageStatsData) {System.out.println ( "\ nbtnUsageStats - [sortedDateUsageStatsData (string []] unsortedUsageStatsD...

oauth 2.0 - Why would OAuth2 authorization code be given without displaying the login UI? -

Consider the sample OAuth2 flow: We go through OAuth2 authentication for a web server app. Sending authorization code request - The user is presented with the "Login" UI. After that he exchanges credentials - we get the authorization code and it is used for access / refresh token. Suppose that its token has a commercial reason to re-authenticate the user before the expiration is over. For this - the authorization code request is reissued - although at present this "login" UI and new authorization code is given without user input. Why is it like this? Why does this happen? Is it stored in some state customer's browser? This means that the OAuth server thought that the user has already logged in and re-authenticated Can be left. Therefore, some states may be cached on your browser for login session. If the Oath Server supports OpenID Connect, try adding the 'prompt = login' parameter to the authorization request and you will always see the l...

Android Keystore Provider - How to store an API key -

Text after " In my Android app, I have an API token that I received from an HTTP request I Some research done, and, it seems to be the best way to store this key, with the Android keyStore provider. I had a look at documentation But since I am new to Android and with programs in general, I need some help in that place to put I'm sure the key in which I should save, not the key. calendars calorie = Calendar.getInstance (); Date now = cal.getTime (); Cal.add (Calendar: IEER, 1); Date expiry = cal.getTime (); KeyPair Generator kpg = KeyPairGenerator.getInstance ("RSA", "AndroidKeyStore"); kpg.initialize (New KeyPairGeneratorSpec.Builder (getApplicationContext ()) .setAlias ​​(nickname) .setStartDate (now) .setEndDate (end) .setSerialNumber (BigInteger.valueOf (1)) .setSubject (New X500Principal ( "CN = test1 ")) .build ()); Kipier KP = kpg.generateKeyPair (); Then how should I retrieve the following code using the key, (I think): ...

php - Sorting array with dates with asort() does not work properly -

यह क्रमबद्ध सरणी है, प्रारूप में dd-mm-yyyy: array (6) {["7-0"] = & gt; स्ट्रिंग (10) "28-04-2014" ["7-1"] = & gt; स्ट्रिंग (10) "29-04-2014" ["7-2"] = & gt; स्ट्रिंग (10) "30-04-2014" ["7-3"] = & gt; स्ट्रिंग (10) "01-05-2014" ["7-5"] = & gt; स्ट्रिंग (10) "26-04-2014" ["7-6"] = & gt; स्ट्रिंग (10) "27-04-2014"} अब मैं सॉर्टिंग का उपयोग कर रहा हूं: array (6) {["7-3" ] = & gt; स्ट्रिंग (10) "01-05-2014" ["7-5"] = & gt; स्ट्रिंग (10) "26-04-2014" ["7-6"] = & gt; स्ट्रिंग (10) "27-04-2014" ["7-0"] = & gt; स्ट्रिंग (10) "28-04-2014" ["7-1"] = & gt; स्ट्रिंग (10) "29-04-2014" ["7-2"] = & gt; स्ट्रिंग (10) "30-04-2014"} मूल्य के आधार पर सरणी को क्रमबद्ध करने के लिए asort () का उपयोग करके, लेक...

array slicing in php -

मेरे पास एरे से नीचे है: - सरणी ([adate] = & gt; [ ip_address] = & gt; [atime] = & gt; [self_fname] = & gt; hjhbhj [self_mi_nm] = & gt; BJB [self_last_nm] = & gt; bb [self_preferred_nm] = & gt; bbjhb [patient_is1] = & gt; 1 [party_fname] = & gt; TGN [party_mname] = & gt; [party_lname] = & gt; gn [party_str1] = & gt; [party_apt1] = & gt; [party_city1] = & gt; [pt_str1] = & gt; [pt_apt1] = & gt; [pt_city1] = & gt; [pt_state1] = & gt; [pt_zip1] = & gt;) मैं "पार्टी _" के साथ 2 सरणी में इस सरणी विभाजित करने के लिए और चाहते हैं "pt _" । उत्पादन नीचे तरह होगा: - सरणी ([party_fname] = & gt; TGN [party_mname] = & gt; [party_lname] = & gt; gn [party_str1] = & gt; [party_apt1] = & gt; [party_city1] = & gt;) सरणी ([pt_str1] = & gt; [pt_apt1] = & gt; [pt_city1] = & gt; [pt_state1] = & gt; [pt_zip1] = & gt;) क्या कोई मुझे इस को हल करने में मद...

sql - How to update a table copy in another database -

I have two similar databases - one for development (DEV) and one for production (PROD) (both SQL Server 2008 ). I updated the content of a certain table in DEV and now I want to sync the related table in PROD. I have not changed the table schema, only some data inside the table (I have changed both existing rows and added some new rows). How can I move changes easily in the related table in DEV in Prodi? Note that the values ​​of the auto-detect column mgiht do not match exactly between the two tables, however, I know that I only made changes in the row with the same value in the second column. Martin if you do not want to use replication , You can update, update the trigger in the DEV database, and trigger the PROD by triggering. Or you can create a view of the DEV database table on the PRO database database.

c# - How to load an XML Document to display as specific input format -

I am currently trying to load a CM program in a CM program so that I can do it as a soap request Can send Here is the XML document that I am trying to reference. It has a potential endless row. & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Rowset & gt; & Lt; ROW num = "1" & gt; & Lt; USER_ID & gt; & Lt; / USER_ID & gt; & Lt; FIRST_NAME & gt; John & lt; / FIRST_NAME & gt; & Lt; MIDDLE_NAME & gt; & Lt; / MIDDLE_NAME & gt; & Lt; LAST_NAME & gt; Do & lt; / LAST_NAME & gt; & Lt; EMPLOYEE_NO & gt; 12345 & lt; / EMPLOYEE_NO & gt; & Lt; HOME_PHONE & gt; & Lt; / HOME_PHONE & gt; & Lt; EMPLOYEE_STATUS_ & gt; & Lt; / EMPLOYEE_STATUS_ & gt; & Lt; HIRE_DATE & gt; 05/17/2010 and lt; / HIRE_DATE & gt; & Lt; Department & gt; Engineering & lt; / Department & gt; & Lt; POSITION & gt...

amazon ec2 - Connect to Redshift from Rackspace -

I need some help in trying to connect to my redshift cluster from a rackspace box. I can connect properly to my ec2 instances and to my local machine. I checked (and checked again) and verified all the connection parameters and they work fine in my code, only the difference is in the environment, that is, when I try to connect to my ec2 example, this is fine Works, but when I try to connect with my rackspace box, I get the following error DB failed to connect to the server failed: the connection was too Is running on ended the Host "my_redshift_cluster_host_name" (Clstr_ip) and accepting TCP / IP connections on port & lt; Cluster_port & gt; In the Amazon Console, under Security, in your security group, in your security group, you check that you have added a backspace box under Public IP (CIDR / IP). You have to authorize Public IP for the RK Space Box.

Python optimization with big numbers -

I want to print all the prime numbers with 10000000000 with fewer than 7 hundreds 7. I was using category () while using MemoryError because the generated array could not be archived, so I used to loop the while Turned into loop. However the program is really slow. It takes more than a minute to print the first number. Import Maths Def is_prime (n): If n% 2 == 0 and n> 2: return I = 3 while I & lt; For Math.sqrt (n) + 1: # range (3, int (math.sqrt (n)) + 1, 2): if n% i == 0: return wrong I + = 2 Return True def is_super_happy ( N): Count = 0 while n! = 0: if n% 10 == 7: count == 1 if count == 7: return is true: calculation = 0 n / = 10 return number ==7 i = 7777777 while I & lt; For 10e10: # range (7777777, int (10e10)): if is_super_happy (i) and is_prime (i): print ii + = 1 I can not talk about anything It can run fast, and I want it to be very fast. Any ideas, suggestions? two suggestions: 7e777777 code> directly (instead of checking ea...

c++ - time since epoch to string using boost -

स्वत: समयआसोपोक = बढ़ावा :: क्रोनो :: अवधि_कास्ट :: बढ़ावा :: chrono :: microseconds & gt; (बढ़ावा :: chrono :: steady_clock :: अब () time_since_epoch ()) गिनती ()।। बढ़ावा :: posix_time :: ptime अब (बढ़ावा :: ग्रेगोरीय :: दिनांक (1, 1, 1), बढ़ावा :: posix_time :: microsec (static_cast & lt; std :: int64_t> (timeSinceEpoch))); Std :: string str = boost :: posix_time :: to_iso_string (अब); आउटपुट: 19700114 टी 232422.133653 जो यह गलत है, मैं क्या कर रहा हूं? कुछ सिस्टम पर, स्थिर_क्लॉक का युग बूट से नैनोसेकंड होता है। # शामिल करें & lt; boost / date_time / gregorian / gregorian.hpp & gt; # शामिल करें & lt; boost / date_time / posix_time / posix_time.hpp & gt; # शामिल करें & lt; boost / chrono.hpp & gt; #include & lt; स्ट्रिंग & gt; # शामिल करें & lt; iostream & gt; Int main () {boost :: posix_time :: ptime const time_epoch (boost :: gregorian :: date (1970, 1, 1)); ऑटो एमएस = (बढ़ावा :: posix_time :: microsec_cl...

criteria - Trying to use update query to only update fields that are blank in Microsoft Access -

I am trying to use an update query to update the fields for the field, but Only then if the fields in the table that I'm updating in are empty, then I do not want to overwrite the existing data like field: Name table: Update Table 1: [Table 2.] [Name] Criteria: I agree that in the benchmark What to put in I tried, like "tap" like "". Here's an example: Update MyTable SET MyTable.FieldB = " MyNewValue "WHERE (MyTable.FieldB) is faucet));

ruby - Rails - Export DB to CSV not reading from translation file -

I have seen many useful suggestions here but my problem has not been corrected so far. I am making a redin plugin (Ruby on Rail) and I have a button which exports DB to a CSV file. This part works just fine My problem is that the column names in the CSV file are not being translated, it seems that the call has not been changed from human_attribute_name . Does anyone tell me where I've gone wrong and can help me fix it? I have followed this tutorial primarily: AP / model / person.rbi def self.to_csv (option = { }) CSV.generate (options) do | Csv | CSV & LT; & Lt; User.attribute_names.map {| C | User.human_attribute_name (c)} # I can use instead: # csv & lt; & Lt; User.human_attribute_names User.all.each | User | CSV & LT; & Lt; User.attributes.values ​​end end end config / locales / en.yml en: activerecord: attributes: user: col1: "column 1 "Col2:" column 2 " found this solution that works: AP / Modal / UserRb ...

git - How Do I Properly Configure Feature Branch CI with TeamCity -

Image
I am currently trying to make this issue difficult for me, and only to work with the default branch We have got the following branches in our repositories: Master, Daily-Build, Branch-Alex, and other similar names. I very much like this that the build configuration should run on the run in which the master does not include some of my configuration pictures: VCS Route: trigger settings : Current build config: T L: DR - Does the facility have a better tutorial to set up branch team city? Bonus Points - How can I name just "branch name" instead of "referee / head / daily-build"? Then, my problem was a simple typo: +: Ref / head / * should be written as +: refs / head / *

c# - WCF Service Call - Only Partial Parameters On Timeout? -

I have a WCF web service and I am facing a strange problem. One of our vendors is calling us a method and claims that we need to send 3 good parameters. The first method is that the value of all our incoming standards is logged in our database. When I look at the log message, I see a population of only two parameters. The vendor claims that the method is out of time before the third parameter is sent. I was under the impression that if the method has expired, then we will see an exception, not a complete execution of the Web method with some missing parameters. Is the seller correct? Are we ending the deadline and are still executing the method with the parameters? Thank you WCF message is based, it means that the whole message was created and You have been sent a partial list of criteria, in other words the criteria will be completely completed before your service method has been implemented. Answering questions with questions is not difficult to fully understand, but y...

ms access - Update Calculated [Field] Base on the status of a Separate Table -

I have to change the value of a calculated field based on the result from a different table. I have made a small fake DB (attached) to highlight my problem .. When the database is open I want to show on the first screen if all training is done for each employee "calculated area ". I have 5 employees. Each employee must have 5 (or more) training. All training should not end time If any training is finished, change the calculated field value to "good" if If all training has not expired, then change the calculated field value to "all good" I have no idea about the perspective of this scenario, do I have to store this value To create a separate "floating table" Need Help? The database found here: I can not link pictures or more than 2 links so please see: This is my query. SELECT Training.ID, training. EmployeeID, employee Name, training. Training. Training, training Training, training Include employees due to being less ...

android - App crashing while trying to display a Toast on AlertDialog button click (in a Fragment) -

I'm trying to create a DialogFragment contaning a warning dialogue. There is an interface in which there is a method which should be called by pressing the Cancel / OK button of the dialog. The problem is now that when I have a toast on the user OK / cancel I want to display Mac text, but I do not know in which context this toast should be given, not to crash it. My app crashes when user clicks on the dialog button and I think the context is causing exception: piece of class: public class AlertDFragment DialogFragment extension Does {dialogListener ds; Context associated; Public interface dialog writer {OK on OK (reference C); Public Zero (Reference C) on Cancellation; } @ Override Public Dialog on Critical Dialeg (Bundle Saved Instances) {Builder B = New Alert Dialogue. Builder (getActivity ()); B.setIcon (R.drawable.abc_ic_search); B.setTitle ("DialogFragment Example"); B.setMessage ("Choose an option"); Basset Poitative Button ("OK", New ...

sql server - PDO dblib get result from stored procedure -

I have problems in getting results from the stored procedure on MSSQL Server 2012. PHP 5.4.34, dblib, PDO Using CentOS Aianaiti: $ this- & gt; PDO = new PDO ( 'Dibibi: host = 88.88) I am on my dev where I use everything sqlsrv extension for PHP is fine. .88.88; dbname = dbName ', $ connection [to' login '], $ connection [']); or call the process: $ sqlStr = "DECLARE @price decimal (15, 4), @ Aryuestiel Tinint, @ Ar_mess varchar (1000 ), @act_list char (16), @act_list_poradi smallint; EXEC [dba]. [Get_price] @arg_id_cust = ?, @arg_cislo_nomenklatury = ?, @arg_mnozstvi = ?, @ Arg_id_mj = ?, @typ_param =?, @ value = @ Price OUTPUT, @ resutl = @resutl OUTPUT, @err_message = @err_message OUTPUT, @act_list = @act_list Output, @act_list_poradi = @act_list_poradi OUTPUT; SELECT as @price "; $ Sth = $ this- & gt; Kppso- & gt; Ready ($ sqlStr); If ($ sth) {$ sth- & gt; Bindamparam (1, $ idCust); $ Sth- & gt; Baidam Parm (2, $ idNomen...

ruby on rails - week_field gives wrong week after serialization and deserialization -

I am using the week_field assistant to generate a week's picker in a form. When I select a week and submit it, my controller gets the correct sequential week (like '2014-W03'), which I can convert to a date object. It all works, but when the date is released again, it always gets less than 1 (as it would be '2014-W02'). def format_date (value) value.try (: strftime, "% yw% w") serializes and it does not seem encoding when the date is parsed. In addition, parsing is followed and serialized on this date which is eaten for this unsuccessful result: irb> date. PRSE ('2014-W03'). Strawptime ('% w-w% w') = & gt; "2014-W02" Any thoughts that are happening here or how can I understand how it can be done? I hate to make an extra +1 at number of weeks or if there is a cleaner path, change the week_field format_date definition with: % w - week number of the year . Week starts with Monday (00..53) It seem...

jquery - JavaScript Site - Countdown Timer -

I'm looking for a timer that starts a countdown timer until you change the page, the code is ok Works Timer runs through the loop and the timer starts again. Ideally I want to countdown the timer regardless of the page on the whole domain. In addition, if $ sessionDecline is clicked I want to be applied 10 minute timer, otherwise the $ sessionAccept 5 minutes to return to the homepage with a counter. SessionTime = 2000, tickDuration = 1000, $ sessionAccept = $ ('# session - accept'), $ sessionDiskline = $ ('# session - declines') on ; If (Modernizr.localstorage & amp; lscache.get ('sessionActive') === tap) {var myInterval = setInterval (function () {SessionTime = SessionTime - tickDuration}, 1000), myTimeOut = setTimeout (SessionExpireEvent, SessionTime); } And if (Moderni.Local storage & amp; amp; lscache.get ('sessionActive') === true) {session = 6000; On myInterval = setInterval (function () {SessionTime = SessionTime - tickDurati...

python - Django Rest Framework not returning all fields after creation -

Summary: I am using Django Rest Framework to create a simple object (shown below) in the serial, I am only taking the required field, however, I am not getting all the fields back in POST answer (like ID, Construction_date etc.). I'm only getting the fields for non-reading. Please help: model class document (models.Model): owner = model.teaserfilled (zero) = false) Description = Modlkkarfild (max_length = 512, blank = true) made = time = Modlkdetafailfild (auto_now_add = true) update_time = Modlkdetafailfild (auto_now = true) expiry_time = Modlkdetaimfild (blank = true, blank = True) Position = Model. Terfield (max_length = 128, empty = true) Size = models.IntegerField (empty = True) type = models.I ntegerField (max_length = 128, null = true) Siriylijhr class DocumentCreateSerializer (Read_only_fields = ( 'id', 'owner', 'created_time', '', '', 'Update_time') See class DocumentViewSet (viewsets.ModelViewSet): ... ...

angularjs - Angular update object in array -

I want to update an object within an object array. Is there any other possibility to update the one running and matching on all things? The current code looks like the following: Angular Module ('app'). Controller ('MyController', function ($ scope) {$ scope.object = {name: 'test', objects: [[id: 1, name: 'test1'}, {id: 2, name: 'test2'} }} $ Scope.update = function (id, data) {var object = $ scope.object.objects; (var i = 0; i There are several ways to do this: Your situation is not very clear. -> You can pass an index instead of an id. After that, your update function will be as follows: $ scope.update = function (index, data) {$ Scope.object.objects [index] = data; }; -> You can use ng-repeat on your view and you can tie object elements into input elements. & lt; Div ng-repeat = "item in object.objects" & gt; ID: & lt; Input ng-model = "item.id" /> & Lt; Br / & gt; Name: ...

c++ - SDL2 Loading screen/thread -

Hi fellow programmer, Try to get the loading screen in SDL2 to spend time at the end After that, we failed to do this. We are building a simple 2D open world's top-down, for which we have created a lot of tiles / spray for various institutions (rabbits, trees, rock etc.) Need to load At first we had only one tile set, h Indicating included trees and background tiles now, however, the map spread out a 'sample' 50x50 tile-map to 1500x1500 tile-map. Result: The game seemed to be stationary, but it was loading instead of tiles / images. Our solution: Create a loading screen where we can show the current loading progress. Since our game uses state-pattern for gamestats (or to some extent it likes), we will have a playstate and a loadstate. We decided to use a regular stud :: thread to load all the data necessary and convert them into texture. One thread really does, this is: Read a JSON file, with data for our map Process data for retrieval Load images and c...

python - PIL in py2exe: 'no module named Image' -

मेरे पास काम करने वाली अजगर-स्क्रिप्ट है जिसमें छवि से तकिया इस तरह से आयात किया जाता है। इस तरह: 'पीआईएल आयात छवि से' py2exe का उपयोग करने के बाद और किसी भी तरह पीआईएल सहित अन्य लाइब्रेरी, अनुकरण त्रुटि उत्पन्न होती है: 'छवि का कोई मॉड्यूल नहीं है' अन्य सभी पुस्तकालय काम लगते हैं। I पहले से ही इस समाधान को मिला: लेकिन यह मेरी समस्या को ठीक करने में प्रतीत नहीं होता है। क्या PY2exe को 'छवि' और अन्य सभी आवश्यक हिस्सों को तकिया से शामिल करने के बारे में बताने की संभावना है? धन्यवाद आप पहले से ही, निको आप अपने py2exe सेटअप विकल्पों में पीआईएल जोड़ सकते हैं, या तो पैकेज में या शामिल हैं: setup (options = {"py2exe": {... "packages": ["PIL"], # सब कुछ के लिए "इसमें शामिल है": ["PIL.Image", # या यहाँ बिट्स और टुकड़ों के लिए "PIL.PngImagePlugin"]}}, नाम = "foo", ...)

How to dereference an array element (C++) -

I wanted to create an array of a specific size using a variable, but the only way to do this is by pointers To use integer size = 5; String * myArray = new string [size]; Now I want to assign another variable to this array, which I believe will only work through the definitions. The following line of code does not work How do I fix it? string line; My array [0] = "hello"; Line = * Maya array [0]; Edit: I just want to clarify something: Using the normal "myArray [0]" code does not work either. It's compiled, but causes an accident. Here are some more specific codes that I want to do. Zero MyClass :: setLine {string line} {myLine = line; / * This is a private variable in MyClass * /} ///////////// MyClass * element = New MyClass [size]; Elements [0] .setLine (myArray [0]); I want to assign an array element to a class in a private variable, but the program crashes when I try to assign values ​​to a personal variable. If you know the size i...

javascript - How to remove control characters from string? -

I have a form on my page where the user can write some text and submit it. The text is sent to the server (the REST API at the top of the node. JS) and is saved in DB (Postgrad). The problem is that some strange characters (control characters) are saved on DB Opportunity - for example the escape control character (^ [] or backspace control character (^ H). Also, because these characters are invisible, so html is sung correctly. However, when I provide XML content for RSS readers, then they (the reader) will control those control characters (this works after removing them) Cause "Perverted XML" My question is how can I remove those characters on the client level (javascript) or the server level (javascript / node.js) string? Find me the correct answer here: s.replace (/ [\ X00- \ x1F \ x7F- \ x9F] / g, ""); I had a similar problem, here is the solution that I choose. I have encoded encryption User (variable_name) using the user String data is en...

ios - parse.com javascript login on safari mobile failed.(QuotaExceededError) -

I currently face a problem with the parse (parse.1.1.1) and the Safari mobile browser with iOS 8 I am here. I try to login the user with the following code: function login () {var login = $ ("# loginTB"). Val (); Var password = $ ("# passwordTB"). Val (); After the successful login to Parse.User.logIn (login.toLowerCase (), password, {success: function (user) {// Do Dous.onsole.log ("successfully logged in"); // var sessionToken = Parse.User Current () ._essionToken; // createCookie ("sessionToken", sessionToken, 7); window.location.href = menuLocation;}, error: function (user, error) {// login failed. Warning ("Error:" + Error.code + "" + error. Message);}}); } I get this error: [error] Quota-encoded error: DOM exception 22: Add something An attempt was made for the store to exceed that quota setItem (parse-1.3.1.min.js, line1) _getInstallationId (parse -1.1.1min.js, line1) _request (parse -1.3) 1min.js, line1) ...

c# - Export Datatable to Word Document With Page Numbers using Open XML -

I need: Exporting a dynamic data tile in Word document with the word number We use Open XML to get it Have to do. I have code to export datatize to the word i and also to insert page number I Code was exported to datatable public void CreateWordtable (string filename, DataTable data) {WordprocessingDocument Dock = WordprocessingDocument.Create (filename, word processing Dokyumenttaip down .doc); MainDocumentPart main document page = doc.AddMainDocumentPart (); MainDocPart.Document = new document (); Body of body = new body (); MainDocPart.Document.Append (body); // rinks @: document forming new table form.OpenXml.Wordprocessing.Table table = new DocumentFormat.OpenXml.Wordprocessing.Table (); For (int i = 0; i & lt; data.ropecount; ++ i) {table row = new tabler (); For (int j = 0; j and lt; data columns; calculation; j ++) {table cell cell = new tablecase (); CellkAppend (new paragraph (new DocumentFormatkOpenXmlkWordprocessingkRun (New DocumentFormat.OpenXml.Wordprocessin...

css - Set a div's height to a percentage of sibling div -

I have three siblings divs in a row: right div: a div in which the height Its text content is determined. Center div: A div that should match the height of the correct div. Left div: Set a div I want at 50% height of the right diva. Try CSS, do not use Flexbox with the left div: . Container {Display: Flex; }. Left {width: 50px; Height: 50%; Background color: light; }. Center {width: 50px; Background color: Light light; } .right {width: 300px; Background color: yellowGreen; } The only way I want to use the position: absolute to allow the left DV to calculate the percentage of the height of the correct div. / P> Full condition is less than ideal, because it prevents me from using normal layout flow to set three divs next to each other in a row. Is there a way to set left div for a percentage of height of the right div, without the need to use a certain horizontal layout to set three divs in a row? ? Layout requires Chrome to work lately, so browser inco...

javascript - Refreshing Listview after Append or HTML -

I am searching for this problem, but nobody works for me. I have this HTML & lt; Div id = "divHistorialListView" & gt; & Lt; Ul data-roll = "list view" id = "list history" & gt; & Lt; / Ul & gt; & Lt; / Div & gt; and it's a javascript function $ ("#listHistorial"). Attached (" And I run the function multiple times. First run this list correctly formatted the view. Second (and second after all!) The format wrong! (Like a normal UL or worst) I also tried: $ ("#listHistorial") Listview ("Refresh"); and $ ("#listHistorial"). Refresh (); But when I try these, some code does not run in javascript (as if there was an error and the function was completely ignored) I also call the JQuery mobile site and there they use them ... but there is no solution! Please help! try this $ ("#listHistorial"). Listview () Listview ("Refresh...

xml - Why isn't the XSL displaying any data -

मेरे पास निम्न XSL फ़ाइल है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8" & gt; & Lt; xsl: स्टाइलशीट संस्करण = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/transform" & gt; & Lt; xsl: टेम्पलेट नाम = "displayEventDetails" मैच = "/" & gt; & Lt; div वर्ग = "सर्विसहॉल्डर ब्रिकियर" & gt; & Lt; xsl: प्रत्येक चयन = "/ रूट / ईवेंट" & gt; & Lt; h2 class = "defaultHDRColor" & gt; & Lt; xsl: मान का चयन करें = "शीर्षक" / & gt; & Lt; / h2 & gt; & Lt; div वर्ग = "hrHolder" & gt; & Lt; घंटा वर्ग = "एचआरडिवर" / & gt; & Lt; / div & gt; & Lt; / XSL: के लिए-प्रत्येक & gt; & Lt; / div & gt; & Lt; / XSL: टेम्पलेट & gt; & Lt; / XSL: स्टाइलशीट & gt; एक्सएमएल: & lt; रूट & gt; & LT; घटना & gt; & Lt; शीर्षक & gt; तैयार बायोगैंशी कक्षाए...

matlab - How to input double values in Simulink from Workspace? -

I need to do a very basic task of adding two numbers in the simulator. Value is stored in the workspace as a variable Go. Timers or structures in blocks 'from workspace' as input. I'm not sure how to change the data for this basic operation. You can use a static block and use the name of the variable as the value Are there.

Creating a C# Nullable Int32 within Python (using Python.NET) to call a C# method with an optional int argument -

I am using C # assembly to call C # code from Python. It works very well, but there has been one such issue calling me that looks like this: A method within us Namepace.Proj.MyRepo: Output Object GetData (String User, IIT, Int. AoopationalID = Faucet) I can call the method for that case Where alternate third argument exists, but the argument of matching the third tap case Import clr clr.AddReference ("Our.Namespace.Proj") Import from our namespace. Import the import MyRepo _repo = MyRepo () _repo.GetData ('me', System.Int32 (1), System.Int32 (2)) # works! _repo.GetData ('me', System.Int32 (1)) # fails! TypeError: arguments that match any method _repo.GetData ('me', System.Int32 (1), none) # Fails! TypeError: No argument given in match matches iPython notebook indicates that the last argument type should be: System.Nullable`1 [ System.Int32] How to create an object matching the null case. Any suggestions about creating C # reco...

How to add elements in an array as properties of an object in JavaScript -

Assume that I have an array: var member = ["Peter" , "Paul", "Mary"]; and one object: var band = {}; Is there a way to iterate through the array that each element in the member array will also be added as the value of the object as the properties of the band object? band = {"Peter": {}, "Paul": {}, "Mary": {}} : var member = ["Peter", "Paul", "Mary"]; Var band = {}; Member. Former (work (member) {band [member] = {};});

Matlab: How I can make this transformation on the matrix A? (part 2) -

NB: This question is more complex than my previous question: I have a matrix one 4x10000 , I want to use it to find another matrix C based on a predefined vector u I am simple with my problem with a simple example: a from a matrix 20 4 4 74 20 20 4 36 1 1 11 36 36 1 77 1 2 3 4 6 7 8 15; 8 4 | 6] & amp; : And | : Or I have an intermediate unit B : 2 3 4 6 7 8 2 & amp; 4 and 15 7 and 8 4. 6 [20 36 77] 0 1 0 0 1 1 0 1 0 4 [4 1 1] 1 0 0 0 1 0 1 4 [74 11 15] 0 0 0 0 0 0 1 2 We have put 1, if the value of the first row and vector to the left has created a column in the matrix A . The last column of the unit is the sum of 1 out of every row b . Finally, I have made a matrix left in the C , unit b , but only if the sum of 1 is greater than 3 or Is equal. For my example: 20 4c = 36 1 77 1 It was a complex on E and in many restrictions and labeling processes, it would not be efficient as a solution to the previous problem. Here's...

sapui - SAPUI5 MVC App from Single MVC Example -

Can someone help me change the example given below in MVC? There should be 2 JS or XML view and 2 controllers: tnx, sapsm App. Worked in any other version for me .. but I do not tell it because of version conflict because of some reason .. I could not understand. Anyway its closed as a full long back.

Examine iOS Push Notification Payload -

I can figure out how to determine the payload of a push notification in that which is the scene when a Opening the app opens the app from the notification, for example, a notification says that if "X: test" when notification is used, x opens and notification is called. EDIT: I think I should make clear the part I'm not sure about I have done this in FineishLaunchingWithOptions: UILocalNotification * Notification = [launchOptions objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey]. If (notification) {// check payload then proper view controller load} How do I check the payload for some text to determine the appropriate view controller for loading the command? Here is my code from a previous project, the notification appears in the device like this "Costas: The friend's " [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTy...

Planar graph embedding book unclear description -

I am searching for a linear-timetable graph embedding algorithm. I have found a book "A Grid on Drawing a Plain Graph for a Linear-Time Algorithm" - M. Choback, THPayne. They write in the algorithm statement "We believe that J is already triangular and embedded in the plane, and that is given to an authentic order of the G." It is strange that the algorithm whose purpose is to embed the plane, it is necessary to embed the already calculated plane. How can this be explained? And then I should use the algorithm (s) to embed the plane if I have only proximity matrix / list. There are more variations of graph embedding problems. In the article that you have got to deal with embedding the grid in the grid, it is to identify the corner of the graph with the grid's vatics, to hide non-straight lines such edges if I think right , Then you are normally working with an embedded graph in a plane. While grid embedding is the solution to your problem, the ...

user interface - How to capture key press in Matlab uipanel -

How can a keyboard entry inside a user capture, ie when there is any focus in the panel? I've found that the uipanel does not have the property FCN . I have read about non-documental matlabs about Java callback, but I can not get a key press callback to work, for example, if I try to do it: set (h_panel, 'keypressfcn', @ (src, event) key_press (obj, src, event)); I get this error: For a frequency of class 'uicontrol' the name 'kfcfcn' is not an easy asset. The same thing comes when I try KeyPressed Callback . I am afraid that I would like to follow some kind of hack which includes the original figure, which I want to avoid possible. I do not see any callback properties that you can use or events that you attach to the listener You can. & gt; & Gt; Event (H.Panel) Event Matlab.ui.container.Panel for Object: ObjectBoardingDroved LocationChange Changed ButtonDown Reset Property AddedAuthorityPerified Simply mouse event (...

How can I save a matrix in a txt file and then open it again as a matrix in python? -

"Directory" a = np. Array ([[1,2,3], [1,2,3]] OSCHDIR (Outrear) NPSVettext ("Image Bean", A) F = Open ("Directory / Image. Bin") m = np.fromfile (F, dtype = np.uint16) print lain (m) ma = np. Array (np fresh (m, (2,3)) print print but this error message Is: "The total size of the new array should be unchanged" I tried to change the dtype, but it did not work You should use np.loadtxt : Try: Np.savetxt ("Image.bin", a) m = np.loadtxt ("(" [2] [2] Image.bin ") m now has the same array as a .

windows - Python ctypes identifying dll function result -

There are some functions in accordance with the documentation of the DLL have (more): # In the second example, there are 2 lines, just define the # calllet __stdcall # define the PLSANL void * PLSNVL collatees LScrate ANVL (Intel) LSOPENLog FILEL (PLSNALL PL, 4 * PCLGFile) Intel CallTeSS LSCT Pointerl (PLSNVL PL, Double * PDPInter, IN T * Pianpiintrnoav) is Int LSexecuteScriptL (pLSenvL PL, four * PcScript) integer LScloseLogFileL (pLSenvL pl) zero LSclearPointers (pLSenvL pl) I have done so far this: ctypes import * API = CDLL ( "PATH_TO_DLL") pLEnv = api.LScreateEnvL () script to and it works, but now I want to copy an example of what I found: void Sisdielji :: Onsoliv () {Int Anaarar, Anpointr now; CSTING CSSPT, CS; Double Dਿਨides [1], Dishart [1]; Donis [0] = (Double) Annidies M; PLSNVL PL; PL = LSVT ANVL (); NError = LSopenLogFileL (PL, "log_file.log"); NError = LSsetPointerL (PL, Dunnies & amp; nPointersNow); NError = LSsetPointerL (PL, ...