Tuesday 15 May 2012

javascript - Success callback for Azure mobile services `push.apns.send` -


push.apns.send विधि सफलता कॉलबैक को कॉल नहीं करता है। इसलिए सफल निष्पादन के मामले में हम यह निर्धारित नहीं कर सकते हैं कि यह ऑपरेशन कब पूरा किया गया था।

यहां मेरा कोड है (यह एक सर्वर साइड स्क्रिप्ट का एक हिस्सा है जो उस डेटा टेबल में से एक के लिए सम्मिलित होने की घटना पर चलता है):

  push.apns.send (message.deviceToken, {alert: message.alert, बैज: message.badge, ध्वनि: message.sound, पेलोड: {message: message.alert, appID: Message.appID}}, {सफलता: कार्य (resp) {console.log (resp)}, त्रुटि: फ़ंक्शन (त्रुटि) {console.error (err)}})   

< कोड> त्रुटि कॉलबैक काम करता है उदाहरण के लिए जब मैं अमान्य deviceToken पास करता हूं, तो मुझे लॉग में त्रुटि संदेश दिखाई दे सकता है लेकिन सफल निष्पादन के मामले में लॉग में कुछ भी नहीं है। ऐसा लगता है कि यह सफलता कॉलबैक को बिल्कुल भी नहीं बुलाता है।

यह इस उदाहरण में नहीं दिखाया गया है, लेकिन मेरे मामले में मुझे सफलता कॉलबैक की आवश्यकता है रिकॉर्ड की स्थिति को बदलने और इसे बचाने के लिए।

दुर्भाग्यवश, यह कैसे काम करता है असल में, कवर के तहत एक टीसीपी कनेक्शन एपीएनएस के लिए खोला जाता है और बाइट्स (ठीक से स्वरूपित) आपके संदेश से संबंधित सेवा को भेजा जाता है। यदि पुश सफल होता है, तो एपीएनएस कोई प्रतिक्रिया वापस नहीं भेजता है। अगर ऐसा नहीं होता है, तो यह तत्काल जवाब दे सकता है (जो कि ऐसा मामला है जहां त्रुटि कॉलबैक कहा जाता है), या यह हो सकता है - और बाद में जब आप फीडबैक सेवा का उपयोग करने का प्रयास करते हैं तो हो सकता है आपको यह बताता है कि एक त्रुटि थी।

इसलिए, यह देखते हुए कि कॉल करने वाला कॉलर को कोई भी विश्वसनीय तरीका नहीं है, यह पुश सफल हो गया, टीम ने फैसला किया कि यह नहीं है सफलता कॉलबैक जोड़ने के लिए समझें (जो गलत असर डालती है कि धक्का सफल होता है)।

एक अनुमानी जिसे आप उपयोग करना चाह सकते हैं, पहले धक्का भेजना है, तो कुछ समय के लिए प्रतीक्षा करें ( setTimeout ), और अगर त्रुटि कॉलबैक लागू नहीं किया जाता है, तो आप मानते हैं कि पुश सफल था ध्यान दें कि जैसा कि मैंने ऊपर उल्लेख किया है, यह 100% सही नहीं है, लेकिन यह आपके परिदृश्य के लिए पर्याप्त हो सकता है।

MySQL - populating a column with a substring from another column in the same row -


I would like to run on a full table, which will populate the value of a newly created column with another substrung value Will make the column

In view of the table structure, unlike the following table:

  + -------- + ------------ - + ------ + ----- + --------- + ---------------- + | Field | Type | Faucet Key | Default | Extra | + -------- + -------------- + ------ + ----- + --------- + - - ------------- + | ID | Int (11) | No | PRI | Faucet Auto_interpretation | | Email | Varchar (150) | Yes. | Faucet | | Domain | Varchar (100) | Yes. | Faucet | + -------- + -------------- + ------ + ----- + --------- + - - ------------- +   

contains data:

  + ---- + --- - --------------------- + -------- + | ID | Email | Domain | + ---- + ------------------------- + -------- + | 1 | Bob@domain1.com | Faucet | 2 | Jim@domain1.com | Faucet | 3 | Terry@domain1.com | Faucet | 4 | Frank @ anotherdomain.com | Faucet | 5 | Linda@anotherdomain.com | Faucet | 6 | Craig @ thetheird.com | Faucet + ---- + ------------------------- + -------- +   < P> I have a query to parse the domain part of the email address and put it in the Domain column, as it ends with the result:  
  + ---- + - ------------------------ + ------------------- + | ID | Email | Domain | + ---- + ------------------------- + ------------------ - + | 1 | Bob@domain1.com | Domain1.com | | 2 | Jim@domain1.com | Domain1.com | | 3 | Terry@domain1.com | Domain1.com | | 4 | Frank @ anotherdomain.com | Anotherdomain.com | | 5 | Linda@anotherdomain.com | Anotherdomain.com | | 6 | Craig @ thetheird.com | Thithard.com | + ---- + ------------------------- + ------------------ - +   

Currently, I'm doing of MySQL engine with a shell script, but it is disabled, and I'm sure there is one It is a better way to do this inside the MySQL engine.

The efficiency here is important, because the tables I'm doing in production are tens or even hundreds of thousands of rows.

You can use:

  SELECT id, email, SUBSTRING_INDEX (email, '@',   

or to update your data:

  Set your thread to domain = SUBSTRING_INDEX (email, '@ ', -1)   

Please see Bela.

x++ - AlwaysOnTop property not behaving properly -


For any reason, the AlwaysOnTop feature is not working properly for the design of a form.

References here: We are trying to create a form that stays on every other when it is opened. Not simple? Apart from this, we do not want to set a popup to windytip according to my best, for any other reason (if you have any ideas, please let me know).

So my question is, is there a parameter / security feature that at any time bans the form at any time?

Even the setting of WinApi is also the form's HWD

What I have done to solve it, by creating a form model through WinAPI, the code below There is a copy from a saved text, so it may need to be polished. (Also keep in mind that it can not work as AX-2009.)
  zero setformmodel (int_ethis hwnd, boolean_bomodel) {DLL _winApiDLL; DLLFunction _EnabledWindow; DLLFunction _getTop; DLL function _getNext; DLLFunction _getParent; Zero Local_AbbHandD (atlhwnd) {int lanxwand; LnextWnd = _getTop.call (_getParentCall (_lHWND)); While (lnextWnd) {if (lnextWnd! = _lHWND) _enabledWindow.call (lnextWnd, (! _bModal)); LnextWnd = _getNext.call (lnextWnd, 2); }}; _winApiDLL = new DLL ('user32'); _getNext = New DLLFunction (_winApiDLL, "GetWindow"); _EnabledWindow = New DLLFunction (_winApiDLL, "EnableWindow"); _getTop = New DLL function (_winApiDLL, "GetTopWindow"); _getParent = New DLL function (_winApiDLL, "GetParent"); _getParent.returns (ExtTypes :: DWORD); _getParent.arg (ExtTypes :: DWORD); _EnabledWindow.returns (ExtTypes :: DWORD); _EnabledWindow.arg (ExtTypes :: DWORD, ExtTypes :: DWORD); _getTop.returns (ExtTypes :: DWORD); _getTop.arg (ExtTypes :: DWORD); _getNext.returns (ExtTypes :: DWORD); _getNext.arg (ExtTypes :: DWORD, ExtTypes :: DWORD); Local_enableWHND (_thisHWND); Local_enableWHND (_getParent.call (_thisHWND)); }    

Text files edit C -


I have a program that takes the data given by the user (int, floats, and string) and in a text file Writes. Now I have to update a portion of the written data. For example:

In the 4 lines in the file, I want to change the first 2 words (a int and a float ). How can I do that?

With the information I found, fseek () and fputs () can be used but I do not know how to actually go Specific line

(The code explained will be appreciated because I'm a starter in C)

You can not "insert" the characters in a file, you must create the program, which will read the entire file, then copy the part before entering a new file, your version, the rest file.

javascript - How to call a function to an element dynamically loaded by Ajax? -


I'm trying to use the Select jQuery plugin, but my content is loaded by Ajax, And I'm not getting it to work.

I am using Grails and I do not want to inline code, so I tried to load it with .on () jQuery method, but I could not get it later I do not want to put an incident, I want to load it when my content loads, and I can not find another solution

I am trying to do something like this: < P> My page calls a remote link:

  & lt; G: remoteLink controller = "strategy" action = "index" update = "content box" & gt; & Lt; / G: Rematilink & gt;   

Then, all my HTML selections have to be triggered by the plugin and provide the plugin from the general selection:

  $ (document) .on (' Click ',' selection ', function () {$ (select'). SelectBoxIt ()})   

But I do not want to trigger them with click event, Are called, then they should trigger right.

Since my content has not been added to my first page load, I thought that the .on () method was the right choice but it gives me an event, and when the page loads () < / P>

Thanks in advance.

Maybe reading this, and sorry, I can not help much.

ios - Objective - c - Pointers and what really happens when you assign an array to another -


So I'm wondering what happens when I do it

  NSMutableArray * Arr1 = [[NSMutableArray alloc] init]; NSMutableArray * arr2 = [[NSMutableArray alloc] init]; [AR1 adobect: OB1]; Arr2 = arr1; [Self change value: [AR2 object atindex: 2]]; // will modify the function that has been sent to it   


1) Can I also = in the middle? = 2) If I was using Object in 1 and 1, will it be modified?
3) How deep is this? - If I want to access that object from some other place, will it be modified?
4) I'm using a mutual coop, which will completely return the new array.
5) Anyway add this deep / simulation to add? For example, if I want to give the same object to 2 different arrays, then if I have modified one, can it change that object in both arrays?
6) What does this mean? I do not think this is link / link.

Thanks a lot - Jamaica

I think that You are confused objects and variables you do not specify one object in another; You assign objects to the variable Variables is a way of looking at an object, which otherwise would float somewhere in your program memory space. Two variables can point to the same object, and when this happens, then yes, you can see the change in the object through both the variables, because this is the same object .

When you do arr2 = arr1 , you're passing arr2 point to the same array array1, so if you change something in arr1, will you see it in AR2 ? Yes, because arr2 is arr1 . This is the same thing, which is also called two different names.

Instead it was arr2 = [arr1 mutableCopy] , yes it would create a new array object, so two variables would be pointing to different objects If you add an object to an array, it is not magically added to the other but it raises the question: What if arr1 has a bunch of NSMutableStrings? Changing one of the strings in Arr1 will also change the same string in AR2? Yes, because although the array itself is a different object, it still has the same object as the original Aare.

Therefore, the way to think about this is by connecting or connected in two ways. The only question you need to ask is, "Are these objects that I am talking in two places in the same thing or in different parts?"

