Posts

Showing posts from February, 2014

wordpress theming - I want to play music in my site and music should keep playing even if i go to other page in my site -

I want to play music in my site and play music, even if I go to another page in my site. How can I do this in worpdress? I want to do something like the following songs have a game It can help you: Use this plugin to play background music.

gis - geojson to maps using Google Maps API -

I am trying to project my geographic data on the map. This is when I came to this doctor from Google. https://developers.google.com/maps/documentation/javascript/datalayer Does anyone working with Google Maps API Meaning of this code segment: // Load a geoogen from the server similar to our demo, map.data.loadGeoJson ('https://storage.googleapis.com/maps- devrel / google.json '); What does it mean to load a GeoJSON from the same server as our demo? My geographical file is in my local drive (C :). How can I modify the code so that my JSN file is full? Thank you. If you assign your HTML file to a file: // -URL, Are loaded with examples. file: ///.c: /myfile.html , you should be able to use map.data.loadGeoJson ('file: /// C: /mydata.json') . However, keep in mind that this works only when you are loading your HTML / Javascript and data of that same origin. ToS does not allow you to host API scripts, you may have to setup a local webserver f

vagrant - Puppet: Nagios_host + Puppetdb + Nagios = Cannot collect exported resources -

We are currently trying to create an Ugrator + puppet + Nagios configuration on a Ubuntu exact 64-box. Things work very smoothly, but we've apparently hit a roadblock trying to get a puppet to use Nagosha_Host to Nagoye's configuration. We are currently doing everything on the same example: Puppet DB, Papetmaster Service and Nagyas. It seems that the puppet master is properly tilted to the puppet, "The puppet agent - test" and the facts seen in the puppet log indicate that in fact this link was suggested. Updated according to: (Step 3). Additionally, being seen in /etc/puppet/puppet.conf shows storeconfigs = true and backend = puppetdb. Our next step is to collect and export resources to monitor in Nagios. We have tried to follow some of the online tutorials like Pipalab's own guide on exported resources. They all take us down the same path. The puppet shows a bunch of warnings and no Nagyas configurations occur: "Warning: You can not collect resour

entity framework - How to implement code first with existing database -

I am using EntryPremaker 5 with the first model of code and existing database. I am implementing the repository pattern. I have a BasInty class like the following: Public abstract partial class basenti Now I have a table customer who has placed the customer key as the primary key. How should I map such farms with the ID of the BaseTinti? If I have a composite key then how should I map it to BaseIntI ID Please help me. Ensure that you initialize your dbcip to first: context.Database.Initialize (false); The first code is a good article on database initializers:

python - Difference in ways of importing modules -

If I have a module called FunctionLibrary , then what do I use in the import when I use The difference is import the labels function and the function library import * ? There may be a list of function libraries function or, with a class defined methods and variables, anything please suggest . How to call imported jobs I think you have foo () < / Code> and bar () . Import function library FunctionLibrary.foo () FunctionLibrary.bar () And this: < Code> function labry import * foo () times () do you see the differences? The first one requires the name of the module to call the function, while the latter allows you to call the function without any prefix. But in both ways, it does not change again. Functional Library Import Foo, as the bar fl_bar foo () fl_bar () to you < This last method you can use pre-> allows you to write aliases to call Python functions. You will need it in the case of work (or something) with the same names in

java - Error when rethrowing exception -

मुझे एक त्रुटि मिल रही है त्रुटि: (25, 13) java: unreported exception अपवाद A; को पकड़ा जाना चाहिए या घोषित किया जाना चाहिए अपवाद को फिर से खोलने का प्रयास करते समय मैं अभी भी जावा के लिए नया हूँ और मेरी किताब "पुनर्स्थापित" करने के लिए नीचे का उपयोग करती है, लेकिन मुझे अपवाद को छोड़ने में त्रुटि मिलती है; फिर से शुरू करने का प्रयास करते हुए भी यह सीधे आधारित है पुस्तक से दूर आयात करें java.io.IOException; सार्वजनिक वर्ग पकड़ने अपवाद {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग एल्ग्स []) {throwExceptionA (); throwExceptionB (); throwNullPointer (); throwIOException (); } पब्लिक स्टेटिक व्हाइड फेंक एक्सपेशेंसी ए () {नए अपवाद को फेंकें (); } पकड़ (अपवाद ए अपवाद) {System.err.printf ("अपवाद:% s \ n", अपवाद); System.err.println ("अपवाद A विधि में निष्कर्ष निकालना A \ n"); अपवाद छोड़ो; }} पब्लिक स्टेटिक व्हाइड थ्रो एक्सपेशियल बी () {नया अपवाद B } पकड़ (अपवाद बी अपवाद) {System.err.printf ("अपवाद:% s \ n", अपवाद); System.err.println ("अपवाद

Save only first fragment on Android back stack -

For some time I have problems with pieces and back stacks. I have an activity in my app - MainActivia with drawers and a few pieces. My main activity looks something like this: increases public class main activity actionbearactivity {Private Static Final Ent HOME_NUM = 0; Private static final integer ABOUT_NUM = 1; Private boolean first fragment change = false; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_main); GetSupportActionBar () setHomeButtonEnabled (true) // Display some other initalizations (HOME_NUM); } Private Waste DisplayFragment {piece of fragment = zero; Switch (position) {case HOME_NUM: section = new main profit (); break; Case ABOUT_NUM: fragment = new aboutFragment (); break; Default: Break; } Piece Manager Piece Manager = getSupportFragmentManager (); Piece Transaction Piece Transaction = Piece Manager. Section Transaction: Raleigh (RID frame); Container, piece); If (! First fake

cocos2d setSourcePosition -

What does setSourcePosition to CCParticleSystemQuad ? I do not find the details anywhere, I think this is a way to follow a phantom? If so, then I add the CCParticle systemquad instance to my phantom as a child who should follow it and that is it. The source of this emitter. Usually the position and speed of a particle system is referred to as 3D space as an emitter. The emitter acts as the source of particles.

Python webpage scraping can't find form from this page -

I want to cycle through dates at the bottom of a page that looks like a form. But this is returning to the blank space. Here's my code. import tool URL = 'http: //www.airchina.com.cn/www/jsp/airlines_operating_data/exlshow_en.jsp' 'br = mechanize.Browser () r = br.forms ( ) In the form for br.open (url): form print form. Name Finding the name of the print form Why is not it returning in any form? Is not it a form? If not, how can I control the year and month down to cycles through pages? How does some sample code provide this? is trying to reach the page that you are actually directed to on the error page Paste the url in the browser, and you get a page on it: Do not comply with the inquiries data terms Any other No form You need to access the page in a different way. I suggest taking steps to the URL directory until you find the right path.

Delay between for loop iteration (python) -

Is possible in Python? I have written a great loop / script in Python and would like to add this delay to IA if possible. Map (firefox.open, ['http://www.bing.com/search? q = '+ str (i) for class i) ()), [2]] * x) Where do I put sleep (6) ? You can do this time.sleep (some_seconds) . from to sleep in time (10) for sleep: print i sleep (0.5) in # seconds implementation Here's a cool little implementation of that: (Paste it in a .py file and run it) From to sleep in sleep (101) from time to time: sleep '\ r' + str (i) + '% complete', time. Sleep (0.1) Map (for firefox.open, ['' + str (i) in category (x)], [2] * x) < / div>

android - Hierarchy viewer doesn't display items -

Image
Item details are not displayed when I open the hierarchical viewer's perspective. How to fix it? Ubuntu 13.04 The hierarchy view does not work with the production hardware, unless you specifically modify your app to include the roman cow . Therefore, you have a choice: Use an emulator uiautomatorviewer <

android - Service started again after killed by task manager -

The There are several options to sync data between I have Android app server I I synchronize with the user options I am using AlarmManager . I have one that does not update anytime (updated manual) in which I cancel the toStopServiceAlarm () to alarmmanager . Q: It is working fine till my application will not be killed by any task manager as soon as it has been killed by the Task Manager Apps Service , Again the never updated (updated manual) , where I already canceled any AlarmManager triggers. Can someone help me keep up my application, even if it was killed by the task manager? Sync is said only according to user preferences. The code snippet: - public class ServiceAlarm WakefulBroadcastReceiver spreads (available at public spaces (reference model, meaning intended) {Intent service = new Intent ( reference, UploadData.class); // Aploddeta my service start WakefulService (reference service);} public void StartServiceAlarm (string Times) {context = SmartCon

javascript - why is jquery cloning the children element also? -

मान लीजिए मेरे पास निम्न कोड है: & lt; ul & gt; & Lt; li & gt; 1 & lt; / li & gt; & Lt; li & gt; 2 & lt; / li & gt; & Lt; li & gt; 3 & lt; / li & gt; & Lt; / ul & gt; अब जब मैं करता हूँ, $ ("ul")। क्लोन (); , यह पूर्ण ul तत्व क्लोन करता है (सभी इसके बच्चों को भी)। मैं केवल ; l & gt; और उसके बच्चों को क्लोन करना नहीं चाहता। इसे jQuery में कैसे करें? मुझे शुद्ध जावास्क्रिप्ट में पता है (< कोड> क्लोन-नोड () ), लेकिन मैं इसे करने के लिए अतिरिक्त तरीकों की वजह से इसका उपयोग नहीं कर सकता। यदि कई तत्व हैं, तो यह कार्य लूप में करें।

ios - iPhone Configuration Profile encryption -

I have a configuration profile with MDM payload and wifi payload. I have a few questions in my mind Identifying the payload and profile is the difference between password payload. I know that the other person is notified if the user wants to delete the profile. Can I load the profile remover password for my profile with MDM payload? How to encrypt my .mobileconfig file? Should I use a CA certificate to encrypt the profile? 1) I think you are talking about the identity profile (vs. identity profiles) This profile has to give the device some identity (a certificate and a private key), which it will use to authenticate itself on the server. This can be PKCS 12 (which is a format that connects both a proof and key) or SCEP (which is a protocol to get the certificate) 2 ) MDM profile is always removable (except for a case the device is monitored). 3) It is actually where identity payloads are used, you must encrypt a profile by using this device's certificate. The

c# - SqlDataReader - how to discover that column is empty -