java - Why Stack overflow error occurs on creating nonstatic instance within an instance? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 5 जवाब

    क्यों स्टैक अतिप्रवाह त्रुटि उत्पन्न होती है समान श्रेणी के एक उदाहरण के भीतर गैर-स्थिर उदाहरण बनाना ??

      सार्वजनिक वर्ग ObjectTest {ऑब्जेक्टटस्ट उदाहरण ओबज = नया ऑब्जेक्ट टेस्ट ("बाहर"); सार्वजनिक वस्तुटस्ट (स्ट्रिंग्स) {System.out.println (s); } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {ObjectTest localObj = नया वस्तुटैस्ट ("इनसाइड"); }}   

    लेकिन समस्या नीचे संशोधित करके हल हो गई है:

      स्थिर वस्तुटस्ट उदाहरण ओबज = नया ऑब्जेक्टटैस्ट ("बाहर");   

    यह समझा जाता है कि पहले ऑब्जेक्ट को instanceObj संदर्भ

    के लिए नई ऑब्जेक्ट निर्दिष्ट करते समय परिपत्र निर्भरता तब होती है? स्थिर संदर्भ परिपत्र निर्भरता के लिए क्यों नहीं होता ??

    जब उदाहरण OSb गैर है स्थिर, ऑब्जेक्टस्टेस्ट के लिए कन्स्ट्रक्टर दूसरे ऑब्जेक्टस्टेस्ट बनाता है, जो दूसरे ObjectTest बनाता है, और इसी तरह विज्ञापन अनन्त जब यह स्थिर होता है, तो पूरे ObjectTest वर्ग के लिए केवल एक instanceObj बनाया जाता है ... यह है स्थिर, सभी के बाद :) उदाहरण के लिए ओजज स्थिर है और इसकी ObjectTest बनाया गया है, यह पहले से ही स्थैतिक उदाहरण ओज है, जो कि स्वयं है यह कुछ करने के लिए इस्तेमाल किया जाता है, यह कागज पर इसे काम करने में मदद कर सकता है और यह सुनिश्चित कर लें कि आप स्थिर कीवर्ड का क्या मतलब है।

java - Jackson Polymorphic Deserialization Field Errors -


I am getting an error while trying to deserialize json in an abstract type.