I try to read the result of the query and find out that some columns are empty This is the way I started Is: SqlDataReader rdr = cmd.ExecuteReader (); While (rdr.Read ()) {rdr ["ColumnName"]; // How do I know if its value is empty} I thought: dr [4]. Ostring () == string . Empty This does a necessary job, but I do not like it (this is a hack instead of solution) Can you advise me how to do it properly and beautifully Should i is not present for the empty properties and what is right when working with the database Null which is the only true "empty" SqlDataReader rdr = cmd.ExecuteReader (); Int colInndex = read.GetOrdinal ("MyColumnName"); While (rdr.Read ()) {// true | False] your verification goes here ;; If (rdr.IsDBNull (colIndex)) {// value is null}} Please note that if you specify 0, "" or 1/1/1900 as empty value A custom treatment is required if you want to use it.

c++ - Hash Tables: why doesn't this code resolve collisions? -

This entry function is not properly inserted and does not overwrite the previous entries. Apart from this, duplicate check does not work and only works half-time. HT :: HT (Konsted unsigned & amp; tblSize) {// hash table size is equal to size or default size TBL_SIZE hsize = tblSize; // pointer table defualt 0 psize = 0; // reisze table hTable.resize (hsize); PTable.resize (hsize); // Set the uncertain values ​​to blank ($$$) (unsigned i = 0; i It starts inserting and duplicate key works on a data set, but not with other data values, which fills tables TBL_SIZE = 31 apart from this free continuous Defines all vector values ​​to specify free space for $$$. // in the hash table with linear probes as collision resolution ( HTable [(index + i)% hsize] .key == free) {hTable [index] = records; You do not want to include [index], when [(index + i)% hsize] is free space.

javascript - How to change target blank in internet explorer 8 -

& lt; a href = "brochure.pdf" target = "_ blank" & gt; पीडीएफ़ के रूप में डाउनलोड करें & lt; / a & gt ; लक्ष्य रिक्त यानी 8 में काम नहीं कर रहा है क्या आईई में फाइल खोलने का कोई उपाय है ?? < div class = "post-text" itemprop = "text"> यह निर्धारित करने के लिए कि आपका वेब ब्राउजर आपके स्थानीय हार्ड ड्राइव से एक पीडीएफ खोल सकता है। अपने वेब ब्राउज़र में, फ़ाइल & gt; ओपन (या ओपन फाइल)। (केवल विंडोज) प्रकार मेनू की फ़ाइलें से, सभी फ़ाइलें चुनें ब्राउज़ करें पर क्लिक करें अपने कंप्यूटर पर पीडीएफ़ का पता लगाएँ, इसे चुनें, और फिर ओपन पर क्लिक करें। यदि पीडीएफ खुलता है, तो कोई अन्य समस्या है। यदि नीचे दिए गए चरणों का पालन न करें: - कॉन्फ़िगर करने के लिए पीडीएफ फाइलों को खोलने के लिए एक्रोबेट या एडोब रीडर का उपयोग करने वाला ब्राउज़र: एक्रोबेट या एडोब रीडर को प्रारंभ करें संपादित करें & gt; चुनें पसंद। बाईं ओर सूची में इंटरनेट का चयन करें। ब्राउज़र में प्रदर्शन पीडीएफ़ चुनें, और ठीक पर क्लिक करें

sql server - Error next '=' after update statement in T.SQL -

I am trying to execute a trigger, and I have the following error associated with this part of my script: < / p> EXEC (N'update CMDB2 '+' _CI_ '+ @CI_TYPE_ID) SET STATUS =' RESERVE 'where Num__UGLJ_ro__bde__bs__UGLJ_rie = @Rariable and STATUS =' n stock ' Error: Message 102, Niveau 15, A1, Process 1 CHANGEMENT_ETAT_CI_EN reservation, Ligne 58 Syntax wrong behavior '='. After the set order If I specify the table name correctly in the update statement then everything goes fine, otherwise if I specify the table name as the contracted string and this code > SET STATUS = 'RESERVE' WHERE NUM__UGLJ_RO__bde__bs__bs__UGLJ_rie = @Rariable and STATUS = 'n stock' IDE is out of F statement

memory - Is there a standard-compliant way to specify field offsets in C++? -

I have a part of the virtual memory by external code I am trying to reverse the engineer. I do not know the whole structure of this memory, but I know some areas (e.g., the part starts with Int 32 called "FU" and is a double called Offset 0x C 'Double'). I want to define a structure and inevitably describe it - putting an indicator for the piece of memory in that structure, and it will have to be raised up, I am not sure that another traditional name for this technique Yes, but I'll refer it as an 'overlay type'. Here is a sketch I want to do: START_OVERLAY_TYPE (my_type, 0xFF) // struct my_type name, size 0xFF FIELD (0x00, int32_t foo); // area int2_t fx 0x00 field (0x0 c, double bar); // field double bar 0x0C at END_OVERLAY_TYPE Do not use macros to have one plus, but I do not see a good way around them. Current implementation with me, I extend it (something like): __ pragma (pack (push, 1)) template & lt; size_t p & gt; struct pad

c# - Determine properties such as if PDF is Simplex or Duplex in iTextSharp -

I am using iTextSharp to read and manage PDF documents. Things like background or logo and overlay stamping for supporter are PDF statement files, so I can not give an example. I am thinking that to see the PDF settings, whether the PDF file is simple or duplex, and such information. Any help or suggestions would be appreciated. At this time I do a test for some of the second page criteria, and this is a bad and bad way to do this. Thanks in advance, and happy coding! duplex mode is stored in the document / viewerPreferences / duplex Under the key, the dictionary supports this three value, / duplex flip length agge , / duplexflip short adz , and / simplex is. You can use the code given below to inspect this: // Be the default by default because it was introduced in PDF 1.7 boolean isDuplex = false; // Bind a reader to our reader (var r = New PdfReader (testFile)) {// Get Visual Preferences pre prefs = r.Catalog.GetAsDict (PdfName.VIEWERPREFERENCES); // Make sure tha

javascript - jqmobile 1.4 panel with FooterBar -

I use the following code to open a panel in FooterBar. 5 times after opening the panel, nothing happens. Please click on "Junk" {// Text which you can see in Ajax content = "& lt; h2> Hilf Proviree Gehmet & amp; UIh; Leibh Geaht & Ummil ; Bear Tribute & lt; li & gt; Tent F & amp; EML; LT and Uimile; Beer Thorns the end javascript HTML contains content and the hostname Close BTN I have a sample which is an example of a popup, and works well there. brgds ramon

c++ - gcc: wrong number of template arguments -

Why does this code successfully compile in VS13 and fails to compile by GCC? // /// file my_map.h ///// namespace My {// My custom map template & lt; typename K, typename V, typename command = low & lt; K>, typename allocator = cached_alloc & lt; Page_Alocator & lt; pair & lt; K, V & gt; & Gt; & Gt; & Gt; Class map: public set_base and lieutenant; Pair & lt; K, V>, K, select1st, order, ins_unique, allocator & gt; {...}; } ///// file test.h ///// # include "my_map.h" template & lt; Typename T & gt; Class base {secure: typed my :: map & lt; T, double & gt; MyMap; Mam map m_map; // This line is NN Public: Zero Function (const T & amp; key) {typename MyMap :: iterator = m_map.find (key); If (this! = M_map.end ()) {// ....}}}; Square Inherited 1: Public Base & lt; Char & gt; {}; Square Inherited 2: Public Base & lt; Int & gt; {}; This results in the following errors (gcc 4.1.2) filep

java - Spring 3.2 Dependency injection via @Resource for primitive types -

मेरे पास यह जावा कोड है: सार्वजनिक वर्ग ग्रीटिंग एसरिसआईएमपीएल IGreetingService {@Resource (name = "एबीसी") निजी स्ट्रिंग anotherMsg = null; स्प्रिंग- config.xml क्या होना चाहिए? निम्नलिखित XML त्रुटि दे रहा है: वर्ग पथ संसाधन [greetingConfig.xml] में परिभाषित नाम 'एबीसी' के साथ बीन बनाने में त्रुटि: संपत्ति मान सेट करने में त्रुटि; नेस्टेड अपवाद org.springframework.beans.NotWritablePropertyException: बीन वर्ग [java.lang.String] का अमान्य संपत्ति 'anotherMsg': बीन प्रॉपर्टी 'anotherMsg' लिखने योग्य नहीं है या इसमें एक अमान्य सेटर विधि है। क्या सेटर का पैरामीटर प्रकार प्राप्तकर्ता का वापसी प्रकार से मेल खाता है? यह वसंत-कॉन्फिग.एक्सएम में बीन कॉन्फ़िगरेशन है: & lt; बीन आईडी =" एबीसी "वर्ग =" java.lang.String "& gt; & lt; संपत्ति नाम = "अन्य संदेश" मान = "परीक्षण @ संसाधन ..." / & gt; & Lt; / सेम ​​& gt; यह बीन घोषणा & lt; bean id = "abc" वर्ग = &quo

javascript - NodeJS passportJS MySQL local user auth -

I do not see the error here: this return undefined "unknown user" / p> passport.use (new localTrataji (function (username, password, done) {process.nextTick (function () {findByU name (username, work (error, user) { if (err) {console returned (empty, false, {message: 'unknown user' + username});} if done (forgotten); returned (error);} if (! user) {console .log ("application" Returned (empty, false, {message: 'invalid password'});} returned (blank, user);); user.password! = Password; {console.log ("invalid password"); returned; })});})); Function findByU name (user name, fn) {var user = []; connection.query (Select user WHERE user name =? ', [user name], function (fault, lines) {//console.dir(rows); if (err! = null) {//res.end ( "Query error:" + err "; console.log (" query error: "+ error);} and {for (var i = 0; i & lt; rows.length; i ++) {var myRows = rows [i]; user.push (myRows);};}}); console.

python - Printing text - Pygame -

I'm wondering how to print text with the use of piegages, I currently have this code ( Which I thought would work but): for player player in list: block_hit_list = pygame.sprite.spritecollide (player, block_list, true) for block_hit_list block: health - = 25 Collision.play () if health == 0: font = pygame.font.font ("freesansbold.ttf", 30) label = font.render ("game over", 1, (255,100,0)) screen. Bluttle (label, (400, 300)) Break if health == 0: gameover.play () collision.stop () player_list.remove (player) all_sprites_list.remove (player) block_list.remove (block) all_sprites_list.remove (block ) I'm not sure why she is not printing, if someone has any suggestions, then the ID appreciates the help! : label = font says that below the line labelRect = label.get_rect () labelRect.center = (400, 300) render ... Then, Remove the code> screen. Blut with this: screen.blit (label, labelrect) I hope this is useful.

python - Loop doesn't stop -

num_1 = इनपुट ("कृपया प्रथम संख्या दर्ज करें:") num_2 = input ("कृपया दूसरा नंबर दर्ज करें:" ) प्रिंट ("आपके द्वारा चुने गए नंबर हैं", num_1, "और", num_2) जबकि num_1 या num_2 & gt; 0: यदि num_1 & lt; num_2: प्रिंट ("सबसे पहले नंबर दर्ज किया गया है।") elif num_1 & gt; Num_2: प्रिंट ("दूसरा नंबर दर्ज किया गया है बड़ा है।") अन्य: प्रिंट ("दोनों संख्याएं समान हैं।") प्रिंट ("प्रोग्राम समाप्त हो गया है ...") आपके समय की लूप की स्थिति अनुचित तरीके से व्यक्त की गई है। आप क्या कहना चाहते हैं, "जब तक कम से कम एक नंबर 0 से बड़ा है"। हालांकि, आपने जो व्यक्त किया है वह है: जबकि num_1 या num_2 & gt; पायथन इस रूप में पढ़ता है: जबकि ((num_1) या (num_2 & gt; 0)): < इसलिए । यह भी पूछता है कि num_2 0 से अधिक है और उन दोनों बूलों के या को लेता है। यह लगभग अनुवाद करता है जबकि (num_1 नहीं है 0 या num_2 0 से बड़ा है) आप के लिए क्या देख रहे हैं < कोड>

How to display Option List in wishlist sidebar magento -

How to display the options list in the wish list sidebar magenta? I use this code! However, thanks in advance it is not working. & lt ;? Php if ($ _options = $ this-> GetOptionList ()):? & Gt; & Lt; div class = "truncated" & gt; & Lt; div class = "truncated_full_value" & gt; & Lt; dl class = "item-option" & gt; & Lt ;? php foreach ($ _options $ _options) as: & Gt; & Lt; Dt & gt; & Lt ;? php echo $ this- & gt; escapeHtml ($ _ option ['label'])? & Gt; & Lt; / Dt & gt; & Lt; dd & gt; & Lt ;? Php if (is_array ($ _ option ['value'])):? & Gt; & Lt ;? Php echo nl2br (implode ("\ n", $ _option ['value']))? & Gt; & Lt ;? Php else:? & Gt; & Lt ;? php echo $ _option ['value']? & Gt; & Lt ;? Php endif; ? & Gt; & Lt; / Dd> & Lt ;? php endforeach; ? & Gt; & Lt; / DL & gt; & Lt;

Signing pdf signature field with hashed cert in itextsharp -

I have a hash of a certificate using the example and use it to fill the signature field in a PDF form Do anyone with ITextSharp have any examples or know how? This is a web app and the only way I can get to capture a sign from a smart card to a local customer. Ken You do not use a hash of the certificate to sign Can do Signing is done using the private key (and is not intended) For the web application you have two options - either transfer the whole document to the client, or use some distributed signature mechanism Do not include client-side modules (either browser plugin / Java applet or standalone application). Our company has developed a distributed cryptography add-on for the SecureBlackbox, which is described in the description and in the answer you need, the plan explains how the distributed signature will work.

c++ - Any CUDA operation after cudaStreamSynchronize blocks until all streams are finished -

Image
While profiling my CUDA application with NVIDIA Visual Profiler, I saw that the cudaStream synchronization After any operation, all the streams have expired, this is very strange behavior because if cudaStream synchronizes gives it means that the stream is finished, right? Here's my fax code: std :: list & lt; Std :: thread & gt; waitingThreads; Zero StartKernelSync (for {{int i = 0; i <200; ++ i} {KoodhostAllok (CPUPid Memory, Size, KoodhostAllow Default); Memcpy (cpuPinnedMemory, Data, Size); CudaMalloc (gpuMemory); CudaStreamCreate (& amp; stream); CudaMemcpyAynync (gpuMemory, cpuPinnedMemory, size, cudaMemcpyHostToDevice, stream); RunCernel & lt; & Lt; & Lt; 32, 32, 0, stream & gt; & Gt; & Gt; (GPU Memorial); CudaMemcpyAsync (cpuPinnedMemory, gpuMemory, Size, cudaMemcpyDeviceToHost, Stream); WaitingThreads.push_back (std :: move (std :: thread (waitForFinish, cpuPinnedMemory, stream))); } While (Waiting Streads.) () & Gt; 0)

python - To edit data retrieved from database in django -

I have retrieved the data from the database and displayed it in a table. Now click the edit button I edit the table Want to Below is my code but nothing is happening. I am unable to edit the content. No error is found. I'm a newbie. PRG help .. My views.py file def editquestiondata (request, id): info = Trans.objects. get (pk = id) info.transtype_id = Request.POST.get ('editexplain') info.save () Return HttpResponse ('Update') My urls.py file url (R '^ editquestiondata / $', 'booki.account.views.editquestiondata', name = 'editquestiondata'), HTML template & lt; Table range = "1" style = "width: 800px" & gt; & Lt; Button Type = "Button" value = "Explain Edit" name = "editexplain" & gt; Edit & lt; / Button & gt; & Lt; Button type = "button" onclick = "warning ('changes saved!')" & Gt; Save & lt; / Button & g

containable - How do I sort or do a find in CakePHP based on deep model associations? -

I have a user table, a role_mail table and a roles table. Role_email table contains a user_id and a role_id because there can be many roles. I have a datatyaw in which there are user IDs, emails, names and roles. I can easily sort and filter based on the field in the user table. The way data works, there is a search box that searches for all fields. Therefore, my search query try to sort on a "ORAC should be" where search_term such as username or search_term such as email or search_term such role_name The problem occurs when I base roll names Filter I am If I want to sort by rollmember. Roll. Search by name or rollmember. Roll.name How can I do this? My options are as follows: $ sOrder = array ('User.full_name' = & gt; 'ACC'); if (isset ($ params ['iSortCol_0'])) {$ sOrder = array (); ($ I = 0; $ i & lt; intval ($ params [ 'iSortingCols']); $ i ++) {if ($ params [ 'bSortable _'] interval ($ params [ 'iSortCo

javascript - Binding event on document performance concerns -

क्या दस्तावेज पर एक घटना बाध्यकारी है, कोई प्रदर्शन चिंता है? अर्थात्: $ (दस्तावेज़) .on ('mousecenter mouseleave', function (e) {if (e.type === 'mousecenter') {$ (this) .find (// कुछ तत्व और कुछ करें .. । बनाम $ ("। myElement")। होवर (फ़ंक्शन () {$ (this) .find (// कुछ तत्व और करते हैं कुछ ... मुझे लगता है कि दस्तावेज़ के माध्यम से एक ट्रैक रखने से अधिक प्रसंस्करण शक्ति का उपयोग करने पर घटना को केवल सीमित DOM तत्वों को निर्दिष्ट करना होगा? आपको वास्तविक अंतर के बारे में सुनिश्चित करने के लिए एक प्रदर्शन परीक्षण को लागू करना पड़ सकता है, लेकिन मुझे लगता है कि इसका न्यूनतम प्रभाव होना चाहिए, क्योंकि दस्तावेज़ पर बाध्यकारी घटनाओं का मतलब होगा कि आप बुलबुले को दस्तावेज के शीर्ष-सबसे तत्व तक किसी भी तत्व की घटना को पकड़ लें। वैसे भी, "प्रदर्शन तर्क" को छोड़कर, जब आप निकटतम अभिभावक पर हैंडलर। यह एन है ot केवल प्रदर्शन के बारे में: यह अधिक तार्किक है।

javascript - (ADD mousewheel functionality) using DOMmouseScroll AND mousewheel to call functions -

I am trying to create a function that calls another function when the micewheel moves in different directions I have no idea about how to implement it I basically have the ability to work with the musicwalk program to set up the code, but the Firefox does not support the monthly program is. So there's a way to do this with DOMmouseScroll too. If anyone wants to set it up in the same way I have already set it up. Note: I'm asking for both domamscroll and mousehelle to use, so I suggest adding my code, but if this can not be done, then it may be okay The way I set the code: $ ('# container') .on ('mousewheel', function (Event) {// crude investigation are supported for viewing events if (typeof event.originalEvent.wheelDeltaX === 'undefined' || typeof event.originalEvent.wheelDeltaY === 'alphabet {Console.log} ("mouse deltas could not be found"); return;} var deltaX = event.originalEvent.wheelDeltaX; var deltaY = event.originalE

javascript - Can we stack functions? -

जावास्क्रिप्ट में आप ऐसा कुछ कर सकते हैं? var b = 1212; Var c = b.toString ()। लंबाई; मैं एक कार्यक्रम लिखने की कोशिश कर रहा हूं और अगर मैं यह बहुत आसान कर सकता हूँ मुझे इसके लिए एक लूप की आवश्यकता है। के लिए (var i = 0; i & lt; = 100000 & amp; amp; i.toString ()। लंबाई% 2 == 0; i ++) {/ / मुझे क्या करना है} हां और नहीं यह संभव है, लेकिन आप की पेशकश की तरह पाश के लिए अंदर की सलाह दी नहीं है। एक और आदर्श कार्यान्वयन कुछ ऐसा होगा ... var len = x.toString ()। लंबाई; के लिए (var i = 0; i & lt; len; i ++) {// do something} ... के लिए अपनी इच्छा के 'i.toString के मूल्य recalculating से बचने के लिए ()। लूप 'प्रत्येक लूप के चलने के लिए।' मैं मान रहा हूं कि वास्तव में आपके इरेटरेटर चर 'i' की स्ट्रिंग प्रस्तुति की लंबाई नहीं लेनी चाहिये जैसा कि ऐसा नहीं लगता किसी भी व्यावहारिक उद्देश्य की सेवा के लिए।

c# - asp.net Login database -

Hi IM is a problem when trying to log in to my website. I want it to display the proper message when I keep getting in the same message "email is not correct" but will anyone be able to help me? Secure void loginbutton_click (Object Sender, EventArgs e) {SqlConnection con = new SqlConnection (ConfigurationManager.ConnectionStrings ["RegConnectionString"] ConnectionString). Con.Open (); String Checker = "Select the number from the user where email = '" + loginmail. Text + ";"; SqlCommand Com = New SQL Commands (Checksier, Conn.); int temp = convert.ToInt32 (com.ExecuteScalar (.) ToString ()); Con.Close (); If (temp == 1) {con.Open (); String check password word = "Choose password from user where email = '" + loginmail. Text + ";"; SqlCommand pass = new SqlCommand (checkPasswordQuery, con); String password = pass.ExecuteScalar (). ToString (); If (password == loginpassword.Text) {session ["new"] = loginm

Problems creating new text file C++ -

I think there are some problems coming to the end of my C ++ program and some help will be found. At the end of my program I need output in a text file. I have tried various methods to use the first and foremost so that it can detect that the file exists and if so , Then create a new one, though I have no luck here it is, where I am yet, but if "output.txt" exists, it just removes it and nothing else Does not make it, but crashes The In. . Offstream output; Int fileincrement = 0; Bool validFile = false; Cout & lt; & Lt; "File being saved ..." & lt; & Lt; Endl; output.open ("output.txt"); While (valid!) {If (output.good ()) // exists {fileIncrement ++; Output.open (to_string (fileIncrement) + "output.txt"); } And {myVectors.outputVectors (output); ValidFile = true; }} Thank you. output.good () simply checks for file access. If it is not yet, then it will be made. Captain Oblives' comments that the valid file ne

c# - Programatically Configuring federatedAuthentication element in microsoft.identityModel on asp.net application -

I am trying to generate the following configuration contained in Microsoft in the program. & lt; federatedAuthentication & gt; & Lt; WsFederation passiveRedirectEnabled = "false" is required https = "true" Issuer = "https://IssuedByFoo.com" realm = "http://foo.com/" /> & Lt; CookieHandler requires SSLL = "true" path = "/" /> & Lt; / federatedAuthentication & gt; So far I have not been able to configure it successfully. I tried to install the following in Application_Start but when I try to insert in I get an error message "ID5002: Issuer property on FederatedPassiveSignIn control to find out an STS endpoint that can process WS Should be set-to-effect passive protocol message. " Federal Authorization. The authorization authority module. Reel = "http://foo.com/"; FederatedAuthentication.WSFederationAuthenticationModule.Issuer = "https://IssuedByFoo.com";

dataframe - Creating a seven day, average-by-week-of-year (or moving average?) in R -

I have data of a ton that I am feeding through R to make an average. Relevant data includes date and temperature readings, often there are many temperature readings for the same day. Dates are approximately 6 months. Researchers requested by researchers were described as two for the following: The average weekly a ???? 7 days rolling average (not calendar week) Average max 7 days rolling max Therefore, if my data has begun on 1/1/13, then give me 1/1/13 and 1/7/13 All temperature readings should be average between, and then do this for the 1/8/13 item - 1/15/13 and so on. I have been told somewhere on the stack that it is actually called " average-by-year-by-year ", although I believe that I do not get enough that this is not how much the average is moving is . I have done some research, but overall it is that I am, I have great difficulty in understanding how the attitude of this problem is. For the visual between you, it's essentially the way I'm dealin

templates - C++ construct that behaves like the __COUNTER__ macro -

इस सवाल का पहले से ही एक उत्तर है: < / P> 7 जवाब मेरे पास सी ++ का एक सेट है वर्गों और हर एक को एक अद्वितीय अनुक्रमिक आईडी को एक संकलित समय निरंतर के रूप में घोषित करना होगा। इसके लिए मैं __ COUNTER __ अंतर्निर्मित मैक्रो का उपयोग कर रहा हूं जो कि एक पूर्णांक के लिए अनुवादित होता है जो उस की हर घटना के लिए बढ़ता है। आईडी एक सख्त आदेश का पालन करने की आवश्यकता नहीं है केवल आवश्यकता यह है कि वे क्रमिक हैं और 0 से शुरू करते हैं: वर्ग ए {सार्वजनिक: enum {id = __COUNTER__}; }; वर्ग बी {सार्वजनिक: enum {id = __COUNTER__}; }; // आदि ... मेरा प्रश्न यह है कि: क्या सी ++ का उपयोग करके समान परिणाम प्राप्त करने का एक तरीका है, जैसे टेम्पलेट्स? यह __ लाइन __ मैक्रो और टेम्पलेट्स का उपयोग करने का एक संभावित तरीका है: टेम्पलेट & LT; पूर्णांक & gt; स्ट्रक्चर इंक {enum {value = 0}; }; टेम्पलेट & lt; int इंडेक्स & gt; संरचना आईडी {enum {मान = आईडी & lt; सूचकांक - 1 & gt; :: मान + इंक & lt; अनुक्रमणिका - 1 & gt; :: मान}; }; टेम्पलेट &am

manifest - Can someone correct my Json Code ? -

I am trying to make an extension for Google Chrome and I get an error: unexpected token < P> Thanks for every person who will reply: D This is my code: } A "manifest_version": 2, a ???? Name: ?????: tf1a ????, a Description: Description: La Chen TF1 N is straightforward, ?????? version: ???? 1.0A ?? ³, Icons Icons I / S> .pngâ ????}, an app: ?????: ????? ??? urls ?????: ["http: // Www.tf1.fr/live/ "], a" launch "???: {â ???? web_urlâ ????: a ???? Http: //www.tf1.fr/live/a ????}}, "Permissions": ["Unlimited Storage", "Notifications"]} OK, it should open with { instead of } .

java - Unable to use resources in production mode with tomcat -

I have developed an application using GWT. It works fine in development mode, on the other hand, when all resources are deployed it becomes unavailable. For example: I have an image: mydomain.com/images/myimage.png But when I Deploy the app URL URL: mydomain.com:8080/images/myimage.png I have already checked and The image is about (mydomain com / images / myimage.png) The problem is about the used port. I have tried the following methods to access your resources already: or & lt; G: image url = "../ images / myimage.png" /> Both work in development work but not in production with Tomcat. What am I doing? In addition to this, I'm deploying the app in the WebAP folder and in the Public_Afault folder resource. Thanks Did you mean url = "../ images / Myimage.png " is actually url =". / Images / myimage.png " or are you actually over them on the directory where you are using them?

laravel - php static array variables -

मेरे पास वर्तमान में निम्न कोड है: सार्वजनिक स्थिर $ validate = array ('first_name '= & gt;' आवश्यक ',' अंतिम_नाम '= & gt;' आवश्यक ',' ईमेल '= & gt;' आवश्यक | ईमेल '); सार्वजनिक आवश्यक $ validateCreate = array ('first_name' = & gt; 'आवश्यक', 'अंतिम_नाम' = & gt; 'आवश्यक', 'ईमेल' = & gt; 'आवश्यक | ईमेल', 'पासवर्ड' = & gt; 'आवश्यक | न्यूनतम: 6 '); मैं जानना चाहूंगा कि यदि यह संभव है कि पहले स्थिर मान्य एरे को संदर्भित करें और पूरे नियम को फिर से लिखने के बिना अतिरिक्त एक सत्यापन नियम जोड़ दें, क्योंकि मैं वर्तमान में कर रहा हूं। < p> मुझे पता है कि आप स्थिर घोषणाओं से किसी भी चर का संदर्भ नहीं दे सकते हैं, लेकिन मैं सिर्फ जानना चाहूंगा कि मॉडल में मॉडल सत्यापन नियमों को संग्रहीत करने के लिए बेहतर तरीके हैं। आप $ मान्य करें को जोड़ सकते हैं और केवल $ validateCreative के अद्वितीय कुंजी / मान का उपयोग कर सकते हैं। इसके अलावा, चू

c++ - c++11 what is the scope for the lambda function below -

If it does not capture if it does not capture, as a result, given the example given below this water, what should I expect from the life time of this function available for callback? The lambda function is defined on which scope? Local area, package area, global scope? In this case, there is a problem calling the Lambda after the function is out? I am not using std :: function here, so please do not respond to the solution with the std :: function return value. My question is to really understand the scope of that function (without confinement) and if it is available for the lifetime of the program. #include & lt; Iostream & gt; Typef int (* FPTT) (int, int); fPtrT fx () {return static_cast & lt; FPtrT & gt; ([] (Int i, int j) {return i + j;}); } Int main () {std :: cout & lt; & Lt; Fx (5,2) & Lt; Std :: endl; } A lambda expression gives an example of an anonymously defined class (type). Is known only for the compiler). Overload

javascript - Vertical grid with EXT JS -

I want to use EXT JS grid panel to show some data, but I want something like this: < First Name Foo Last Name Age < First Name Last Name Age Country US Country Foo Bar 18 US Believing that there will be only one record. What do I have is the loop through the brain record and create a new table containing each specific information in each row. Something like this: [['First name', 'Foo'] ['Last name', 'Bar'] ...] But I want to know what is a better solution / approach. Thanks I think you Looking for

Scheme function that returns a function -

I have to write a scheme function which returns a function which then takes another argument, such as a list And in return the desired result. (c? R "arg" ( > ( > ((R? R "r") '(1 2 3 4)) 2> ((c? R "era") ((1 2) 3 4)) 2 I have a problem that how can I return a function that accepts another ARG in the pedit In this way you can write an action like this: (Define (CRDs) (Lambda (LCT) (repeat (cm-DDS (string-> cmds) () () () () () () () () () () () (CDR cmds) ) (CDR (Re-(CDR cmds)) ((blank (CDR cmds)) Meditation I am using d to indicate cdr . >, r is not (which I do not understand). You can type it more concise by using string-fold-right (required): (Define (CRD) (Lambda (LCT) (string-fold-wright (Lambda (CMD X) (Case CMD (#AA) (Car X)) ((#D) (CDR X) )) (And X)) LCD CCDs)))

Ruby class instance fields hidden -

This is a very simple question, but I can not understand what is happening here. This is my simple model: class user attr_accessor: first_name, last_name end I can write first_name and user for the last_name field, and when I call that user through the specified variable, I get this: & gt; U = & gt; # & Lt; Users & gt; This does not show the fields I wrote but when I do this (for the previous and first names): & gt; U.first_name = & gt; "John" When I call u the whole object is not showing? Like = & gt; # & Lt; User first_name: 'john' lastname: 'smith' & gt; . What do I need to add to my model to get that output? thank you in advanced. One object is string to_s The method used for human-readable debugging output is inspection . Some environments also use other methods, e.g. pry (or some plugins) uses pretty_inspect for "beautiful" human-readable debugging output. You need

css - Aligning Text and Button in Toolbar -

I have established Fobb on my blog yet but customer support has not responded in my query after a few weeks. is. I am implementing the custom revision () given by them to add a similar button to the toolbar at the top basically. Everything that I'm doing is to align some text before & lt; Div id = "social_target" & gt; & Lt; / Div & gt; , so text and choice will be aligned to look like "Button Like Us! LIKEBUTTON" on Facebook! Now when I & lt; Div id = "social_target" & gt; & Lt; / Div & gt; , the text appears but the button appears as under the text, so it is not visible at all. How do I do this? I do not know how WordPress works and if you have access to the HTML code, but if So, try putting text in a single div and implementing some CSS, something like this should be done: & lt; Div style = "width: 400px;" & Gt; & Lt; Div style = "float: left;" & Gt; Us on face

lucene.net - Lucene wildcards and words with the letter 's' on the end -

I have some problems knowing about what is happening with my discovery of the searches. Gloves: * Search: gloves * Search: Gloves * (Numbers: gloves *) or (Numbers: Gloves Search: Gloves SpellCheckerSource: Gloves) or (Numbers: Gloves * Search: Gloves * SpellCheckerSource: Gloves * ) For the above I get the following written time again (() () ()) (Numbers: Search gloves: Gloves SpellCheckerSource: (Search: gloves *) ConstantScore (SpellCheckerSource: gloves *)) Using this Luke, I query in Luke What are you doing to bring to try to see it. What I want to be able to do now is finding a word i.e. gloves * which ends (() () () ()) I do not understand that Why does this kind of translation be there with my query or with my index and this issue? Luke says to me as the structure description lucene.BooleanQuery section = 3, maxClauses is as follows = 1024 Section 0: Lucene.BooleanQuery section = 3, maxClauses = 1024 Section 0: Want lucene.BooleanQuery section = 0, maxClau

sql - Filter DataTable by DateTime (ShortDate) -

I am working on the VB.Net project in Visual Studio 2013, and I have a data table in which the short date "date Bought format "in the column named" I want to filter the data, such that all the passes passed through the filter are imported into other data tables. For example, if the minimum filter was "01/01/1750" and the maximum filter "01/01/2050", a row with "4/12/1989" in the appropriate column will be imported into a separate table. The filter looks like this: String = "01/01/1750" as a slow date string = "01/01 / 2050 "String =" Date Date Expression = "Date Received & gt; = #" & amp; Date man and amp; "# And date purchased & lt; = #" & amp; Date time.ppers (date max. Text) & amp; "#" Slow datefilters () = oldTable Detroit date for Detroit for every R. FILTER NEWTABLE Import Error (R) Next My problem is that I get the error message "Additional Inf

java - How to make JFrame pause thread similar to how JOptionPane works -

I am making a game and whenever the player comes in contact with an enemy, give me a JFrame If you want to fight with the enemy, then pop up to ask, but when JFrame pops up, the game continues in the background. I JoyPoppenPennus , the thread pauses until the joppenpane goes . How do I get a similar effect with a JFrame solution? Not using a Jeffreame - You are asking for a window that acts as a modal dialog - so Usage is a modal dialog, a JDILOG is accurate Note that this is the same as the postpane.

xcode5 - Xcode 5.1.1 Not compatible with versions of iOS prior to 5.1.1 -

This post tells how to disable ARM 64 so that your app is valid for iOS 5 targeted. The error message clearly states that iOS 5.1.1 is a valid deployment version, but in Xcode 5.1.1 which is not just an option in the Deployment Target section 5.1. Is there an editable file where we can change the value in the drop down? Instead of disabling ARM 64, does XXC have any meaning in trying to change the value? iOS 5.1.1 is the most recent version of iOS that runs the original iPad and IAM is still targeting them, so I want to deploy them without affecting performance on IAC. I changed the architecture to $ (ARCHS_STANDARD_32_BIT) and it is valid. When I changed it back to default, Xcode prompted me to change my iOS deployment target to 5.1.1 and I said okay. I'm not getting the error if I'm not valid. I think, but I did not try to do this, so that you can also edit values ​​in the exode. If you open the project settings with the version editor, you can see the deploym

ios Core Data Fetch a specific value -

So I'm reading a question on Apple's Core Data Guide and Stack and it's all right, but it's not just enough "Clicking" in my head I have bookshops in which books have multiple relationships. I entered a bookshop called "Jenny's Bookshop" and called the bookshop "Big World Book" In the same way, I will add a 'new book' to a new bookstore: BookShop * myBookShop = [NSEntityDescription insertNewObjectForEntityForName: @ "Bookshop" Managed object contexts in: context]; MyBookShop.books = [[NSMutableSet alloc] init]; Book * myBook = [NSEntityDescription insertNewObjectForEntityForName: @ Managed object contact in "book": context]; MyBook.BookShop = myBookShop; [myBookShop addbookObject: myBook]; Say I want a book that is related to "Big World Books" and not "Jenny's Bookshop" I'm assuming that I have a fetch Use the request and take a pointer on "Big World Books&qu

java - How do I change an integer that is given by the user to a string? -

I am working on a method for a program, and I need to change the integer in the method without any changes Method Header This method should be able to produce zero in the beginning, and the only way to do this can be by string. I have tried many different ways, but I am not sure if this is not a predefined number to work with you then how it should work. There has been no help from the internet so far. Can someone help me point in the right direction? Public Static Ent encryp {int digit4 = (num + 7)% 10; Number / 10 = 10; Int digit3 = (num + 7)% 10; Number / 10 = 10; Int digit2 = (num + 7)% 10; Number / 10 = 10; Int digit1 = (num + 7)% 10; Number / 10 = 10; Return (score 3 * 1000 + numeral 4 * 100 + digit 1 * 10 + 2;); } to get the value of a int and Put this into a string use the method: String.valueOf (int variable) .

php - Deleting rows from table on web retrieved from database -

I am having trouble removing rows from a database that I have seen on my website, Used and should be removed when multiplier is selected. But this is not happening just now! Nothing is going to be removed from the database! Please help! & lt; form method = "" action = "tester.php" & gt; & Lt ;? Include php 'connect_to_mysql.php'; $ Count = 0; $ = Mysql_num_rows ($ result) count; $ Result = mysql_query ("Choose from the booking order by the ADC select"); Akho "& lt; Table border = '1' & gt; & lt; tr & gt; <<> & Lt; th & gt; Email ID & lt; / th & gt; & lt; th & gt; Phone Number & lt; th & gt; Archive Address & lt; / th & gt; & lt; th & gt; Collection Time & lt; / th & gt; & lt; th & gt; Make & Model & lt; / th & Gt; Th & gt; Message & lt; / th> & lt; / tr & gt; "; While ($ line = mysql_fet