Code:

  @JsonTypeInfo (use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@ Class ") Public abstract class animal {} public square dog expansion animal {} Public square zoo (animal a;) @RequestMapping (value =" / zoos ", method = RequestMethod.POST) Generate Public Zero (@RequestBody Zoo) { ...}   

When I post the following zson in zoos:

  {"@class": "com.example.Dog", "A": {}}   

I get an error: org. Codehaus.jackson.map.exc.UnrecognizedPropertyExcept Ion: Unrecognized area "@ class" (class com.example.Zoo), which is not unknowingly marked

What am I doing wrong?

Okay, I'm stupid:

must be json:

  {"A" : {"@class": "com.example.Dog"}}   

Because @ class belongs to the type of animal.

html - How to load bootstrap thumbnail images -


I have started using bootstrap for a project, and in particular, on the thumbnail component, the following sample code was shown Gone:

  & lt; Ul class = "thumbnails" & gt; & Lt; Li class = "span 4" & gt; & Lt; A href = "#" square = "thumbnail" & gt; & Lt; Img data- src = "holder.js / 300x200" alt = "" & gt; & Lt; / A & gt; & Lt; / Li & gt; ... & lt; / Ul & gt;  & lt; Img & gt; Report the use of   

to replace the normal src attribute at data-src > tag.

I think my thumbnail should work, I should use data-src instead of src for images, but not so It looks like I'm able to load images only by defining the src attribute.

Is this a typo in the documentation, or am I data-src ?

Div class = "post-text" itemprop = "text">

I believe that the bootstrap men are data-src Holders are using src , the only reason being is the holder Due to Js you should use src instead of data-src , because because of the data-src is used only for the Javascript library The generic feature for specifying the location of the image is generated (source :)

Why are they using the data-src in the documentation? I think the syntax also by the library & lt; Img src = "holder.js / 100x200" & gt; & Lt; / Img & gt; is accepted, when we reach the page, there is a 404 error even when it appears in the image, whenever the image is displayed, because there is no file in the specified path, it is strange.

In that documentation code? I do not really know if this is a mistake. But I'm sure you should use data-src instead of src in the thumbnail.

amazon web services - SCP to instance store of aws instance -


I have an example of ec2 that has a root device and it has an instance store attached. There is no problem when I make a SCP in the root device, but when I give SCP at the instance store, I get a deprecated error with permission. The order I am using is following Scp -i / home / usmanmahmood / Desktop / abc / UsmanMahmood_KP.pem ~ / Desktop / iozone3_414.tar ubuntu@ec2-54-224-70-78.com Pat 1 Amazonaws.com: / Mnt

The error that comes is scp: /mnt/iozone3_414.tar: permission is denied.

Can you tell me what the problem is, and whether its storage is on MNT? I am doing MNT because when I do "df -h" then after SS login I get the following output

The file system size should be used %% / dev / Xvda1 7.9G 876M mounted at 6.7G 12% / udev 819 m12 819 m1% / dev TMPFS 331 m 168 of 331 m1% / run non 5.0 m 5.0 5.0 m 0% / run / lock number 827 m 827 m 0% / run / smm / davy / xvdb 147 g 188 m 140 g 1% / mnt

Finally I think the instance store / mnt is on help

You can not actually make a script in the installation store, it is not a continuously store device that is connected to it, please be aware of this fact. If you stop rebooting or installation, you can damage the data stored in the example that is stored, so I do not suggest you store any important data in / mnt / Access will not

ruby on rails - Kind of ugly- default value for non-existent hash key? -


I am working with the API which gives a yes to represent the product: < Pre> Prod = API.getProduct (id) prod ["name"] = & gt; "Widget"

causes this problem because all products do not have the same attribute pages, so I'm doing a lot to catch myself an error - something Products will have size or colors , nothing will happen.

prod ["non-existent attribute"] = & gt; What is the easiest way to get it? "NA"?

As Dave Newton said, you can add default value to hash creator:

  hash = hash.nu {| Hash, key | Hash [key] = "na"} hash [: anything] == "NA" # = & gt; Use the correct   

or #default method:

  hash = hash.new hash.default = "NA" hash [: Anything] == "NA" # = & gt; Quick Start   

Edit is quick syntax for setting a default value when starting a hash:

  hash = hash.New ("NA") hash [: anything] == "NA" # = & gt; True    

c - mmap on iOS returns sometimes 0xffffffff -


I try to use mmap on iOS devices with the following code

  Struct stat; Integer position; Size_t size; Int FD; Fd = open ([datafile cStringUsingEncoding: NSUTF8StringEncoding], O_RDONLY); Fcntl (fd, F_NOCACHE); Position = fstat (FD & S); If (position & lt; 0) {// error handling} size = s.st_size; Funkfile log (@ "% @", @ "before reading"); Offset offset = 0; Char * data = (four *) mmap (faucet, size, PROT_READ, MAP_SHARED, fd, offset); Char * pch; Int lastPosInString = 0; PCH = strchr (data, '\ n'); Long line control = 0; While (pch! = NULL) {size_t lineLength = 0; Int posInString = pch - Data + 1; Line length = posInString - lastPosInString; Four * out = callok (line lang, size (four)); Memcpy (Outside, Data + Last Pose InString, Line Lang); Out [lineleth - 1] = '\ 0'; If (line quint> gt; 0) {// do something} lastPosInString = posInString; PCH = strchr (PCH + 1, '\ n'); LineCounter = lineCounter + 1; } Mappapp ((Zero *) data, size); Close (FD);   

This works but sometimes for no reason when I read a file about 3.5 MB, I get an EXC_BAD_ACCESS because my data pointer is with mmap 0xffffffff I'm thinking that's an error. And it seems only to be in the simulator.

I get errno: 12 currently only guard Molok, guard edges, manipulation and simulator with zombies

I recommend reading the man page for the mmap (Open the terminal.app and type man mmap )

  On the successful completion of return value, mmap () returns an indicator in the mapped area. Otherwise, the value of the MAP_FAILED has been returned and the error has been set to indicate an error. There is also a section that describes  errno  which can also be set   

Oracle, 2 procedures avoid deadlock -


I have two processes that I would like to run on a single table, use a date of birth and other update names and Last name is taken from the third table.

The person who uses Birthdays to update the age field runs on all the table, and who updates the name and last name only updates the rows that are in the third table Based on the key.

So I launched both and got it! Is there any way to give priority to any of them? I read about the nowait and shut down for updates, but then, how do I return people left?

Hope you can help me on this !!

There is a possibility that you update all the rows at one time. All updates to the same update statement will complete it.

 Whatever you choose from T ... for updates ...  

There is another solution that I call " Gatekeeper "table, both processes must lock the gatekeeper table in the unique first unique mode to update the table in question. The second process will be blocked until the first is committed, but the deadlock will not happen. In 11G you can create a table with allocated space.

There is a difference in putting a line in the gatekeeper, then only lock that row with the selection for the update, then you can use the gatekeeper in other situations.

html - Why is my hr tag behaving differently in two places? -


I am using the same class selector, but I do not understand why it behaves differently Has been doing.

This is my website:

In the first example, the margins are fine; In the second case, no.

  & lt ;! - Side navigation __________________________________ - & gt; & Lt; Div class = "side_nav_wrapper" & gt; & Lt; Div class = "side_nav_photos" id = "side_wrapper_text" & gt; Photo & lt; / Div & gt; & Lt; Div class = "side_nav_about" id = "side_wrapper_text" & gt; About & lt; / Div & gt; & Lt; Div class = "side_nav_writing" id = "side_wrapper_text" & gt; Writing & lt; / Div & gt; & Lt; Div class = "side_nav_contact" id = "side_wrapper_text" & gt; Contact & lt; / Div & gt; & Lt; / Div & gt; & Lt ;! - Contents ____________________________________________ - & gt; & Lt; Div class = "content_wrapper" & gt; & Lt ;! - Photo __________________________________________ - & gt; & Lt; Div class = "home_photo" & gt; & Lt; / Div & gt; & Lt; Hour class = "line" & gt; & Lt ;! - ___________________________________________________ - & gt; & Lt; Div class = "home_text" & gt; & Lt; P & gt; Emma Carmichael is a writer and editor based in Brooklyn, NY, though she graduated from Vassar College in 2010 with a degree in Emma Urban Studies, from Brattleboro, VT; The subject of his thesis about women's rappers, etc. & Lt; / P & gt; & Lt; / Div & gt; & Lt; Hour class = "line" & gt;   

(Besides, I do not understand why this class is not implemented):

  #side_wrapper_text a: link {font -family: Playfair display ', without serif; Font-size: 20px; Font-weight: 100; Color: RGBA (255,255,255,1); Text-decoration: None; Text align: center; Letter-distance: 0.2em; } & Lt; Div class = "side_nav_wrapper" & gt; & Lt; Div class = "side_nav_photos" id = "side_wrapper_text" & gt; Photo & lt; / Div & gt; & Lt; Div class = "side_nav_about" id = "side_wrapper_text" & gt; About & lt; / Div & gt; & Lt; Div class = "side_nav_writing" id = "side_wrapper_text" & gt; Writing & lt; / Div & gt; & Lt; Div class = "side_nav_contact" id = "side_wrapper_text" & gt; Contact & lt; / Div & gt; & Lt; / Div & gt;   

thanks !!

your class home_text attribute float: left; , which will flow from the document flow to that & lt; Div & gt; takes element if you remove that float feature, you will see that ; Div & gt; Recognizes the document flow, and & lt; Hr & gt;

Alternatively, you can clear : both to fix it like this:

In your CSS file:

 . Explain {Clear: Both; }   

In your markup:

  & lt; Div class = 'home_text' & gt; ... & lt; / Div & gt; & Lt; Div class = 'clear' & gt; & Lt; / Div & gt; & Lt; Hr square = 'row' / & gt;    

dart - typedef for map from M to M -


Dart is working on a learning library called "Daphankt" and I am trying to express a function that is wrapped in a wrapped A ma) and after applying one to b, gives rap b (MB) , Ensuring that the type of cover is the same.

  typedef r func1 < T, R & gt; ( 

T input); // & lt; - is included for completeness, but related Typedf M & lt; B & gt; Lift & lt; M. Monad, A, B & gt; (M & T; A & gt; source, funk 1 & lt; a, b & gt; map); Typedef Mb lift & lt; M Monad expands, MA & LT; A, A, MB Extended M & LT; B & gt ;, B & gt; (Ma source, funk 1 and lieutenant; a, b & gt; map);

- I am creating due to less expressive type in the mean time but it lacks any kind of guards, who say that 'M' B is being provided as a source And this is not to protect the result of 'M of B' in the implementation:

  typed thefifferent lift & lt; M Monad, A, B & gt; (M source, funk 1 and lt; a, b & gt; map);   

- If there is another way of expressing it ... I remember ...?

Both of these are incorrect:

  Typedef m & lt; B & gt; Lift & lt; M. Monad, A, B & gt; (M & T; A & gt; source, funk 1 & lt; a, b & gt; map); Typedef Mb lift & lt; M Monad expands, MA & LT; A, A, MB Extended M & LT; B & gt ;, B & gt; (Ma source, funk 1 and lieutenant; a, b & gt; map);    

The problem is that you are saying that M is a type of variable, and type variables do not take any arguments then you can not write:

  M & LT; A & gt;   

Why is that so? In summary, the answer is that the actual value of M can be sub-class of monad, which does not have type parameters (or there are more types of criteria than monad).

Then you can express the "best" type:

  Type Diff R lift & lt; A, B, M. Monad & lt; A & gt ;, R increases Monad & lt; B & gt; & Gt; (M Source, Phanak 1 and Lt; A, B & gt; Map);   

My recommendation is not to try it, it will be very easy to use:

  typed mont & lt; B & gt; Lift & lt; A, B & gt; (Monad & lt; a & gt; source, funk 1 & lt; a, b & gt; map);   

Please note that the type rules in Dart are sufficiently loose, so you can use any sub-class of Monad.

javascript - jQuery .add() using generated element not working -


I am trying to loop through an array, so that its values ​​can be used to create the collection of elements. Which can later be added to the DOM.

By doing this, I am using this code:

  $ (). Add ($ ('& lt; span / & gt;', {class: 'child', text: 'test'})). Attachments ('Container');   

Or something like this ... the generated element is not added to the collection here with a simple example:

Just use a simple array and push your elements into your array. var spans = new array (); Console.log (spans.length); Spans.push ($ ('& lt; span / & gt;', {class: 'child', text: 'test'})); Console.log (spans.length); $ ('. Container') attached (spread).

In your post-bedel you are mixing container and parent class, which is why app () still does not work. Have given.

javascript - Avoid event superposition in FullCalendar -


Hello I'm trying to avoid overlapping incidents in an FullCalendar app. EventDrop has defined the callback, so it checks any overlapping events, and transfers the currently moved event to the end of the overlapping by changing the event.start and Event.end accordingly, and then calling .fullCalendar ('updateEvent', event) .

This is my code, is the moment call for which there is a time handling feature library for javascript and I do not think the problem is copy if I comment on those links I do that, event.start = start; Event.end = end , then all works normally if I do not, then it breaks in exactly the same way, whether or not I call on updateEvent Is: The event is transferred to the end of the last one, but if I try to transfer this event later (in the day after that place) then the last event will be visually expanded. Is not new beginning Shall be given phenomena occurring at present revised.

self.collection is a backbone collection, so this code is called with just event.start = bit comment overlapping, but if I If the page refreshes, the event appears in their right spot (not overlapping)

  eventDrop: function (Event, Dedata, Minute Delta, Olde, ReverseFunk, JSEvent, UI, V) { Var start = moment (event.start); Var end = moment (event.end); Var overlap = self.calendar.fullCalendar ('clientEvents', function (ev) {if (ev == event) return false; var estart = moment (ev.start); var eend = moment (ev.end); return estart .unix () & lt; end.unix () and eend.unix () & gt; start.unix ();}); If (overlap lamb) {overlap = overlap [0]; Var estart = moment (overlap.start); Var end = moment (overlap.and); Var period = termination - estart; Start = eend; End = start.clone (); End.add (period); Event.start = start.toDate (); Event.end = end.to Date (); Self.calendar.fullCalendar ('updateEvent', Event); } Event.model.save ({start: start.unix (), end: end.unix ()}); },    

Okay, got the problem.

The row that says

  start = end;   

should be

  start = eend.clone ();   

Because it does not do this by wrapping it into a moment object, it just puts a reference, and it's start date object Code> overlap.end

Algorithm for diameter of graph? -


If you have a graph, and need to find it in diameter (which is the maximum distance between the two nodes) How can you do this in O (log v * (v + e)) complexity.

Wikipedia says that you call it binary heap . But I do not understand how it works. Can anyone please explain?

Or show a pseudoepod?

g = (v, e) for the general graph none < Code> O (Log V * (V + E)) The time-intensity algorithm known to calculate the diameter is the current best solution O (V * V * V) , for example, Computing all the least paths with the Floyd Warshal algorithm. For the rare graph, that is when e is in o (N * N) , then Johnson's algorithm gives you the O (V * V * log (V) + V with E) The complexity of a better time.

If you have certain properties in the graph, then you can be better.

So the bad news is that, Dish would not be enough in the general case ...

ruby on rails - two belongs_to same model assign id using name -


I'm new to ROR and I'm working on creating a database. Each host has two system administrators. I am trying to associate the name given during my hosting with my respective system admin.

If a user inputs the name of the system administrator, how can I get the ID using that name and enter that ID in the primary_saidmin_id field?

Systemadmin.rb class systemadmin & lt; ActiveRecord :: Base attr_accessible: id,: email ,: location ,: name,: netid ,: priphone ,: hason_monary: primary_sysadmin ,: class_name = & gt; 'Host',: foreign_key = & gt; 'Primary_sadmin_id' is_maya: secondary_sysadmin, class_name = & gt; 'Host',: foreign_key = & gt; 'Seconary_sadmin_id'

host.rb

  class host & lt; ActiveRecord :: Base attr_accessible: iogroup ,: ip ,: location ,: name,: opsystem,: primary_sadmin_id ,: purpose, secondary_sadmin_id ,: host_type belongs_to: primary_sadmin ,: class_name = & gt; 'Systemadmin',: foreign_key = & gt; 'Primary_sadmin_id' is_to: secondary_sadmin ,: class_name = & gt; 'Systemadmin',: foreign_key = & gt; 'Secondary_sadmin_id' end   

host_controller.rb def make @ host = host.new (consult [: host]) @ host.promery_saidmin_id = system admin Find_by_name (: Sa_name1) @ host.Secondary_sadmin_id = Systemadmin.find_by_name (: sa_name2) response_to do | Format | If @ host.Save format.html {redirect_to @host, notice: 'Host was created successfully.' } Format.json {Render Jason: @ host, status :: created location: @ host} and format: {action: "new"} format.json {json: @ host.errors, status :: unprocessable_entity} end-end < / Code>

schema.rb

  create_table "host",: force => Is true T | T.string "name" t.integer "ip" ,: exact => 38 ,: Scale = & gt; 0 t.string "location" t.string "host_type" t.string "opsystem" t.string "iogroup" t.integer "primary_sadmin_id",: exact => 38 ,: Scale = & gt; 0 t.integer "secondary_sadmin_id" ,: Accuracy => 38 ,: Scale = & gt; 0 t.string "Objective" t.datetime "created_at" ,: null = & gt; Incorrect t.datetime "updated_at" ,: null = & gt; False end create_table "systemadmins",: force = & gt; Is true T | T.string "name" t.string "netid" t.integer "priphone" ,: exact => 38 ,: Scale = & gt; 0 t.integer "safephone" ,: exact => 38 ,: Scale = & gt; 0 t.string "email" t.string "location" t.datetime "created_at" ,: null = & gt; Incorrect t.datetime "updated_at" ,: null = & gt;    

Find it find_or_create_by_name.

 Systemadmin ',: foreign_key = & gt; 'Primary_sadmin_id' is_to: secondary_sadmin ,: class_name = & gt; 'Systemadmin',: foreign_key = & gt; 'Secondary_sadmin_id' is -method: database,: class_name = & gt; 'Host' def sa_name1 primary_sadmin.try (: sa_name1) end DEF sa_name1 = (sa_name1) self.primary_sadmin = Systemadmin.find_or_create_by_name (sa_name1) if sa_name1.present? End def sa_name2 secondary_sadmin.try (: sa_name2) end DEF sa_name2 = (sa_name2) self.secondary_sadmin = Systemadmin.find_or_create_by_name (sa_name2) if sa_name2.present? End End   

php mysql update query -


मैं एक edit_setting पृष्ठ बना रहा हूँ जो उपयोगकर्ताओं को अपनी प्रोफाइल अपडेट करने की अनुमति देता है। मैं हर फ़ील्ड को अपडेट करने में सक्षम था, लेकिन ईमेल पते के लिए फ़ील्ड ने मुझे एक त्रुटि दी थी।

प्रमुख ईमेल के लिए डुप्लिकेट प्रविष्टि

कैसे हल करने के लिए यह गलती? यह कोड का टुकड़ा है जो ईमेल फ़ील्ड को संभालता है। यदि आप अतिरिक्त कोड चाहते हैं तो मुझे बताएं।

account_setting.php
  $ edit_query = mysql_query ("यूट्यूब सेट अप यूट्यूब सेट first_name = '$ fname', last_name = '$ lname ', Address =' ​​$ country ', email_address =' ​​$ email ', specialization_name =' $ spec ', ब्याज =' $ aboutme 'WHERE user_id =' $ userid '") या मर (mysql_error ()); & Lt; td & gt; & lt; लेबल के लिए = "ईमेल" & gt; & lt; span class = "फ़ील्ड" & gt; ईमेल पता & lt; / span & gt; & lt; / label & gt; & lt; / td & gt; & Lt; td & gt; & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "ईमेल" प्लेसहोल्डर = "ईमेल_अडर" मान = "& lt;? Php ईमेल करें ईमेल करें $ ईमेल;? & Gt;" / & Gt; & lt; / टीडी & gt;    

इसका अर्थ है कि email_address फ़ील्ड पर बाधा है जो एक ई-मेल पते के लिए कई रिकॉर्डों को प्रतिबंधित कर रहा है। यदि यह एक प्राथमिक कुंजी है, तो आपको यह मूल्यांकन करने की आवश्यकता है कि कौन से क्षेत्र रिकॉर्ड (सरोगेट कुंजी) की विशिष्ट पहचान करेगा। यदि यह एक अद्वितीय बाधा है, तो आप बाधा को छोड़ सकते हैं।

python - Button Transition -


I am programming wxPython with GUI support from pythoncard, the resource editor has done a little bit of my performance so far.

Fixed boxes with information in the GUI are "cards" which program outputs. I want to transition to a different page on the button click. For example, if I click OK, I should take Page 2 (different resource file). The complexity is that I do not want to open a new window for every click, because I have 20 buttons.

I have 10 cards with the same property, so I want to change only the special page and still I want to be on the main page, but go to page two for the special card. Think about Visual Tile 8 and click and flip it to reveal more information.

Is it possible wxPython? If so, how can I go about it?

It seems as if you want a notebook or similar "book" control. The WxPython demo gives details of various book controls which supports wx. Or you just want to swap the panels, which is even easier to make it easier. Here is a tutorial I wrote on this topic some time ago:

And there are links to notebooks and similar controls:



javascript - jQuery file upload doesn't submit extra parameters -


To send additional data to the server to be submitted, I have to use the formadata parameter available in jQuery File Upload Control. The default implementation for FormData is to implement a function that captures all the controls in the form and sorts them into the array (using jQuery's serialize array method).

I have control in my form, but when the file has been uploaded, I am not getting any extra data when I inspect it through Fildler, there is nothing in the request that Shows these form fields.

Is there anything extra that should be done to submit them?

BTW, discuss these two link formats ...

... for a search page for this page.

For its price, the multipart option has been set to true.

I also needed to pass an additional parameter and here's what I did: < / P>

  $ ('# fileupload'). Fileupload ({formData: {param1: 'test', param2: "value2", absolute 3: "yasseshaikh"}});   

Additional form data can be used to programmatically set up.

Different results for similar C and Fortran code -


This is an overview of homework (past deadline) for which we Awlrs clear plan for the investigation of a predator-prey Use was ideal. I compare Fortran and C code (given below), and I can not explain why the result is different, when I compare Fortran Code and C code.

C code:

  #include & lt; Stdio.h & gt; // Euler clear float for work FR (float r, float f, float alpha) {returns (2 * r - alpha * r * f); } Float FF (float r, float f, float alpha) {return (-f + alpha * r * f); } Int main () {int n; Float alpha, initR, initf, bigR, h; / * Data Setup * / Alpha = 0.001; InitR = 15; InitF = 22; N = 50; BigR = 400; H = 0.01; Float R, F, R1, F1; Int i; R0 = initR; F0 = initF; For (I = 0; i & lt; N; i ++) (R1 = R + H * FR (R, F, Alpha); F1 = FHH * FF (R, F0, alpha); printf ("% d \ t% f \ t% f \ n", I, R1, F1); R = R1; F0 = F1;} Return 0;}   

There are now similar to Fortran version, initialization parameters above C version.

 ! Ilr Akspilit Sbtrut Ilrs_ Aksplitik (IITR, Anaitif, N, alpha, H) real Term: R, F0, R1, F1, IITF, NITR, Alpha, H INTEGER I, NR = IITR F 0 = IITF I = 1, NR1 = R + H * FR (R, F, Alpha) F1 = FHHFF (RFF, alpha) print *, I, R1, F1R R 0 F 1 F 1 R 0 R 1 F 0 = F 1 and end Sbbutin Ilrs_ Aksplat! Ielar = 2 * R - alpha * R * F FR = R Andanshn FR FAR Fiaraar FAR FAR FR FRL Faarf FF (R, F, alpha) REL, Inntkent (RA) :: R Alpha Real, intent (INOUT) :: FF = F + alpha * R F FF = F & FF program Fif Prog Using the program does not apply to normal Samany_wahnon INTEGER :: N Reyl :: Alpha, Initar, Initf, H alpha = 0.001 initR = 15 initF = 22 N = 50 H = 0.01 * Print, "users clear pattern:" Call Ilrs_ Akspliytik (initR, initF, N, alpha, H) and programs to solve   

the result, a snapshot of the results of C code:

  0 15.2 9 6700 21.783300 1 15.599301 21.568800 2 15.907923 21.356476 3 16.222683 21.146309 4 16.543707 20.938276 5 16.871117 20.732357 6 17.205042 20.528532 7 17.545610 20.326778 8 17.892956 20.127077 9 18.247213 19.929407 10 18.608521 19.733749 Contact with FORTRAN CODE Rinam:  
  0 29.9666996 -21.5607319 1 61.1852989 20.4571381 2 122.330109 -18.1591854 3 24 9.35044 9 13.8127756 4 500.20 9 25 9 -7 .04162502 5 1013.98022 -2.80275159 E -02 6 2048.26880 -2.91000 9 59 e -02 7 4137.56299 -9.10123810 e -02 8 8358.25781 -0668782473 9 16889.3262 -10.6198158 10 34297.5 9 77 -353.508148   

I see why this deviation? I'm using gfortran (v4.7.2), and it's running Arch Linux on my laptop on Intel i7.

Edit:

It's OK.

 <0> Actual function F (R, F, Alpha) Actual, VALUE :: F, Alpha REAL, VALUE :: RR = 2 * R - alpha * RF = FF = R and function FR   

Fortran subcontinent FF And FR revises their arguments, while do not do the equivalent.

c++ - How can I set a shared pointer to a regular pointer -


मैं पूरी तरह से साझा पॉइंटर्स की खबर है मैं

  std :: shared_ptr & gt; Gdiplus :: पेन & gt; कर कर एक को प्रारंभ करने की कोशिश कर रहा हूं। कलम (नया जीडीप्लस :: पेन);   

लेकिन यह कहता है कि उसे एक प्रकार विनिर्देशक की आवश्यकता है .... मैं यह साझा सूचक को एक नियमित सूचक पर सेट करने का भी प्रयास कर रहा हूं। क्या कोई मुझे बता सकता है कि यह कैसे काम करता है बहुत सराहना की

  #pragma एक बार वर्ग आकार {सार्वजनिक: आकार (); Gdiplus :: प्वाइंट प्रारंभ; जीडीप्लस :: प्वाइंट एंड; std :: shared_ptr & LT; Gdiplus :: पेन & gt; कलम (नया जीडीप्लस :: पेन ()); आभासी LRESULT ड्रा (Gdiplus :: ग्राफिक्स * m_GraphicsImage) = 0; शून्य सेटपेन (Gdiplus :: Pen * pen2) {pen.get () = pen2; } शून्य सेटस्टार्ट (इंट x पीओएस, इंट yPos) {start.X = xPos; Start.Y = yPos; } शून्य सेटएंड (इंट xकोर, इंट yCor) {end.X = xCor; End.Y = yCor; }   

}

<पूर्व> std :: shared_ptr & lt ; Gdiplus :: पेन & gt; कलम (नया जीडीप्लस :: पेन);

होना चाहिए <पूर्व> std :: shared_ptr & lt; Gdiplus :: पेन & gt; कलम (नया जीडीप्लस :: पेन (ब्रश, चौड़ाई));

या जो कुछ भी आपके कन्स्ट्रक्टर की तरह दिखता है

shared_ptr से एक कच्चे पॉइंटर प्राप्त करना

  setPen (pen.get ());   

संकेत: स्मार्ट पॉइंटर्स को नियंत्रित करने के लिए सावधान रहें जो स्मार्ट पॉइंटर्स द्वारा नियंत्रित होते हैं। क्या आप सुनिश्चित हैं कि आप एक स्मार्ट पॉइंटर (साझा या अद्वितीय) पास नहीं करना चाहते हैं?

आपको स्टडी हेल्पर फ़ंक्शन के माध्यम से अपना साझा पॉइंटर भी बनाना चाहिए

  auto pen = std :: make_shared & lt; Gdiplus :: pen & gt; (ब्रश, चौड़ाई);    

c# - How do I convert to the type IList? -


I want to get effects of inserting random numbers in a IList and it looks like I am unable to think about how to get the type of iialit , regardless of a int or decimal , etc. I just type in Console.ReadLine () in the IList . Public Zero Randomizeilist & lt; T & gt; (IList & lt; T & gt; List) {randomNum = new Random (); T-typered = 0, type read = 0; String strRead = "", strReadSeed = ""; Console.light line ("How many {0} are you randomly generated?", List.GetType ()); T strRead = (list.GetType ()) console. Readline (); Console.light line ("What is the limit of randomly generated {0} s?", List. GetType ()); Int32.TryParse (strReadSeed, intReadSeed out); For (int i = 0; i

Syntactically what you want:

  T strRead = (T) console Readline ();   

However, Console.ReadLine only returns a string, so this artist (and the use of generics) does not make any sense . Either you have to IList & lt; String & gt; should be used (because you think that the T is a string) or you IList & lt; Int & gt; because you are adding int to the list). strRead .

With no updates, per comment , because in any case, it is not very clear what you are trying to do:

Of course, you can convert a string to an arbitrary type. Some settings for this framework, such as convert class:

  convert t strRead = (T) (object). ChangeType (Console.ReadLine ()) provides Is, typeof (t));   

This will work for simple types - you convert convert to a string to a int , For example. However, it should go without saying that you can not use this class to convert any arbitrary string into any arbitrary type. For this, you have to consider your own type of conversion structure, possibly with the implicit and obvious conversions, adding the behavior of convert etc. This is because it is clear that a particular type of string is represented entirely dependent on that type of characteristics.

lucene - segregating solr indexes for each end-user -


For any of our applications we want to differentiate index data for every user using the application (which is the upload The information being made using solr for the index is done). Is this possible?

Document structure for schema.xml and all indexed documents are the same. We must be separated for security reasons. Explanation: I forgot to mention that solr is available only through the web app. End user never connects directly to Solar.

If each document can be accessed only a handful of users, you can enter user IDs Allowed_user_ids , which are allowed to access the document. Then user_id to restrict access by a filter query on it.

If you have public and restricted documents, instead of storing all user_id in public documents, you set one field is_public and set it to true for public documents only For restricted documents, use the filter query on allowed_user_ids .

find - Access once to the child and then reuse the parent in jQuery (1.9.x and more) -


I'm looking forward to doing this work, I want to fill the caption of the clicked image, and I'm sure That's a better solution.

Thanks for your reply, Allen (FR)

is Jquery:

  $ bmg .find ('title, caption') . FadeIn () Parent () .find ('.title') .text (title). Parent () .find ('.coptions') .text (caption);   

HTML is:

  & lt; Div class = "big image carousel" & gt; & Lt; Img src = "http://placehold.it/450x240/FFFFCC" & gt; & Lt; Div class = "title" & gt; Thi Phato & lt; / Div & gt; & Lt; Div class = "caption" & gt; Ekak eram rirum hike in tinetur & lt; / Div & gt; & Lt; / Div & gt;   

PS: $ bImg = $ ('big image');

You can use and

  $ Bmg .find ('title, caption'). FadeIn () .filter ('.title') gets / /. Out of the archive Title (title) .siblings ('.coptions') .text (caption);    

string - Problems with charAt() method in Java -


I am trying to create a text-based Hangout in Java.

This is my Java code: package executioner; Import java.util.Random; Import java.util.Scanner; Import java.lang.String; Public Class Hellman {public static zero main (string [] algs) {// Todo code application logic here scanner chase = new scanner (system.); Scanner waffle = new scanner (System.in); Random randomGenerator = new random (); StringBiller display word = new string builder ("______________________________"); String theWord = null; String preteller; // string sbDisplayWord; Four letters = 0; Int randomNumber; Int lengthOfWord; Int number operator inward = 0; Int gDisplay; Int estimate Word number = 0; String estimate word; RandWord troll = new random word (); RandomNumber = randomGenerator.nextInt (12); // fill the word with the word TheWord = troll.wordDecide (random number); System.out.println ("Welcome to jailman!"); LengthOfford = theWord.length (); System.out.println ("The word" + lengthAwards + "is the word");); System.out.println ("You have 20 estimates."); (Int g = 19; g> = 0; g--) {System.out.println ("If you want to guess the word, then type 0. If you want to guess a letter, type 1 "); GuessWordNumber = chez.nextInt (); If (Estimate Word Number == 0) {System.out.println ("Enter the word now. Remember, do not capitalize it."); GuessWord = waffle.nextLine (); If (Estimate Word.equals (theWord)) {System.out.println ("You Win"); System.exit (0); } Else {System.out.println ("Sorry, this was not the right word."); }} And if (Estimate Word Number == 1) {System.out.println ("Please enter the letter that you can guess."); //System.out.println (This will tell you whether you have guessed correctly for any letter. If it is empty, this means that no letters match.); PreLetter = chez.nextLine (); Letter = preLetter.charAt (0); Println (""); For (int i = 0; i & lt; = lengthOfWord -1; i ++) {// - ifh (letter == theWord.charAt (i)) {numberOfLetterInWord = I + 1; System.out.println ("This letter coincides with the letter number" + "WordOfferInrode +" in the word "); DisplayWord.setCharAt (i, letter); } And {numberOfLetterInWord = i + 1; System.out.println ("This letter does not match the word number" + word-in-word "in the word". "); }} System.out.println (""); System.out.println ("the word is yet" + displayWord); Println (""); GDisplay = g + 1; System.out.println ("You have" + G display + "estimate abandoned."); } Else {System.exit (0); }} System.out.println ("Game over"); System.exit (0); }} Package Hangman; Public Class RandWord {Private Static String [] Keywords = {"Psychology", "Keratin", "Nostalgia", "PyroManyak", "Chlorophyll", "Derivative", "Unidored", "Pattodactile", "Gialophone", "Exclusive "," Obituary "," infinite "," inferior ",}; Public String Word Decad (Int Random Number) {String the Word; TheWord = WordRay [Random Number]; Return The Word; NetBIANS is giving me this error:

Exceptions in the "main" java.lang.StringIndexOutOfBoundsException thread: outside the string index range: 0 hangman.Hangman.main (hangman.java:56)
Java results: 1

This is probably happening when you call fourte (0) on a string of length 0. Check to see that the wire is not empty before calling the method.

email - PHP mail() Return-Path Issues -


After going to new hosting, I started to start odd issues.

The PHP Mail () function works only, if I connect the following line with the phf.ini to -f parameter. (If I have to leave the -f parameter, the mail () function will return right but do nothing.)

  [mail function] sendmail_path = "/ usr / sbin / sendmail -t -i However, the following undesirable header causes all messages:  
  return-path:   

I have tried to add the fifth argument for the mail () but it has no effect.

I will highly appreciate your help. thank you in advanced!

To test / change your PHP mail configuration:

open your php [IF you do not know where it is, see below] [Search for line while reading mail function] Add / Change the details of your mail server This can be a local mail server or your ISP's mail server . Save / stop the php.ini file Restart your web server

What the mail settings can look like when you open the php.ini file for the first time:

  [Mail function]; SMTP = Local Host for Win32 only smtp_port = 25; For Win32 only; Sendmail_from = me@example.com; For Unix only you can supply logic as well (default: "sendmail -t -i"); Sendmail_path =   

Additional information is phpinfo () in echo, you can see your PHP configuration details. You can do this by creating a .php file with the following line on it: When you run it in your browser, you will see a complete list of PHP configuration variables. Just search for rows containing php.ini and sendmail_path that you will see the required value to use.

Another idea is that you can use ini_set () to properly configure your mail settings such as

your email Add the following code at the top of the script if your mail script fails.

  // Please specify your mail server - Example: mail example.com. Ini_set ("smtp", "mail.example.com"); // Please specify valid SMTP ports for one SMTP number 25 and 8889. Ini_set ("SMTP_PORT", "25"); // Please specify the return address to use ini_set ('sendmail_from', 'example@YourDomain.com');    

drag and drop - find center position in imageview android -


I am working on drag and drop mechanism This is a horrible blog that helps me with implementation

That's why I have dragent, but I want touch position in the middle of the image so that it looks good. How to get the coordinates for the middle of the scene so that I can pass those coordinates as the starting position?

How to find a clue?

This is simple math.

  Image visual view = ..... ET center X = (view.getLeft () + view. GetRight ()) / 2; Int o Center Y = (see. Gadgettop) + visual.gatem ()) / 2;   

This will return the center coordinates of the scene. Due to round errors it can be closed due to 1.

c - Segfault - fclose / fopen -


मुझे अपने निम्नलिखित सी कोड के साथ परेशानी हो रही है:

  int main (शून्य) {FILE * infile = fopen ("file", "r); FILE * fp = NULL; अहस्ताक्षरित चार * बफर = मॉलोक (512); जबकि (फ़्रेड (बफर, 512,1, इन्फ़ील) & gt; 0) {// (बफर [0] == 0xff) {... // परिभाषित चर "नाम" अगर (fp! = NULL) fclose (fp); fp = fopen (नाम, "w +"); Fwrite (बफर, 512,1, एफपी);} और यदि (fp! = NULL) {Fwrite (बफर, 512,1, एफपी);}}}   

ऐसा लगता है कि मैं वही संकेतक का उपयोग करने के बाद fclose को बंद नहीं किया जा सकता, क्यों? मुझे अपने सूचक को मुख्य में हर जगह पहुंचने की आवश्यकता है, इसलिए मैं अपने समय में एक नया घोषित नहीं कर सकता।

संपादित करें: ओह भगवान, समस्या का हल हुआ, शायद मैं बहुत थका हुआ था, मैं गलत फाइल संकलित कर रहा था, वैसे भी ...

धन्यवाद, लोगों!

यह कहना मुश्किल है कि जब से आप हमें अपना कोड नहीं दिखा रहे हैं, फिर भी, फ़ाइल को फिर से खोलना pret होना चाहिए Ty सीधा: <पूर्व> #include & lt; stdio.h & gt; Int मुख्य (शून्य) {FILE * fp = NULL; चार नाम [] = "कुछ फ़ाइल"; के लिए (;;) {// कुछ करना अगर ((fp = fopen (नाम, "w +")) == नल) तोड़; // फाइल fclose (fpose) के साथ कुछ करें; // कुछ करना} वापसी 0; }

php - Model and Db-Table Zend Framework -


I wanted to know that it is better to create a model that directly creates a DB-adapter or an interface with a deaf-adapter. / P>

Make classic operation crude with DB-adapter, or you can create a model that passes through all the DB-adapter:

scheme:

Controller - & gt; Model - & gt; DB-Adapter

or

Controller - & gt; DB-Adapter

  Extends application_Model_DbTable_Guestbook class Zend_Db_Table_Abstract {** A table name * / a protected $ _name = 'table'; }    

A part of your model (for example a data mapper) of DB adapter Uses To Store & amp; Retrieve the goods from the DB Controller sends the request only to the model The model calculates the goods with the DB adapter and sends it back to the controller. So that the controller could pass it in your view ...

First:

User Request - & gt; Controller - & gt; Big model - & gt; Small part of the model - & gt; DB adapter

After this (but not every DB request creates the user):

DB adapter responder - & gt; Small part of the model - & gt; Big model - & gt; Controller - & gt; View - & gt; User's screen = feedback

android - Resources$NotFoundException: resource ID not valid. Why? -


I am trying to add float to my dimens.xml file.

I was reading. When I tried the solution, I got the exception mentioned in the comments. I am trying to understand why why that exception has been thrown away.

Here is the XML for completion:

    

Here's the code that's going on:

  last float zoom = this.getResources (). GetDimension (R.dimen.zoom_level);   

I jumped into the Android source, and here is the method definition for getDimension:

  get public float (difference ID) throws NotFoundException {synchronize (mTmpValue) )) {Value of the typed value = mTmpValue; GetValue (id, value, true); If (value.type == typed value. TYPE_DIMENSION) {TypedValue.complexToDimension (value.data, mMetrics); } New NotFoundException Throw ("Resource ID # 0x" + Integer.TaxStrin (ID) + "Type # 0x" + Integer. TextString (Value Type) + "Not Valid"); }}   

So whatever the reason value.type! = Typed value TYPE_DIMENSION . I do not have my Android source fully set, so I can not easily add the Log.w ("YARIAN", "value type" + value.type) ' statement.

Then I jumped into getValue and finds a series of calls:

  resources.getValue -> AssetManager.getResourceValue - & gt; AssetManager.loadResourceValue   

loadResourceValue is an original method and here's where my excavation is different.

Does anyone know what is the best way to do what is happening?


I also noticed that the value typed in a in resource . Typpa Floyd and typed value. TYPE_DIMENSION . But in XML, I can not write type = "float" .

Use type = string for the work described in the comments and then use it to get the float float.from is it necessary? Why not and why not?

I know that this is a late reply, but you use it instead of parsing the string Should you have a float like you suggested.

XML:

  & lt; Item name = "float_source" format = "float" type = "raw"> 5.0 & lt; / Item & gt;   

Java:

  typed value = new typed value (); Context.getResources (). GetValue (R.raw.float_resource, outside, true); Float float resource = out.get float ();   

You enter fraction , raw or string as the type If you want, then it only matches the resource class in R .

C++ shared pointer issue -


I am trying to create a set function which will take in a shared pointer and set it equal to another share indicator

This is a shared pointer and set function that I have declared on my header file

  class shape {public: shape (); Gdiplus :: Start Point; GDPlus :: Point & End; Std :: shared_ptr & lt; Gdiplus :: Pen & gt; M_pen; Virtual LRESULT Draw (Gdiplus :: Graphics * m_GraphicsImage) = 0; Zero Setpage (Study :: Shared APTR & lt; Gdiplus :: Pen & gt; pen2); Zero setstart (int x pos, int yPos); Zero set-end (int x core, int yCor); };   

But when I try to implement it in my CPP, I get an error saying that "My declaration is incompatible with zero setpane." It also says that m_pen is unedintified on my CPP file.

  #include & lt; Memory & gt; #include "stdafx.h" #include "resource.h" #include "ShapeMaker.h" zero size :: setPen (std :: shared_ptr & gt; gdiplus :: pen & gt; pen2) {m_pen = pen2; } Zero size :: setstart (int xPos, int yPos) {start.x = xPos; Start.Y = yPos; } Zero size :: set-end (int x core, int yCor) {end.x = xCor; End.Y = yCor; }   

It really is with me. Includes Stdax.h #include & lt; Atlwin.h & gt; #include & lt; Atlframe.h & gt; # Include & lt; Atlctrls.h & gt; # Include & lt; Atldlgs.h & gt; # Include & lt; Atlctrlw.h & gt; # Include & lt; Atlscrl.h & gt; # Include & lt; GdiPlus.h & gt;

Errors that I get:

  Size standard. (11): Error C2039: 'shared_ptr': 'STD' is not a member of the size h (11): Error C2143: syntax error: missing ';' '& Lt;' Before Shapemaker.h (11): Error C4430: Missing type specifier - int assumed. Note: C ++ default-int ordermaker. (11): Error C2238: Unexpected token predecessor ';' . (16): Error C2039: 'shared_ptr': 'STD' is not a member of shapemaker.h (16): Error C2061: Syntax Error: Identifier 'shared_ptr' shapemaker.cpp (9): Error C2511: 'Zero Size: SetPen (std :: tr1 :: shared_ptr & lt; _Ty & gt;): 'Overloaded member function' was not found in the size    

I am posting my reply to comments for any visitor.

The problem is at the beginning of the CPP file.

  #include & lt; Memory & gt; #include "stdafx.h" #include "resource.h" #include "ShapeMaker.h"   

MSVC ++ demands that the precompiled header "stdafx.h" It is necessary first.

d3.js - Update Selection in D3 is empty -


In my code, my update selection is always empty, as my exit is selected, so the transition never runs . Every time I refresh, I repeat the whole DOOM piece as if it had never existed before (i.e. I can delete everything). Nant and behavior does not change.

I am using an important function in the data () to ensure that the situation is likely to be included at a unique value instead of the place.

The whole code is over, but I have removed what I think the relevant section is here (basically, I'm just trying to follow):

 < Code> var key = function (d) {return d.index; } Var filterDistance = function () {var names = list.selectAll ("div"). Data (byDistance.bottom (40), key); // update names.attr ("class", "update"); // add names.enter () .append ("div") .attr ("class", "enter"). Style ("Opacity", "0") Transcision () .duration (500). Style ("opacity", "1") .text (function (d) {return display text (d);}); // Remove names.exit () .transition () .duration (750). Style ("Opacity", "0") .remove (); };    

was able to find the best and the problem. It has been found that in my "work" summary display, I was using $ ('results'). Text ('insert essence here') which is definitely something else that can be stuck in there (for example, like my D3 generated divisions)

php - Extract certain string format -


I'm not good at preg thingy, but I found a function called preg_split.

Let's say I have the string: "word1 4 < P> I want to split the string and without the word 4 want to remove word 4 in & lt; & Gt;

How do I do it in the preggae?

My code: $ extractedWord = preg_split (& lt; pattern & gt ;, 'wORD1 & lt;> WORD2 & lt;> word3 & Lt;> word4 ");

If you use preg_split () instead Trying Explosion () or other php function whose same result is function

  $ extractedWord = "word1" and <; Word2 & lt; & Gt; Word 3 & lt; & Gt; Word4 "; // values" & lt; & Gt; $ Result = preg_split ("/>   

The generated output will be:

  Array ([0] => 1 [1] => 2 [2] = & Gt; word 3 [3] = & gt; word4)    

mysql - entity framework LIKE query -


I am using EF4.1 with MySQL and unable to get the query working. I want to get a list of products where the name of the app is like

. Where (P = & gt; p.Name.Contains ("app") returns a product with only the name. The generated operator has the LOCATE operator in SqlQuery ("Select from product where name ''% @ p0% ' ", By the name of" app "), but tried to execute the sql command for no benefit.

< / Div>

">

I do not know EF (yo nor hablo Microsoft), but I'm sure that your literal wildcard parameter is hand-in-hand with

If you try something like the following, then what is this SqlQuery ("Select from the product" where the Context ('%', @ P, '%'), " "What is the" parameter "?

Also, try:

SqlQuery ("Select from p * roduct where name @ p0", "'% app%'")

I'm sure one of these will do.

Testing only individual functions in a R script -


I am trying to test a personal function in R script which has a function call as the last description of the script I code is:

  mul.R #! / Usr / bin / env rcriptcript mul & lt; - Function (n, m) {prod & lt; - n * m Returns (prod)} Mul (4,5)   

Here is a test script:

  test_simpleprogram.r #! / Usr / bin / env Raptor Library ('RUNIT') source ("./../ simpleProgram.R") test.mul & lt; - Function () {checkEqualsNumeric (mul (n = 2, m = 3), 4)}   

I execute the test script using the following command:

  runTestFile (absFileName = file.path ("test_simpleprogram.R"))   

Now, when I support R script i.e. I want to test the mul.r , because in the final statement calls the mul function, the whole script executes and then the test script runs again again. This is the first execution ( due to source (..) is not required for test purpose.

Is there a way to test such a script, without running a script, while sourcing it in script?

source instead of

use parse

  code & lt; - Parse ("c: / r / mul".) # The actual file path may be different   

This file loads the file as unavailable sense, seen in this form Can be:

  # & gt; As.list (code) # [[1]] #mult & lt; - function (n, m) {#product   

The first element of the list given above is actually ' function:

  # & gt; As.list (code [[1]] # [[1]] # `& lt; -` # # [[2]] # mul # # [[3]] # function (n, m) {# pruss and lieutenant; - n * m # return (prod) #}   

The second element, OTOH, is the call to the mul function:

  #> As.list (code [[2]] # [[1]] # MULL # # [[2]] # [1] 4 # # [[3]] # [1] 5   

Therefore, if your files are assignable and Unwanted functions are made of calls, so we can find out that by inspecting the first element of each entry in the list given above:

  filter & lt; - sapply (code, function ( X) as.character (x [[1]] == "& lt; We can only evaluate the assignment:  
  eval (code [ Filter], envir = globalenv ())   

Then you can call your test.mul function You can use this statement to give you the source can be normalized for other filters. For example, if you want to evaluate all the statements except for the last, you can only use it Tax tax Es:

  eval (code [-line (code)], envir = globalenv ())    

google app engine - GAE - Including external python modules without adding them to the repository? -


I am currently working on a dragon based Google App Engine project. Specifically, I am using flask for application. I wonder what is the acceptable method of incorporating external python modules, especially when it comes to the repository. From what I can say, in my repository is bad form for many reasons including the code of others. However, others may be working on the same store, so we should use the same external module to insure the same results.

Specifically, I need to include the flask (and its dependency) in my application. The easiest way to do this with Google App Engine is to put them at the root level:

  MyProject app.yaml main.py MyApp Flask ...   

What is the correct way to bring these external modules in these projects? Both would be a generalized answer and a specific useful to my case. Apart from this, any other related recommendations will be appreciated very much thanks.

Although it is possible to include third party libraries in the form of subdomains or symuxes from external repositories, in practice It is not a good idea what can be wrong, there are two scenarios on this:

  1. If the third party library issues a new version that breaks the functionality, then You must either meet all necessary changes, new requirements or just the last Version continue to work and breaking the external connection. Usually this happens when you are very close to the deadline.

  2. If the third party library issues a new version and any of your affiliates has been upgraded and made all necessary changes to support the new version, your favor The code will be broken down until you upgrade.

    The above examples are much more visible in greater projects with greater dependencies and as more people who join the project in the long run become a major problem! I can come up with more examples, but I think you can see this point.

    Your best option is to include your libraries in your repository, which also has the advantage of projecting and running on a new machine without the whole many dependencies, and all of them have your way Required to be included at the same or deep level with the app.yaml file. Such as the only main library code described in Drugnox

    Also, not the place to put the goods in its repository reason is not an issue today and these libraries are usually not updated so that your The size of the reserves is not getting bigger over time. > Since you mentioned the flask on Google App Engine, you can see my project, where you can see in practice what is organized.

Cassandra connection pooling using hector -


How do I create a connection pool for the cassandra using Hector? Someone can give a simple example for this, I searched the net, but no solution was found.

Hector handles for you from them:

In Hector The basic design hectare of connection pooling logic is to build a master pool of individual pool of connections based on the number of cadres nodes that are clearly identified. For example, if we have configured three cadence nodes, there will be three different pool connections in the echoconnection manager. One for each node.

...

The built-in HConnectionManager as well as host-specific pools for localhost: 9160 will be automatically created if they are not already present. / P>

You can also read through all possible means of connection and pooling settings.

html - How to control multiple images for a single background definition -


In CSS, I'm trying to figure out how the size of 2 different images is controlled individually. Stacked up on each other So in the CSS, any 1 background image can define such as: background: url ('base.png') any repeat center; To stack an overlay on the top of the base image, you can use an approach as fig .

 .my-class {background: url ('overlay.png') No-repeat center, url ('base.png') Any repeat center; Background-shaped: 100% 100%; }  

Fig

However, if I want a slightly different size for each images, then I'm not sure How to do that I imagine that there is a type of inline position and dimension definition, as fig but I have not found it very right. Does anyone know how to do this? Thanks in advance.

 .my-class {background: url ('overlay.png') No-repeat 0/100% 90%, url ('base.png') Any repeat center 0 0/100% 100%; }  

Fig 2

I think you were using almost CSS. I believe that you can do this:

  My-class {background: url ('overlay.png') no-repeat center, url ('base.png') Any repeat center; Background size: 90px 80px, 100px 100px; }   

You need a comma and then set the size of the second background.

android - Getting different latitude and longitude for one constant location -


I created an Android application to get the latitude and longitude of every 2 second location. This application works fine, but when I keep my Android device steady at one place, then I am getting different latitudes and longs for that point ... it is surprising that all these different coordinates Point to the place even if they are different.

For example a static location

I like

  latitude - 10.013499 Longitude - 76.3303451   < P> 2 seconds after  
  latitude - 10.0135014 longitude - 76.3303467   

after 2 seconds

  latitude - 10.0135001 Longitude - 76.3303451   

After 2 seconds

  Latitude - 10.0135011 Longitude - 76.3303466   

Can anyone tell me That's why I'm getting this .. .. we have a unique latitude and country for a given point Ntr how you can get.
My code is given below

  import java.util.concurrent.Executors; Import java.util.concurrent.ScheduledExecutorService; Import java.util.concurrent.TimeUnit; Import android App Importroid.os.Bundle; Import android.util.log; Import android.view.View; Import android.widget.Button; Import android.widget.Toast; Public class enhances AndroidGPSTrackingActivity activity {button btnShowLocation; stop; Double latitude, longitude; Int is = 0; Scheduled Excel service scheduler; // GPSTracker class GPSTracker GPS; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.main); BtnShowLocation = (button) FindById (R.id.btnShowLocation); Stop = (button) VVBIID (R.Stop); // show place button click event btnShowLocation.setOnClickListener (New View.OnClickListener) {Public Zero onClick (see arg0) {// Class Object Scheduler = Executors.newSingleThreadScheduledExecutor (); scheduler.scheduleAtFixedRate (New Runnable () {Public Zero run () {System.out.println ("sss"); // Log.i ("hello", "world"); ++; Log.i ("hello", "+ is"); runontrade ( New Runnabal) (Public Zero Run) {GPS = New GPSTracker (AndroidGPSTrackingActivity.this); Latitude = GPS; Gelituitued (); Rectitude = GPS. Langed (); Toast. GetApplicationCont Ext), "Your place is - \ nLat:" + Latitude + "\ nLang:" + Longitude, toast. LNNHHARAR. Show ();}}}}}}, 2, 2, time unit. SECONDS); }}); Stop.setOnClickListener (see new OnClickListener) {click on Public Zero (see Arg 0) {Scheduler.Shootdown (); OnDestoy ();}}); } @ Override Public Empty OnDesto () {Super. Onsteroy (); Toast. Make text (this, "service was destroyed ...", toast. LNNHH_LOG). Show (); } Public double getLatitude () {return latitude; } Public Zero Set Latitude (double latitude) {this.latitude = latitude; } Public Double Matching Amount () {Return Longitude; } Public Zero Set Length (double longitude) {this.longitude = longitude; }}    

GPS is not accurate. With the hardware in a normal phone, it can be around 10 meters or more at any time. So consistent readings will not be the same exact location.

The network provider is also bad - it could be up to 1km of inaccuracy.

css - Wrong position in IE8 -


There is an IMG with a text on a banner. It is in less than half of its height in IE8, can you help me figure out why please? Give an IE 8 conditional comment to

and # site- Slogan About Below: 16px; Exapmle:

jquery menu slide up/down - keeping sub-menus open when not mouse moves away? -


I want to create a horizontal menu that moves the mouse on the main menu and moves the mouse downwards.

The problem is that I still want to show the div under the menu if the mouse moves from one menu item to another, which contains the submenu.

Here is HTML

    

and here JS

  $ ('menu_it & gt; ul li: is (> div ul)'). ('Mousecenter' ('' '' '' '' '' '' '' '' '' '' '' '' '' '', '': '41'});} ) .on ('mouseleave', function (e) {console.log ('out'); $ (this) .find ('div') SlideUp ('sharp'); $ ('.noti'). Animate ({'Margin-top': '0'});}); I am working here, if I am taking the ID with the ID I have come with LG ID and I can still create a div with class notice.  

If there is smooth sliding for Submuau and a better way below, I would be very grateful.

See this:

  $ ('. Menu_it & gt; Ul li: is (& gt; div ul) '). Animate ('mousecenter', function (e) {$ (this) .find ('div' '(' sharp '); $ ('. Noti ') ({' margin-top ':' 41 '}) ;}) .on ('mouseleave', function (e) {$ (this) () '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' Margin-top ':' 0 '});});   



How to put an object in front of camera in THREE.JS? -


I am trying to put an object in front of the camera, but not enabled.

I am using the fly control which transmits the camera, and now I want to put an object in front of it. how can I do this? I have tried many different ways, but I have not succeeded.

thanks

Do you make your object a child of your camera and then Have tried to translate it further?

  camera.add (nanobot); Nanobot.position.set (0,0, -100);   

Nanobot permanently in front of the camera to 100 units ... and it will remain until you do:

  camera Remove (nanobot);   

... at the point where it should remain in that place until you use it any other method.

how do you pick certain fields in json format in php -


I am calling a URL that gives the data as Jason format. I like to select some variables from this output. I type ouput: <"> graph_property": [{"name": "calculation_method", "value": "geo mean"}, {{"Id": "value": "time"); "measure": [{"id": "1132282", "alias": "example.com" "bucket_data": [{" Name ":" "" 1 "," id ": 1," perf_data ": {" value ":" 4.878 "," unit ":" seconds "}," avail_data ": { {"Value": "100.00", "unit": "percent"}, "data_ count": {"value": "1", "entity": "#"}}, {"name": "2013-June - "" "," Id ": 2," data ": {" value ":" - "," unit ":" seconds "}," avail_data ": {" value ":" - "," entity ":" Percentages "}," data_ count ": {" value ":" - "," unit ":" # "}}, {" name ":" 2013-June-20 11:33 flood {"Value": "-", "unit": "percent", "perf_data": {"value": "-", "unit": "seconds"}, "avail_data": {"value": "percent" "[" "Name": "perfwarning", "value": "-", "unit"}, "data_ count": {"value": "-", "unit" "" "}", "graph_pace" "": "Value": "value": "value": "-" "value": "value": " "Value": "value": "value": "value": "value": "value": "value": "value": "value": "value": "value": "value": "value": "value": "value" "" ":" "": "" "", "Unit"}, "unit": {"name": "lines", "value": "3", "unit": "" "," name ":" page "," Value ":" user time "," unit ":" seconds "}, {"Name": "avg_perf", "value": "4.878", "unit": "seconds"}, {"name": "avg_avail", "value": "100.00", "unit": "percentage" } "Link": {"type": "app / jason", "{"} "," value ":" total_datapoint_count "," value ":" 1 "," unit ":" # "}, {}]}]," link " Href ":" http://api.keynote.com/ "," Rel ":" slotmetadata "}}

The interest I am interested in: < "", "Value": "4.878", "name": "2013-Jun-20 11:28 am", "price": " - "," name ":" 2013-Jun-20 11:33 AM "," value ":" - ",

The reason for this is that sometimes, web service calls Return Commodity Value With this output, I am the latest Choose the position in which there is no empty value and then print the name and value which is not empty.

Is there an easy way to choose the name and pricing field from this JSN output?

When I

  $ data & lt; -json_decode ($ resp) print_r ($ data)   

One part of the data is this:

  [measure] => Array ([0] = & gt; Array ([ID] => 1132282 [nickname] => Example [Beckett_data] => Hey ([0] = & gt; Hey ([name] = & Gt; [2013] - [20] 01:23 PM [ID] => 1 [perf_data] => Hey ([value] => 3.074 [unit] => 2] [avail_data] = ([Value] => 100.00 [unit] = & gt; percent) [data_ count] = & gt; array ([value] => 1 [unit] => gt; #)) [ 1] = & gt; Hey ([name] = & gt; 2013-Jun [20] = 1] 2 [perf_data] => array ([value] => 3.416 [unit] => seconds ) [Avail_data] = & gt; array ([value] => 100.00 [unit] => gt; [data_ count] = & gt; array ([value] => 1 [unit] = & gt; ; #)) [2] = & gt; Hey ([name] = & gt; 2013-Jun-20 01:33 pm [ID] => 3 [perf_data] => array ([value] => - [unit] = & gt; Seconds] [avail_data] = & gt; Hey ([value] = & gt; [unit] = & gt; percent) [data_ count] = & gt; array ([value] = & gt; - [unit] = & gt;  

Use the built-in function

  $ data = json_decode ('your_json_here'); // $ data will be "stdClass" object $ data = json_decode ('your_json_here', true); // $ data will be "array" object   

Then you can work with $ array with regular array / object

if type = stdClass:

  $ data-> Measurement [0] - & gt; Bucket_data [0] - & gt; Name; // will be equal "2013-Jun-20 11:23 AM" if type = array  
  $ data ['measure'] [0] ['Bucket_data'] [0] ['name']; // will be equal "2013-Jun-20 11:23 AM"    

css - Set column width on th, td, or both? -


Using CSS, I want to specify a certain width for the column in the table. (On TD), or should (in both) set the width of TD (at the threshold)?

& lt; Th & gt; will be the best place, because it is used only once.

Give your customer some save bytes.

Other & lt; Td> '' '' '' '' '

html - How to display h1 and ul link inline? -


How do I display my h1 and ul tags in the same line? This is for my header text which is above the main content (nothing to do with this question to add more text to me)

This is my code:

HTML:

  & lt; Div id = "header" & gt; & Lt; H1 & gt; Logo & lt; / H1> & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "index.html" & gt; Home & lt; / A & gt; | & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "fixtures.html" & gt; Fixtures & amp; Results & lt; / A & gt; | & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "news.html" & gt; News & lt; / A & gt; | & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "players.html" & gt; Player & lt; / A & gt; | & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "table.html" & gt; Table & lt; / A & gt; | & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;   

CSS:

  #header {margin: 0 pixels; Padding: 0px; White color; Background color: red; Width: 100%; } # Header H1 {display: inline; } # Header UL Lee {Display: Inline; } # Header UL Lee {text-decoration: none; Font-size: 16px; font-weight: bold; White color; } # Header UL Lee A: Hover {Text-decoration: Outlined; }    

add #header ul {display: inline; } . Should do this.



html5 - Different durations for different transforms? -


I have set the transformation for one transition and one entry on each of my changes (to scale, perspective, rotate) I want to see different periods. Any way to do this?

Infection: Infection: -WebKit-Conversion is 1S Linear; Webkit-Infection: -WebKit-Transmission 1S Linear; / ** Chrome & amp; Transform:

Transform:

  Degree) scale (.23297872340425532);    

You can get it like the following code I used it in my website And it works right.

  -Widk-Infection: -WebKit-Transmission 0.5S, Opacity 0.5S; -Mozy-transition: -Moz-Transmission 0.5 S, Opacity 0.5 S; Transition: 0.5 to 0.5, ambiguity 0.5 s;   

Hope it helps!

Thanks

Solr - highlighting for a field query -


I am working with Solar 4.3 and it seems that highlighting component filter queries ( fq ).

I tested it with a simple query field ( q ), and it worked perfectly.

How do I highlight in the fields using filters queries ( fq ) in which I have searched?

PS: With this formula, I have concluded that this feature is not available in Solar 1.4. And I know that it is possible to do it manually in the client ( UI ).

to use when highlighting through parameters as a work around it You can specify the query. This will allow you to specify the query that only uses for highlighting purposes, in your case, just fill in your filter query ( fq q Code>) parameter). Since it applies only to highlighting, it should not have any negative impact on your general query performance, etc.

scala - TypeTags/Reflection - If I have a Type object, can I get its parameter Type? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 1 उत्तर

    मेरे परिदृश्य को आसान बनाने के लिए, I एक प्रकार की वस्तु है जो कि कुछ [स्ट्रिंग] या कुछ [इंट] या कोई नहीं है क्या मैं उस प्रकार के ऑब्जेक्ट को लेने में सक्षम हूं और किसी भी तरह पैरामीटर प्रकार किसी अन्य ऑब्जेक्ट में टाइप करें?

    उदाहरण

      scala & gt; आयात स्लैला.फ्रैक्ट.रंटाइम.इनसर._ आयात स्लैला.फ्रैक.रंटाइम.न्यूज ._ स्काले & gt; वाल टीटी = टाइपटैग [कुछ [स्ट्रिंग]] टीटी: प्रतिबिंबित करें.रंटईम.विष्कृत। टाइप करें [कुछ [स्ट्रिंग]] = टाइपटैग [स्कला। कुछ [स्ट्रिंग]] स्केल & gt; Val tpe = tt.tpe tpe: reflect.runtime.universe.Type = scala.Some [स्ट्रिंग]   

    तो आपके कुछ [स्ट्रिंग] का प्रकार है। मैं पैरामीटर प्रकार को एक प्रकार ऑब्जेक्ट में कैसे प्राप्त करूं?

    जैसा कि आप उपयोग कर सकते हैं चिमटा:

      आयात reflect.runtime.universe._ val tpe = typeOf [कुछ [स्ट्रिंग]] / टाइपटैग के समान [कुछ [स्ट्रिंग]]। Tpe // निकालने के प्रकार पैरामीटर वैल TypeRef (_, _, tps) = tpe // tps का प्रकार सूची [प्रकार] val इनरियल टाईप = tps.head // & lt; - यह आपके प्रकार का / // टाइप करें: reflect.runtime.universe.Type = string    

zurb foundation - Different top-bar heights based on media query -


I have set the $ topbar-height variable for a specific value, which is the default value .

I want to keep the default value for the mobile version.

How can I do this?

I just can not change the height value of .topbar , because this variable is used by the foundation to create the topbar and its children's elements (line-height, padding, margin etc.) Many other qualities are done in.

I found out that this works:

  @ Media # {$ small} {$ Topbar-height: 85px; @import "foundation / component / top-bar"; ...}   

There is probably no clear view (I must definitely check that it produces unnecessary CSS) but I like it, even if I respond well on the accusation (Maybe it's a question of what CSS is from even produced)

I think a real top-bar mixer will solve this problem: I'll add it as a suggestion. / P>

java - Execute "SET ROLE" statement in eclipselink JPA -


I am using EclipseLink JPA to connect to the vertica database and get results. EntityManager em = ... query q = em.createQuery ("SELECT x FROM TABLE X") before running the part below the code; List results = q.getResultList ();

I need to run the "set ROLES ALL" statement for the User ID first. How to play such statements in JPA.

Please guide me.

For Vertica, you can do two things:

  1. Set your default role for the user:

      user myuser default role myrole; Use the ConneSettings connection string attribute as described in Virchica Connection String (Docs):  

    A string in which the SQL statement that the JDBC driver automatically runs after the database is connected This is useful for setting up property locale, setting a schema search path, or making other configurations that require connections.

    Your connection string may look like this:

     jdbc: vertica: // myverticaserver / mydb? ConnSettings = SET + ROLE + myrole      

database - Matching rows of same table using visual basic -


यह एक साधारण दृश्य मूल विंडोज फॉर्म है I डाटाबेस एक स्थानीय sqlserver डेटाबेस है

टास्क 4 कॉलम युक्त तालिका के माध्यम से जाने के लिए है:। आईडी DATETIME,, onOff, परम

आईडी एक विशिष्ट उपकरण DATETIME, के लिए अद्वितीय है। की जब एक घटना हुई, onOff या तो एक स्ट्रिंग होगा "पर" या "बंद" एक टाइमस्टैम्प है, और परम एक पूर्णांक, नहीं अद्वितीय।

प्रत्येक आईडी के लिए, कहते हैं कि पहली पंक्ति आईडी 23 है और यह "चालू" है और परम 6 है, मुझे उस आईडी के लिए "बंद" पंक्ति का पता लगाना होगा जो कि 23 के आईडी और 6 के परम के बीच है और डेटटाइम में अंतर की गणना करने के लिए उस अवधि को निर्धारित करने के लिए कि आईडी चालू या बंद थी

यह तालिका में सभी आईडी के लिए होने की आवश्यकता है, लगभग 10 मिलियन पंक्तियों। प्रत्येक आईडी के लिए कई जोड़े / बंद जोड़े हैं, कुंजी को डेटटाइम के बारे में सबसे निकटतम ढूंढना है

मैं देखा और datatables और डेटासेट से कोई लाभ नहीं हुआ ऐसा करने के कई तरीके, की कोशिश की, एक csv के लिए बाहर सब कुछ धक्का और एक समय में ब्लॉक में इसे वापस पढ़ने के लिए है। इस बारे में जाने के लिए सबसे अच्छा तरीका क्या है और आपका क्या कदम होगा?

निम्न कोड में, उपयोगकर्ता एक बार आरंभ और समाप्ति दिनांक चुनने के बाद, सही डेटा को डाटालेबल में रखा जाता है। अब मैं के रूप में ऊपर कहा गया है पंक्तियों से मेल खाते के कार्य को करने की जरूरत है

  मंद sConnectionString स्ट्रिंग sConnectionString = "डेटा स्रोत = [servername] के रूप में;। प्रारंभिक सूची = [tabelname]; एकीकृत सुरक्षा = सच "मंद objConn न्यू SqlConnection (sConnectionString) objConn.Open () मंद आईडी स्ट्रिंग आईडी = TextBox1.Text मंद STARTDATE के रूप में के रूप में दिनांक STARTDATE = DateTimePicker1.Value.Date मंद ENDDATE के रूप में तिथि है ENDDATE = DateTimePicker2.Value.Date मंद strSql स्ट्रिंग के रूप में के रूप में = "चयन आईडी, डेटटाइम, ऑनऑफ, परम फॉर सिग्नलराव केयर कास्ट (डेटटाइम के रूप में DATE) '' के बीच में & amp; शुरुआत और amp; "'और'" & amp; एंडडेट एंड amp; "'" डीमैम डेसिगनलराकॉमा के रूप में नई एसक्यूएलडाटाएडएप्टर (स्ट्र एसक्यूएल, ओजकॉन) डीएमटी डीटीबी के रूप में नई डाटाटीबल डीसीआईएनएलआरओसीमा.फिल (डीटीबी)    

एसक्यूएल में यह सब करें और परिणाम पढ़ें:

  चयन आईडी, दिनांकटाइम, ऑनऑफ, परम, (सिग्नलरा से कहाँ शीर्ष 1 तारीख का समय समय आईडी = sr.id और Param = sr.param और onoff = 'OFF' और कास्ट (तिथि के रूप में दिनांक) & gt; = '1/1/11' और कास्ट (तारीख समय दिनांक) & gt; = CAST (DATE के रूप में sr.dateTime) आदेश दिनांक द्वारा) OffTime signalRaw sr कहां कास्ट (तारीख के रूप में dATETIME) 'पर' '1/1/11' और '2/1/11' और onoff =  के बीच  

वैसे से ... तिथियों को तिथियों के रूप में स्टोर करें CASTING दर्दनाक है।

android - How can I nest a linear layout inside a relative layout to achive the desired UI experience? -


I to this issue have wasted enough time to try to figure out myself, so here post To see if anyone can help me. I'm trying to get the following view on the Android version of my app (screenshot from my iOS app).

screenshot of my iOS app

I own layout file for Android Is defined by:

  & lt ;? Xml version = "1.0" encoding = "utf-8" & gt; & Lt; RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" android: id = "@ + id / layout_root" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" & gt; & Lt; Android: layout_alignParentLeft = "true" android: layout_alignParentRight = "right": Android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_above = "@ + id / shareLilayout" android: id = "@ + id / postTextTextView" "Android: layout_alignParentTop =" true "Android: EMS =" 10 "android: gravity =" top | left | beginning "Android: inputType =" textMultiLine "& gt; & Lt; Requestfocus / & gt; & Lt; / EditText> & Lt; LinearLayout android: id = "@ + id / shareLILayout" Android: layout_alignParentBottom = "true" android: background = "# 999999" Android: Layout_width = "Fill_parent" Android: Layout_height = "Wrap_content" android: gravity = "true" Android: Orientation = "horizontal" & gt; & Lt; Android: layout_height = "match_parent" Android: layout_marginRight = "5dp" Android: layout_marginBottom = "5dp" android: content = "@ string / li_btn_desc" android: id = "@ + id / postToLIButton" Android: layout_width = "wrap_content" "Android: Background =" @Android: Color / Transparent "Android: src =" @Drawable / Linking_switch_off "/> & Lt; Android: layout_height = "match_parent" android: text = "@ string / share_on_linkedin" Android: layout_gravity = "center_vertical" Android: textAppearance = "Android": "TextVieworance" Android: id = "@ + id / postToLITextView" android: layout_width = "wrap_content" : ATR / Text Appendixium "Android: Text Size =" 14 SP "/> & Lt; / LinearLayout & gt; & Lt; / RelativeLayout & gt;   

If I swap my image button and textview above, then my app has crashed with runtime uppressure now !! Apart from this, I am unable to focus the text so that it is connected to the center of the button. I should do something wrong and I have tried to search both SEO and Google, I appreciate any indicators in the right direction.

- Good

just ImageButton and TextView Swap orders Your runtime error is either unrelated or you need to rearrange it (sometimes the resource ID is funky), due to the need to clean your project. For this, use android: gravity = "center_vertical" TextView right in the center