Posts

Showing posts from June, 2013

e commerce - php shopping cart, creating a sign up and pay online page -

OK fixes my problem, im builds a site where people first sign up and directly After the payment, my problem is whether the customer who signs up uses a different card to pay for example, his wife sign up to store the details of the card and get the SSL certificate Information and payment information I am trying to figure out how to match ... I need this so that I can tell if they have paid. IM is writing it in PHP, currently sends me an email when they have a database Sign up instead of being straightforward, any help? The simplest thing is that it comes to mind that there will be options on the payment screen, which will give you the following: (1) Use the billing information that you provided during registration (2) Specify the name as it appears on the card (as most sites I have ordered to join) Does this answer your question? If you are worried about matching the account, if they use a different name, then I will think of the way the session is running, I will consider ...

drupal - How to paginate Views page display? -

So, now I have been making a website in Drupal for more than 2 years, but I have a Drupal View module and paging page In fact, I am picking up a part of the articles, publishing and publishing their date and limiting it to only 10 items per page, but I do not see "more links" and I have never seen pugging in the droplets Do not try Is of Any help would be great, thanks! You should use the "use pager" setting at this time "no" Is set to.

mysql - Sum values of a single row? -

I have a MySQL query that returns a line which is a series of 1s and 0s This progress bar is for pointer I have a short code for this code, but I tried to submit the values ​​in a query and I realized that I can not use SUM () because they are multiple columns but only one line Is there any way I can add this query automatically? This is like this: item_1 | Item_2 | Item_3 | Item_4 ------- + -------- + -------- + -------- 1 | 1 | 0 | 0 Edit: I forgot to mention, item_1 and no further simple field values, but each one has an expression, such as if selected (field_1 = 1 and field_2 is not zero, 0, 1) Atom item ... ... , it seems that I have a nested query: SELECT (item_1 + item_2 ...) (select if field_1 = y and field_2 is not zero, 1, 0) ASI item_1 ...) as nickname right is? select item items item_1 + item_2 + item_3 + Item_4um ItemSum MyTable If there can be zero values, then you have to handle them like this: ifnull (item_1, 0) + ifnull ( Item_2, 0) ...

javascript - Fill list up to 10 items -

I have up to 10 items & lt; Ul & gt; Seeing a way to fill the list. If the list does not contain 10 in HTML, then I want to repeat the item itself. For example: & lt; Ul id = "carousel" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; I tried to do it myself, but it is not working properly that I want it: max_slides = 10; Slide_holder = $ ('#branded'); All_slides = $ ('# Carousel Li'); Number_of_slides = all_slides.length; Number_of_slides_to_add = max_slides - number_of_slides; If (numbe...

c# - Is it possible to split a string into a dictionary? -

Does this string be '& amp; And init one dictionary at a time or do you have to first use a string array? I want to take part in the url: ? A = 2 & amp; B = 3 and dictionary & lt; String, string & gt; Load duplicates for your own question ... As the fetus said, HTTT suitability. The parasetting string () is your best bet. Edit: > After digging a bit, I found the following extension method nameValueCollectionExtensions.CopyTo (this NameValueCollection, IDictionary & lt; string, object>), which you can use A true IDictionary can be used to populate.

model view controller - is there a way to set the HideSurroundingHtml value in ASP.MVC 2 -

I am creating a table of data like this & lt;% foreach Person in var model. People) {%> & Lt; TR & gt; & Lt; Td> & Lt;% = Html .nationlink (helper name, "editing editor")% & gt; & Lt; / Td> & Lt; Td> & Lt;% = Html.DisplayFor (c = & gt; person .name)% & gt; & Lt; / Td> & Lt; Td> & Lt;% = Html.DisplayFor (C => person.ege)%> & Lt; / Td> & Lt; Td> & Lt;% = Html.DisplayFor (C => person.backet)% & gt; & Lt; / Td> & Lt; / TR & gt; & Lt;%}% & gt; I created templates to override the following errors: & lt;% @ master language = "c #" inherited = "system. Web.mvc.ViewMasterPage "%> & Lt; Script runat = "server" & gt; Safe Override Zero OnInit (EventArgs e) {base.OnInit (E); If (ViewData.ModelMetadata.HideSurroundingHtml) {TablePlaceholder.Visible = false; } and control. Remove (data); DataPlaceholder.Con...

drupal problem with creating word document files -

आई डी न्यूज ड्रूप को वर्तमान में आई ड्रूपल 6 संस्करण का उपयोग कर रहा है मुझे शब्द दस्तावेज़ फ़ाइलों को बनाने के लिए है चयनित नोड्स कहते हैं (/ नोड / 166, नोड / 21) हम शब्द दस्तावेज़ बनाने के लिए या नोड्स के समूह के साथ पीडीएफ फाइल बनाने के लिए कोई मॉड्यूल नहीं है, हम एक वस्तु के लिए पीडीएफ फाइल उत्पन्न कर सकते हैं पीएचपी में वर्ड डॉक्युमेंट फाइल बनाने के लिए php प्रोग्रामिंग के माध्यम से बनाई गयी शब्द फ़ाइल के लिए यह टेक्स्ट है - परीक्षण से पीएचपी से एक डॉक्टर फाइल बनाने के लिए " ; ('$ Index.php? Q = 1,2'); $ परिणाम = ob_get_clean (); fwrite ($ fp, $ परिणाम); "निष्पादित" गूंज; fclose ($ fp);;> उपर्युक्त उदाहरण में यह शब्द दस्तावेजों को उत्पन्न करता है, इसलिए मैंने सोचा कि शामिल करें फ़ंक्शंस क्या करेगी और मैं चयनित नोड्स के साथ एक ही फ़ंक्शन पर कॉल कर सकता हूं .... बाद में पता चला कि यह आपकी मदद नहीं करेगा एस क्योंकि ड्रूपल संरचना पूरी तरह से अलग है क्योंकि यह केवल इंडेक्स.एफ़पी और हुक का प्रयोग करता है और ज्यादातर अनुरोधों में फ़ंक्श...

c# - Convert anonymous type to array or arraylist. Can it be done -

Trying to retrieve data using the Linux from the database. I want to use anonymous forms and convert to Ilist, Array, ArrayList or archive. Data is used in third party objects that accept Ilist, arraylist or archive. I can not seem to do this work. I get the following error, "Sequence operators are not supported to use 'system.String'" " (var db = new dbDataContext ()) {var query = e Select db.people in db.people new {calculation = e.lastname.count ()} array test; test = query.ToArray ();} There is nothing to convert results to array lists, or to anonymity type. Here is another version of your code that will fail: Using (var db = new dbDataContext ()) {Var query = db.people.Select (x = & gt; x.ListName.Count ()); Foreach (int x in query) {Console.WriteLine (x);}} It will still fail in the same way - because it is the translation of this bit: x => in SLAL. / Code> is causing the problem. Change it to: x => X.ListName.Len...

xml - Using xpath on PHP: how to select first child? -

मेरे पास इस तरह की XML संरचना है: & lt; लेआउट & gt; & LT; पैटर्न & gt; ... & lt; / pattern & gt; & LT; पंक्ति & gt; ... & lt; / पंक्ति & gt; & Lt; / लेआउट & gt; मैं XPath का उपयोग कर अपने अनुक्रमणिका के द्वारा और लेफ्टिनेंट & gt; के पहले नोड का चयन कैसे कर सकता हूं? w3schools / किताबों की दुकान / किताब [1] / शीर्षक , लेकिन तब: इस के साथ एक समस्या है ऊपर दिए गए उदाहरण IE और अन्य ब्राउज़रों में अलग-अलग परिणामों से पता चलता है। आईई 5 और बाद में यह लागू किया गया है कि [0] पहला नोड होना चाहिए, लेकिन डब्ल्यू .3 सी मानक के अनुसार यह होना चाहिए था [1] !! एक समाधान! आईई 5 + में [0] और [1] समस्या को हल करने के लिए, आप चयन भाषा को XPath में सेट कर सकते हैं। लेकिन यह क्लाइंट-विशिष्ट । PHP मैनुअल इस बारे में बहुत स्पष्ट नहीं है। फ़ेलिक्स ने कहा: कोशिश करने का क्या? $ l = नया SimpleXMlelement ('& lt; लेआउट & gt; & lt; पैटर्न & gt; ... & lt; / pattern & gt; & lt; पंक्ति & gt; ... ...

sql - Distinct elements in django model -

I am a Django novice and I wonder if there is a more efficient way to do the following tasks (at the database level) . I have a model: class.fu (models.Model): item = model.Intergrill () another_item = models.IntegerField () and want to get all the different values ​​of "item". It is that I have done so far: distinct = set (for row in [Row.item Foo.objects.all ())) It's easy to understand But if I understand how Django works then the SQL query is not very efficient because it is something like this: SELECT * FROM DB When I only need: choose items separately from DB Any way to do it more efficiently? You different section to value or values_list section? different , value and values_list are all there. Then you can do this: Foo.objects.values_list ('item', flat = true) and It will return a list of items - match your match to a different item related to query.

objective c - Utility function for NSInvocation -

One of the worst-designed works in Cocoa seems to be NSIvonation, so I decided to decide whether anyone Has written a recipe it's easy to use, I got a recipe. Now he used some very laughing techniques to be able to do this. Do you recommend using this code or can this technique also be difficult to debug errors? If not, what would you recommend instead? I have used this vision of NSINVocation in some shipping iPhone products and MAC products It certainly uses some weird techniques but it is not a delicate hack in any way: it is solid and solid because there is a possibility of creating NSINNocation. I have retained a counting bug in the code (of course for a long time) but it is not difficult to debug to maintain here than anywhere else. Of course, my opinion is absolutely biased.

c# - embed string in the html -

asp.net c # मैं नीचे कोड का उपयोग कर रहा हूं .. & lt;% string H = "हैलो";% & gt; & Lt;! - "wall_com_insert.aspx? टीड =" + Application.Get ("Tid"); - & gt; & Lt; div id = "content_sr_comment" शैली = "ऊंचाई: ऑटो" & gt; & amp; nbsp; & lt; asp: लेबल आईडी = "Label8" runat = "server" text = "& lt;% = h% & gt;" & Gt; & lt; / एएसपी: लेबल & gt; & Lt; / div & gt; लेकिन मुझे आउटपुट प्राप्त हो रहा है लेबल पर प्रदर्शित आउटपुट: "& lt;% = h%>" मुझे लगता है वाक्यविन्यास सही नहीं है .. क्या मैं सहायता प्राप्त कर सकता हूँ आप एक सर्वर कमांड को सर्वर टैग इसे आज़माएं: & lt; div id = "content_sr_comment" शैली = "ऊंचाई: ऑटो" & gt; & amp; nbsp; & lt;% = h% & gt; & lt; / div & gt; या & lt; स्क्रिप्ट runat = "server" भाषा = "सी #" & gt; शून्य पेज_लोड (ऑब्...

Python: How do I access an decorated class's instance from inside a class decorator? -

यहाँ मेरा क्या मतलब है इसका एक उदाहरण है: वर्ग MyDecorator (ऑब्जेक्ट): def __call__ (आत्म, मजेदार): # मैं किस बिंदु पर सजाया हुआ विधि के अभिभावक वर्ग के उदाहरण का उपयोग कर सकूं? # नीचे दिए गए उदाहरण में, मैं यहां से प्रवेश करना चाहता हूं: myinstance def wrapper (* args, ** kwargs): वापसी func (* args, ** kwargs) रिटर्न आवरण वर्ग SomeClass (ऑब्जेक्ट): ## self.name = 'जॉन' # एरर यहां नाम = "जॉन" @ माय डिक्कोरेटर () डीईफ़ नामप्रतिष्ठा (स्वयं): प्रिंट (स्वयं। नाम) myinstance = कुछ क्लास () myinstance.nameprinter () क्या मैं वास्तविक वर्ग को सजाने की ज़रूरत है? वर्ग MyDecorator (ऑब्जेक्ट): def __call __ (आत्म, फ़ेन्क): डेफ आवरण (वह, * आर्ग्स, ** क्वार्ग्स): # # आप "उस" पैरामीटर के माध्यम से "स्व" से "स्वयं" का उपयोग कर सकते हैं ## और इसलिए जो कुछ भी आप चाहते हैं, ** kwargs) वापसी आवरण

HTML <base> in Chrome -

है & lt; base href = "http://google.com" / & gt; & Lt; img src = "/ intl / en_ALL / चित्र / लोगो.gif" / & gt; क्रोम में समर्थित है? यह फ़ायरफ़ॉक्स में ठीक काम करता है विशेष रूप से, सापेक्ष छवि लिंक बेस यूआरएल को हल नहीं कर रहे हैं। यह इसके लिए है: नवीनतम में जांच की गई OSX और Windows क्रोम (4.0.249.78) और & lt; आधार & gt; टैग को क्रोम में समर्थित किया जा रहा है: यह है। मैंने एक साधारण HTML दस्तावेज़ बनाया है: & lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; मेटा http-equiv = "सामग्री-प्रकार" सामग्री = "पाठ / html; वर्णसेट = यूटीएफ -8" & gt; & Lt; base href = "http://google.com" & gt; & Lt; शीर्षक & gt; परीक्षण बेस-टैग & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; img src = "/ intl / en_ALL / चित्र / लोगो.gif" & gt; & Lt; / body & gt; & Lt; / html &...

refactoring - Eliminating code duplication in a single file -

Unfortunately, a project on which I am working recently has a large amount of copy-paste code, even in single. Files Can any device or techniques detect repetitious or near-duplication in a file? I'm beyond comparison 3 and works well to compare different files, but I'm in loss to compare single files. Thanks in advance. Edit: Thanks for all the great tools! I will definitely check them out. This project is an asp.net / c # project, but I work with many languages ​​including Java; I'm interested in the best tool for deleting duplicates ( for any language ). Check out receives duplicate code which is central to extracting a location.

r - How to use an image as a point in ggplot? -

Is there a way to use a specific small image as a point in a scatter plane with ggplot2? Ideally, I would like to resize images based on a variable. Here's an example: Library (GG Plot 2) p So I basically want to know that Is there a way to provide a specific image here to display raster images instead of numbers A minimalist geom, replace it with the named list with the Library (ggplot2) library (grid) ## to display ## rastergrob .flaglist & lt; 1), "fr" = matrix (c ("blue", "white", "red"), 1)) - list ("ar" = matrix (c ("blue", "white", "blue"), 1) Flaggrab & lt; - function (x, y, country, size = 1, alpha = 1) {grob (x = x, y = y, country = country, size = size, cl = "flag")} drawdetails.flag & lt; - Function (x, recording = FALSE) {for seq_along (x $ country)) {grid.raster (x $ x [ii], x $ y [ii], width = x $ size [ii] * unit (1, "mm"), hey ght = x $...

Image compatibility in iphone and android -

डुप्लिकेट: मैंने UI विकसित किया IPhone ऐप्स के लिए और अब एंड्रॉइड ऐप्स में एक ही UI का उपयोग करना चाहते हैं मैंने पढ़ा कि एंड्रॉइड इमेज रिज़ॉल्यूशन के लिए डिबोट का उपयोग करता है और मैंने यह भी पढ़ा कि 1 डुबकी = 1.5 पिक्सेल मैं बस छवि आकार 1.5px से गुणा करता हूँ। अब समस्या ये है कि छवि धुंधली है और आईफोन क्षुधा के रूप में स्पष्ट नहीं है तो, क्या कोई सुझाव दे सकता है कि मुझे कैसे डिजाइन करना चाहिए ताकि इसका उपयोग iPhone और Android पर किया जा सके। नोट: मैं यूआई डेवलपमेंट के लिए फ़ोटोशॉप का उपयोग करता हूं। Photoshop CS4 के संदर्भ में सुझाव दिया गया है कि यह बेहतर होगा। असल में, 1 डुबकी 1.5 के बराबर नहीं है पिक्सल। से: एक आभासी पिक्सेल इकाई जो अनुप्रयोगों को उनके यूआई को परिभाषित करने में इस्तेमाल कर सकती है, ताकि घनत्व-स्वतंत्र तरीके से लेआउट आयाम या स्थिति को व्यक्त किया जा सके। घनत्व-स्वतंत्र पिक्सेल 160 डीपीआई स्क्रीन पर एक भौतिक पिक्सेल के बराबर है, आधारभूत घनत्व मंच द्वारा ग्रहण किया गया है (जैसा कि इस दस्तावेज़ में बाद में बताया गया है)। चलाने के समय, मंच उपयोग ...

unix - shell script running by sensing a file -

I am working on Unix, I want to write a shell script which checks the file named "temp_file.txt" on windows And then execute some commands. Is this possible? How can we connect to windows and go to a specific directory and check a file? You can set up SSH on Windows and then connect to Windows and run the command You can write a script on Unix using the SSH client. Alternatively, if you can buy it, write it to Windows batch, and execute your command on Windows or you can turn on Windows Terminal Services, and using the Telnet Protocol from Unix to issue the command You can. Programming languages ​​that support Telnet include Perl () and Python ();

openoffice.org - Algorithm of naming embedded Pictures in OpenOffice -

I need to embed images in the openoffice text documents with the help of OpenOffice, for this I work directly inside zip archive Need to do and modify the appropriate xml files. Now the problem is that the Open Office Store stores embedded images inside the Pictures folder and gives them a unique name according to the information given in the picture. The filename looks similar to the following: 10000000000000FF000000D84ABBAECB.jpg This file name is in 8 parts by 4 parts per part Is split up and ends with the file extension. 10000000 000000FF 000000D8 4ABBAECB ^ ^ ^ Unknown height width checksum My problem now is that I have no clue what kind of checksum algorithm Is used. does not show any special rules for the name of embedded pictures I think you might like them But you like (within the sensible limitations).

javascript - Getting the text under the mouse pointer -

I am writing a browser add-on and want to get the word / word that the user currently does via Javascript Hovering from There is no good general purpose function to do this. If you specify which browser you are adding, then a specific solution could be that while facing this problem in the past, I had to request the user to double click the word (again you double-click, get the selection , And can reset it).

asp.net - ADO.net Data Services - Querying -

Just I'm ADO Net Data Services started learning. Some page queries show like (sample) http: // localhost: 1705 / ServiceExample / SomeService.svc / person (1) / name http: / / Localhost: 1705 / servicex / some ssc / scc / person (1) / name / $ value Is it XPath or XQuery? Where can I find the full rule to create such questions with an example? Thanks in advance. Try about 1/4 about the path below. "Web Data Services Configuration URL"

windows - Strange Value in EXE header -

I have seen the strange value placed in the EXE header 00000000: 4D 5A 90 00 03 00 00 00 - 04 00 00 00 FF FF 00 00 0010: B8 00 00 00 00 00 00 - 40 00 00 00 00 00 00 00000020: 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00000030: 00 00 00 00 00 00 00 - 00 00 00 00 8 00 00 00 000000: 00 00 00 00 00 00 00 00 - 00 00 00 00 A8 00 00 00 & lt; - I do not know what is A8 but if I change it from zero then my program does not execute. In a word: What is that? Besides, can you also link me to full MS DOS header? Offset 0x3c on DWORD, offset of new EXE header, alias IMAGE_NT_HEADERS So if you value there If the change, then the PE loader can not find the new EXE header.

django - include sessions inside an inclusion -

Grass throat, I can not seem to include the request. Any ideas how can I get this data? Sessions are my own, custom ones. looks like my inclusion @ register.include_tag ('base / side_bar.html', le_context = true) def show_ side_bar (context) : Model = Model.Objects.All () creates = Make.objects.all () request = context ['request'] return {'creates': creates 'model': model,} the exception was caught while rendering: 'request' and Call it to {% load extras%} {% show_side_bar%} thanks For the request variable in your template reference, the django.core.context_processors.request reference processor can be found in your Must be in TEMPLATE_CONTEXT_PROCESSORS setting move, this is not by default if you want to get it from this context, then you have to add it to your settings. (For more information about reference processors, see.)

Trying to do window resize with jquery cycle slideshow -

"itemprop =" text "> I am trying to run a javascript window with a jQuery cycle slideshow to resize the script size on a page But I'm hitting some bugs I think I can not work It changes the size of the first image on the page load, but forgets the new height / width characteristics for subsequent slides. I can use jQuery on these before and after, but the images are completely flashed in a brief moment before fully resizing. Does the jQuery.cycle slides into their original size? If so, how do I stop this $ (document) .ready (function () {$ ('slide show.') Cycle ({fx: 'fade', speed: 200 , Timeout: 1000, pause: 1, before that: function (currSlideElement, nextSlideElement, option, forwardFlag) {after resize (;;)}}: function (currSlideElement, nextSlideElement, option, forwardFlag) {resize (;); $ '(' .slideshow ') seems (' img ') CSS ("height", "0"); .. $ (' # image ') hide () disable (1000) .fa...

programatically extract the file name from a Download Link using delphi -

How can I remove the file name from the download link using Delphi? Example http://pj-mirror01.mozilla.org/pub/mozilla.org/firefox/releases/3.6/win32/es-CL/Firefox%20Setup%203.6.exe Firefox Setup 3.6.exe Try it Function GetURLFilename (file type: string; constant delimiter: string = '/'): string; Var I: integer; I start: = LastDelimiter (Delimiter, FILEPATH); Result: = Copy (FILEPATH, I + 1, MaxInt); Results: = UrlDecode (Results); End; The URL was copied to the code and it looks function URL code (Cont. Encoded STR: string): string; Var I: integer; Start the result: = ''; If Length (encoded STR) & gt; 0 Then I start: = 1; While I & lt; = Length (encoded STR) starts when encoded STR [I] = '%' then the result starts: = result + crow (hexteoin (encoded STR [I + 1] + encoded SRR [I + 2])) ; I: = Succ (Succ (I)); And end and if encoded STR [I] = '+' then result: = result + '' and result: = result + encoded SRR [I...

Calling C function from DTrace scripts -

is basically an impressive, powerful tracing system from Solaris, but it is kept on FreeBSD and Mac OSX. DTC uses a high level language called A, which is not called opposite to DW or C. Here's an example: io ::: start / pid == $ 1 / {printf ("file% s offset% d size% d block% llu \ n", args [2 ] -> fi_pathname, args [2] -> fi_offset, args [0] -> b_bacount, args [0] -> gt; b_blocks); } Command line sudo dtrace -q -s & lt; Name & gt; .d & lt; Pid & gt; All IOs generated from that process are logged. My question is, if it is possible to call custom C functions from DTC scripts, during tracing only for advanced operation with that tracing data. Deterus explanation prevents you from doing something similar, because you can not write a loop in D : If you screw it in any way, size, or form, you crash the whole system when a D check is in the fire, you are in the Kenel mode, not the user. Quote from "Linux kernel module progra...

mysql - Python database access using single file/already build file -

I have to save some data from Python to MySQL. I have tried, but it needs to be built. The build on my mac fails; Besides, I need to have a file to copy over the server. I do not have access to install anything. Would you recommend me a solution, please! Even where I can get MySQLdb for a specific platform. Thanks in advance! In MySQL, one (From the same code's database to Postgres or sqlite3 to psql ) I would be surprised if it was not already installed on the same server. Then you can create the input by using Python for that feature and call it with the subprocess . Depending on the data, this can be as simple as generating a INSERT command from scratch, or you can generate a temporary input file (eg in CSV format) and use it by name Can pass.

osx - Is it possible to remotely debug linux code from a non-linux system? -

I know that remote debug code is possible using GDB's server mode and I know that this is the debug code that Crossed - has been compiled for any other architecture, but is it possible one step forward and remote debug Linux applications to use gdbserver from OS X? Definitely, but you need compiled compiled GDB for OSX-host and Linux-target . This is not absolutely unusual; There should be a lot of GDB documents to cover it.

c# - Can I reassign from code an object declared as a resource in XAML? -

I have a class for my data, MyData , and I call it my GUI I'm accessing data in binding by I decided to set the main panel datacentext as an example of this object in my window so that I can tie my various controls with its members. So I can easily reference it in my XML, I have the MyData in the window. Resource looks like : & lt; Local: Myadata X: Key = "MyData Instance" /> Then I get a reference for my code because I sometimes need this as well. MyData myDataInstance; Public Manvindo () {Initialization (); MyDataInstance = (MyData) FindResource ("myDataInstance"); } It works well, but I can also load it another file from MyData by deserializing it from the file. myDataInstance = (myData) serializer.Deserialize (fileStream); I thought that I can simply reassign the code to code in my code, but this does not seem to be because my guinea does not reflect new figures . I think the restoring is breaking the link between the mai...

windows - Dnsqueryconfig returning junk characters! -

नमस्ते Iam निम्न कोड का उपयोग कर मशीन के डोमेन नाम को पुनः प्राप्त करने का प्रयास कर रहा है / / अगर (FAILED (DnsQueryConfig (// DnsConfigPrimaryDomainName_UTF8, // FALSE, // NULL, // NULL, // cszDomainName, // और आकार //))) // {// // break; //} // LPWSTR lpcszContent = NULL; // यदि (इंट सीबीएमल्टीबाइट = मल्टीबाइटटोवाइडकैर (सीपी_यूटीएफ 8, 0, सीएसजीडीमेनाम, -1, शून्य, 0)) // {// एलपीसीएस कॉन्टैन्टेंट = न्यू वॉचर_टी [सीबीएमल्टीबाइट]; // // if (NULL = lpcszContent) // {// if (0 == MultiByteToWideChar (CP_UTF8, 0, cszDomainName, -1, lpcszContent, cbMultiByte)) // {// delete [] lpcszContent; // टूटना; //} //} // if (NULL! = LpcszContent) // {// cstrDomainName.Format (एल "% s", lpcszContent); // // printf ("डोमेन नाम UTF-8 वर्ण:% s", lpcszContent); // हटाएँ lpcszContent; //} कोड अंग्रेजी मशीन पर ठीक काम करता है लेकिन ब्राज़ीलियाई ओएस के साथ एक मशीन पर डोमेन नाम जंक अक्षर के रूप में पुनर्प्राप्त किया जाता है। क्या कोड के साथ कुछ गड़बड़ है? कृपया मदद करें। धन...

My flash reinitializes (reloads) when it's container is resized (via javascript - jQuery) in FireFox -

I have a flash within a holder div (flash container). I use swfobject to insert the flash object (if it makes a difference) I want to reduce the size of that holder's divisor, when I get "second level" in my "flash app" Can do (.enimate () function with jQuery). What is meant by "Flash Application": I have a human body, which I can click in different body areas. This is the first action - and the effect is to zoom to that particular area of ​​the body. Then I can click again in a more specific area in that area - and in effect bring some stuff through AJAX Are there. (This is some medical stuff, disease etc.) - "Second level" in my "Flash app" Then I can click on things I received through Ajax - when I see the size of the flash holder I change. The problem is that, due to this resizing, my flash gets reloaded and comes back to its original state without that zoom level. It appears in the reload "second level"...

SQLite java memory usage increases until an outofmemory exception -

I use SQLite in the Java program. When the Java program is running, many queries are sent to the database, as well as the temporary tables are created in the archive and then deleted (using the DROP). The problem is that when the number of different tasks in the database increases, then the memory usage from the Java program also increases. As a result, the program crashes at some point with an exception or exception. I use PRAGMA temp_store = 2 to keep the temporary table in memory, but each time I was removed (using DROP tablename) before creating another I what is the database with the journal Anything to do? How do I solve this problem? With your view of the program it is impossible to say what is the problem. Do you have the results of the questions running in the database of memory? If your program is written in such a way that you have a lot of JDBC result sets and the garbage collector can not set the weather, then they are safe to release the memory, which you can...

Localized Gmail IMAP Folders -

I am creating a tool that analyzes Gmail specific folders (like '[Gmail] / All Mail' , '[Gmail] / Spam'). It seems that names are localized in relation to user localization settings, so '[Gmail] / all mail' shows '[Gmail]' as seen / for example 'Todos' for Spanish users. Canonical name-specific for non-gmail folders? Is there a way to find out? Or a list of potentially localized names in the worst case scenario. Update June 2016 Keep in mind that Gmail In IMAP, XLIST will be removed at the end. You will need to use it instead. Unfortunately, Gmail does not advertise this capability as per the imagery, but it has been implemented and worked correctly (tested on 09/09/2016) - Note: \ Trash flag: C: 55535a988a074191 "Returns (special-use) S: ... s: * list (\ HasNoChildren \ trash)" / "" [Gmail] / Bin " gives the same response as a regular list (I can say that this is a bug in Gmail). Original Ans...

Glassfish authentication : can the realm be an external database -

I'm completely new to login and authentication concepts. I am working on a glassfish web application which should present general content to any visitor, and the registered user will be logged in with some additional content username and password. I'm reading Java EE tutorial about security, and I thought form-based or HTTP authentication would satisfy my needs (for the credentials of the visitor while trying to browse a protected content Is called). However, my first estimate was that the registered user should be stored in security of an application server in the glassfish in an external database with its hashed and salty password, manually defining users and groups To determine and determine them for roles in the application). Did I misunderstand security at the glassfish? What is the intention? Or can there be an external database outside of the Apple server? Any link for documentation on this topic will be useful to me Thank you in advance Tick This is a...

xml - WYSIWYG View Editor in 'Android'? -

डुप्लिकेट : मैं चाहूंगा चेकबॉक्स को स्थानांतरित करने के लिए, इसलिए यह 'एंड्रॉइड' के लिए मुख्य.एक्सएमएल के अंदर पूर्ण लेआउट के ऊपर-बाएं कोने से अलग स्थान पर प्रदर्शित होता है। मैं अपने विचारों को संपादित करने के लिए एक्लिप्स का उपयोग कर रहा हूं। मैं यह कैसे करूँगा? एक आईफोन पर उनके पास इंटरफ़ेस बिल्डर नामक टूल है जो आपको वाइव्यूजी फैशन में चीजों को स्थानांतरित करने की अनुमति देता है। क्या एक्लिप्स की समान कार्यक्षमता है? मैं एक रिलेटिव लेआउट का उपयोग करने की सलाह देता हूं आप अन्य चेक या माता-पिता के दृश्य के संबंध में अपने चेकबॉक्स की स्थिति बना सकते हैं, उदाहरण के लिए अगर आप इसे दाहिने ओर और टेक्स्ट वीव के नीचे स्थित करना चाहते हैं, तो आप & lt; रिलेटिवलेआउट एंड्रॉइड: लेआउट_विंड = "फ़िल_पेरेंट" एंड्रॉइड: layout_height = "fill_parent" & gt; & Lt; TextView एंड्रॉइड: id = "@ + id / textview" एंड्रॉइड: layout_width = "fill_parent" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: टेक्स्ट = "टेक्स्...

c++ - What is *.o file? -

I am compiling my project and it stopped with this error: LINK || Fatal error LNK1181: Input file 'obj \ win \ release \ src \ lua \ bindings.o' | Compilation using code 7: Under Win 7 with the VS 2005/2008 compiler. There are other blank directories where * .o files are missing. What do they do? A file ending in .o is an object file . The compiler creates an object file for each source file, before adding it to the last executable.

ASP.NET MVC 1.0 Controller Action With Same Signature -

Basically I have an index method in my User Controller CCS Class that gives ActionResult to display the dashboard for the user. There is an HTML button with a type of submit on this page. When I hit this button I want to capture it on the server side, the user wants to log out. How can I do this since I am not returning information and the legal sign is ending. Thank you, Mike [Authorized] Public Performance Index () {Return View (); } [Authorize] [AcceptVerbs (HttpVerbs.Post)] Public Performance Index () {FormsAuthentication.SignOut (); Redirect Action ("Index", "Home"); } Use: [Authorize] ] [Accept Works (HTTPVirbbs.post)] Public ActionRashout Index (Form Collection Value) {Forms Authentication. Signature (); Redirect Action ("Index", "Home"); [AcceptVerbs (HttpVerbs.Post), ActionName ("Post")] Public Performance Index Post () {FormsAuthentication.SignOut () ; Redirect Action ("Index", "Home"); } ...

c - Child process unable to read from created pseudo terminal -

I am trying to write an app that can enter SSH with password, using proxy terminals. But if I write on the master device then the data is not displayed in the slave device somehow. Here is a simple test case: #include & lt; Sys / wait.h & gt; # Include & lt; Sys / types.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Unistd.h & gt; #ifdef __linux__ #include & lt; Pty.h> #else #include & lt; Use.h & gt; #endif int main () {int master; Pid_t pid = forkpty (& master, NULL, NULL, NULL); If (pd == 0) {int ch; Read (0, and, 1, 1); _exit (1); } Else {printf (press Enter to send a byte. \ N "); Getchar (); Write (Master, "1", 1); Printf ("Waiting for process to complete ... \ n"); Waiting pill (PID, faucet, 0); Return 0; }} After entering the first output "Press Enter to send a byte", I hope to read back to the child's process () but read () there is uncertain Even if the master's writ...

c# - iTextSharp + FileStream = Corrupt PDF file -

I am trying to create a PDF file with iTextSharp. My attempt is to write PDF content in MemoryStream, so I can write the results both in the file and database blob. File is created, it is about 21 kb size and it looks like a PDF while doing Notepad ++ but my PDF Viewer says it is interrupted. Here's a small snippet of code (not just trying to write on a file, not for the database): document myDocument = new document (); MemoryStream myMemoryStream = New MemoryStream (); PdfWriter myPDFWriter = PdfWriter.GetInstance (myDocument, myMemoryStream); MyDocument.Open (); // Content of PDF (FileStream FS = File is inserted here by using Create Create ("D: \\ ... \\ aTestFile.pdf") {myMemoryStream.WriteTo (fs); } MyMemoryStream.Close (); = "Text"> I think your problem was that You were not adding content to your PDF properly This document is done through the add () method and you can complete the call by documenting. Stop it (). When you call the docum...

asp.net - jquery gridview -

On my pages, ASP Net 3.5 is hyperlinks inside and outside the gridview. Is there any way to determine how was clicked - inside or outside? All Gridview has the same CSS class but I do not want to use CssClass for any element of the grid. $ ("a"). Click (function (e) {// This feature does not exist, it is only giving an idea if ($ (this) .attr ('ParentClass') = "GridViewClass") {} else {}}); Try this selector. $ ('.GridViewClass a')

c# - Differences between Page.User.Identity vs Request.LogonUserIdentity -

What is the difference between Page.User.Identity and Request.LogonUserIdentity (behind the scenes)? No differences in type, name, etc., but how to implement it behind the curtains (i.e., a call window xxx API and other apx xxx API ...). This is what system you are using to authenticate users, and by your impersonation Depending on which settings are there for For example, under the VS Development Server, using standard formatting, standard SQL subscription providers and the following code: // m_logged In page a little control Is: m_LoggedIn.Text = string.Format ("& lt; br /&gt.Page.User.Identity: {0}" + " Br I get the following output: Page. the user. Identity: zhaph request. LogonUserIndentity: [ComputerName] \ Ben The first line (page user.indenti) is the second line of Windows identification with which site I am logged in to the site with the request I 'has not enabled cloning, it is my logon because the web server is running und...

sql - Can MySQL convert a stored UTC time to local timezone? -

Can MySQL convert a stored UTC time into a local timezone: Ed time directly in a general selection statement? Suppose you have some data with Timestamp (UTC). create table 'some data tab' (`id`in (11) null auto_interpretation,` value float tap default '0', 'date', '0000-00-00 00:00:00 ', Primary Key (`ID`) by default is not zero time zero Then when I select " value, some dates Date from "; I definitely get all the dates in their stored UTC form. But we say that I want to do them with other timezones (DST), can I add some magic to selected queries so that I get all the dates in the chosen time zone? Select "value" from the charetate, the timezone (date, "Europe / Berlin"); Or let me head it in some other layer Thanks Johan If your MySQL installation is done If you allow to use CONVERT_TZ, this is a very clear solution, this example shows how to use it. SELECT CONVERT_TZ ('2010-01-01 12:00...

asp.net - How can i set a DataItem to some part of aspx code? -

मेरे पास कुछ कोड है: & lt; div & gt; & lt;% # DataBinder .Eval (कंटेनर.डेटाइटम, "एमसीएलसप्रॉपर्टी")% & gt; & lt; / div & gt; & Lt; img src = '& lt;% # DataBinder.Eval (कंटेनर.डेटाइटम, "M_AnotherClassProperty")। & Lt; स्ट्रिंग & gt; ()% & gt; लेकिन कोई ऐसा घटक नहीं है जो इस कोड को पुनरावर्तक, डाटालिस्ट या ऐसा कुछ जैसे लपेटता है। मुझे उम्मीद है कि मैं स्पष्ट बता सकता हूं (मुझे ऐसा नहीं लगता, लेकिन मैं आशा करता हूं:) आप सामान्य इनलाइन कोड का उपयोग कर सकते हैं, जैसे: & lt; div & gt; & Lt;% = SomeObject.SomeProperty.ToString ()% & gt; & lt; / div & gt; वस्तु प्राप्त करने के लिए, आप कोड-पीछे वाले पृष्ठ में संरक्षित संपत्ति को परिभाषित कर सकते हैं।

Require constant-defining files at once or by utilisation in PHP? -

I have approximately 20 files containing 10-15 times: define ( 'SomeConstantName', 'stringBetween10and200Chars'); This app is all important, but every constant file is parallel to an app page. For example, index.php will require index_constants.php for it. The question is whether I would like to make a file of all static-definitions together, related. I am asking about speed and efficiency. Thank you. If you search for performance (after a file with useless data) If the page needs only one, then it will be included in it) then enter a file for each page, but if you are looking for low / simplicity (If you think that this will not create any kind of complexity for you) Thanks ...

concurrency - fluent nhibernate automap version column -

मेरे सम्मेलन में वर्तमान कोड: सार्वजनिक शून्य लागू करें (FluentNHibernate.Conventions.Instances। IVersionInstance उदाहरण) {instance.Column ("RowVersion"); instance.Not.Nullable (); instance.UnsavedValue ( "0"); instance.Default (1); } यह रोव संस्करण को संस्करण कॉलम के रूप में प्रस्तुत नहीं करता है। यह रोवर्सियन को सिर्फ एक और कॉलम के रूप में मानता है। तो मेरा सवाल है कि आप फ़्लुंट नाइबर्नेट के प्रयोग से पंक्ति संस्करण संगामिति कैसे जोड़ सकते हैं? संस्करणःस्टेप वर्ग केवल उन गुणों को देखता है जो version या टाइमस्टैम्प के नाम से मेल खाते हैं। आपकी संपत्ति को उस नाम से मेल करना होगा नामकरण के नियमों को बदलने के लिए संस्करणःस्थित को बदलना एक और विकल्प है।

How do I use Selenium to verify the value in a form row? -

I have an HTML-based data entry form that submits data to a server. Before submissions, the row of a form called 'Reconcumber' must be blank; After submission (on server loaded with test data) that row should display '1' value. How can I use Selenium to verify this result? I have thought how to record step with Selenium, but can not understand the verification bit. Thank you. Something like this for Selenium IDE and then the Java for Selenium RC, which must be used Verify Accels ("", Selenium.Gate Value ("Reconcumber") ); Selenium.click ("submitButton"); ("Seconds" = 60) failed ("timeout"); try {if ("1" .equals (selenium.getValue ("RecordNumber")) for breaks (for int second =;; seconds ++) ;} Catch (exception e) {} Thread.sleep (1000);}

tortoisesvn - Tortoise SVN deleted folders keep coming back -

I have many projects in my property that are no longer necessary. I removed them from the repository - It seems that they are being removed from SVN control because relevant icons were moved in Windows Explorer and folders now show up as standard Windows folders. Then I removed items from the hard disk. Imagine my surprise when I went to the next day folder, then return all deleted folders. So I removed them again - and they came back. None of them are showing under source control. What am I doing wrong ?? To check using the repository browser to see if those folders are actually deleted in the repository. But I think they are not. Most likely you've removed the folders in your Explorer. You must use the "Delete" command from the TSVN menu and then delete it to remove folders from version control.

Selenium Dom values are not updated -

I see a problem with IE 6/8 in Selenium, giving me some bad times. After that task, the DOM window properties are not updated and always return the default values. To give you some examples: The browser launches in the first normal size ( document.body.clientHeight = 500px ) has gone. After maximizing the window, property 500px Scroll off the top offset ( document.body.scrollop ) resumes In 0 , I scroll when I am using the property, it is 0 Has anyone seen this problem before or can know what is the reason? To access the window and document objects in the Selenium test, you must this.browserbot.getUserWindow ( ) is inserted. This gives you access to the page that is working on Selenium. int offset = Convert.ToInt32 (selenium.gate Evil ("this.browserbot.getUserWindow (.. Document.body.scrollTop"));

c++ - Vista-Eclipse (Galileo) CDT w/ MinGW and MinGW's GDB fails to output cerr output -

I have eclipse and I can get G + to correctly compile the code; However, by the time I start the debugger, none of the "Ser + +" output is ever displayed in Eclipse Console. I have tried to manually run GDB and it also does not display the SER output. Is anyone else experiencing this?? I'm running GDB 5.3-something that is available with Mingu. I think the new version of GDB is available with version VIII on Vista vista or something like this project .

Run Server Application in Client Browser -

I am working with a relatively small and simple desktop application whose product feeds in a large web application on which I am working. I originally wanted to duplicate the desktop app in my web app so that the end user does not need a locally installed desktop app. Now I know that this will not be possible. So, if I wanted to install this desktop application on my desktop, then any client browser can run this app like Sircrix or like a choice. The desktop app has a variety of forms, and I would like to reach them on the client. I have a great independence with the server, and are still in the design phase, so welcome any and all suggestions. You can use Java, which will allow the user to control remote servers.

How to view Firefox functions running in a console? -

I'm currently learning how to become a proper developer for Firefox extensions. I have two questions: How to view the XML request for Firefox? How can I dump / trace from Firefox, what are the functions that run in the Firefox extension? Because I want to know which function is being called, and want to see my error message ..

linux - GTKMM on RHEL3? -

मैं एक Red Hat Enterprise Linux 3 पर जीटीकेएमएम कैसे स्थापित कर सकता हूँ? डेग वियर्स में EL3 के लिए है हालांकि हाल ही में कुछ भी अपेक्षा न करें।

asp.net - Sessionstate server (webfarm) environment, user sessions get mixed up -

I have a strange problem let me describe my situation first: WebServer 01 ( Web application, SQL, sessionstate service) Webserver 02 (webplugging) The load is balanced using both the webserver NLB. Now the problem comes in many, many users are logged in, much more relevant, how do some sessions get a completely different user than we have seen? We have received a phone call from one of our clients, and saying that they suddenly get access to other customers' profiles .. !! To eliminate the end of the session, we can take Webserver02 offline and disable session session and can put inproc But my main question is that I have noticed that the time for different dates of both the webservers! The difference is just a few minutes, sloppy, but true. Can this mix of user sessions also be mixed? P> I have had a similar situation in my situation In a developer (I did not honestly) had created a single static database connection in our data access layer, due to whic...

java - Use of static init block -

I know how a static init block works. Can anyone tell me some common uses of this? When you want to start one or more static variables in one place This is useful, because you can apply exception handling, which is not possible with in-line initialization. For example: Public Static Image Default Icon = ImageIO.read (..); can be started with public static imaging default Inc.; Static {try {defaultIcon = ImageIO.read (..); } Hold (IOException pre) {System.out.println ("no default icon is available"); }} Another application is a complex preliminary For example, if more than one line of code is needed to start an item, assume that you have a configuration: Public Static Configuration Configuration; Stable {confuguration = new configuration (); Configuration.setSomething (..); Configuration.setSomethingElse (..); ...} The third use is to start some external API infrastructure. An example from my current project: Fixed {org.apache.xml .security.in...

c# - Custom Pagination Vs Default pagination in a gridview -

मेरे पास pagination के बारे में gridview से संबंधित प्रश्न हैं .. शुरुआत के रूप में मैंने अपने सभी gridviews के लिए डिफ़ॉल्ट पृष्ठ पर अंक लगाना का उपयोग किया। .. प्रदर्शन पर कुछ लेखों को जांचने के बाद वे सभी कस्टम पृष्ठ पर अंक लगते हैं .. । क्या यह एक ग्रिडव्यू के डिफ़ॉल्ट पृष्ठांकन का उपयोग करने के लिए बुरा व्यवहार है ? कब ग्रिडव्यू आप जो विधि का उपयोग करते हैं, इसके बावजूद, पृष्ठ पर अंक लगाना एसक्यूएल सर्वर द्वारा किया जाना चाहिए। पहले एसक्यूएल सर्वर के लिए प्रोफाइलर संलग्न करें फिर पृष्ठ पर अंक लगाना का उपयोग कर नेविगेट करें। प्रश्नों का निरीक्षण करें अगर स्क्रीन पर दिखाए गए रिकॉर्ड की संख्या आपके द्वारा गलत तरीके से कर रही है, तो इससे अधिक संख्या में रिकॉर्ड्स प्राप्त की जाती हैं। कस्टम पृष्ठ पर अंकुश लगाने से आपको एसक्यूएल प्रश्नों को केवल उसी रिकॉर्ड को प्राप्त करने की अनुमति मिल जाती है जो ग्रिडव्यू ।

JavaScript inline events syntax -

Is there any reason to use one of the following reasons for other reasons: & Lt; Input type = "button" value = "b1" onclic = "management (click)" /> & Lt; Input type = "button" value = "b2" onclick = "manageClick (this);" / & Gt; & Lt; Input type = "button" value = "b2" onclick = "management (click); return back;" / & Gt; & Lt; Input type = "button" value = "b3" onclick = "return management (this);" / & Gt; & Lt; Input type = "button" value = "b4" onclick = "javascript: click return management (this);" / & Gt; And please do not give me your valuable time to tell me to use jQuery or attachEvent / addEventListener . This is not really the purpose of my question. There is no difference between the first two, in this specific position Semicolon is optional. Any third will stop any d...

XML usage for c++ application -

I have a few questions about XML. Using a text file instead of the XML can be used for the general C ++ application? If so, then what are the advantages of this method? And finally, how can I use XML to store data? What equipment is needed? Regards You can use XML to store information - It is less readable than a text file, but more easily can be transmitted with other systems and coding languages. If you have some text / numerical properties, paste it on a property file if you need a combination of configuration options Is, and you use than xml (Can be completed using XML schema), want to communicate easily with automated modification (such as XSL Transformation) or web services. If you want to store binary data, then XML may not be the answer though You can store it in a file system and use XML for metadata (i.e. where each file is located). Take a look at the C ++ XML code for Apache Xerces-C -

CPU usage reachs 100% while inserting contacts in Outlook using C#? -

This question concerns me. No one can suggest any way to do it next to the OOM () or Microsoft Outlook Object Library 12.0, so I have finished using OOM. When I try to record 1000, my CPU usage goes up to 100% I am closing the contact, do I have to settle or close anything else? In addition, if my program is running and Outlook is open, if any person closes Outlook then the program errors are out. I do not know how I was able to solve it using the following 2 lines, but solve it Done GC VATFFFFFANIZER (); Gc Compiler (); Regards Mohit Thakal

slideToggle issue in jQuery -

I have a table with thousands of records (div element). Each Div click is enabled and when I click on each record, a divide slide under the clicked divide appears using the toggle. Because the number of records is too much, the effect of the slidestag is not desired. The desired one just shows the div instead of the sliding. I have the following event handler code $ ("div.opendiv"). Click (function () {var Openelem = $ (this) .next (); openelem.slideToggle ();}); I do not want to divide these records into pages. Can I do that the slidetag effect will be smooth? Thanks Since you are toggling an element between thousands, All browsers will see this interval something else compared to others, it is related to memory usage by browser and version, but it is also related to user machine. Obviously, better machines can manipulate more DOM elements. So, to help you, I made a bela with a workbook: The idea is: If the size of the parents is fixed, hair sli...

c# - How do I display an MFC control in a windows forms application? -

I want to create a window form control which CIPAddressCtrl is a working text property and TextChanged With the event. How do I view MFC control in a windows form? If necessary, I'm happy to use C ++ / CLI. Note: I'm not asking how to control a new window form; I want to host legacy control in one of the windows forms. Offers a solution that will wrap your MFC control. The control override has been used by its suburban windows: OnHandleCreated the rest of the code, the properties of MFC control are manually wrapped with .NET properties.

ruby on rails - updating wrong value to database -

I'm just trying to increase the record starting in 1 in 2000, when a new record is created On click. Functions to create a record: If resource_model == student then @ource.testing_id = id + 2000 end So if the record has an ID of 1, then I think That would be test_id 2001. But instead 2147483647 (maximum mysql limit?) How to find out if there is any suggestion? Thank you. You can not find the record id while creating the id after the recording of the database Knows. You can not relay the id to give values ​​like 1, 2, 3 ... and so on. You can get the next testing_id by something like this: if resource_model == student then @ Resource.testing_id = Student.first (: order = & gt; "Test_id DESC"). Test_id + 1 end But if two processes get the same value at the same time, then you will have a duplicate test_id

c# - Simple Delegate (delegate) vs. Multicast delegates -

I have gone through several articles, but I am still not clear about the difference of general representatives who Generally create and multicast representatives. Public representative Zero MyMethodHandler (object sender); MyMethodHandler handler = New MyMethodHandler (Method1); Handler + = Method 2; Handler (someObject); The above representative MyMethodHandler will call these two methods, now where the multicast representatives come in. I have read that they can call many ways but I am afraid my basic understanding about the representatives is not correct. It tells very well: Representative Del ( String s); Class Test Class {Static Zero Halo (String) {System.Console.WriteLine ("Hello, {0}!", S); } Steady zero goodbye (strings) {System.Console.WriteLine ("Bye, {0}!", S); } Fixed Zero Main () {Del A, B, C, D; // rep refers to an object / method hello: a = hello; // Build the representative object b, reference / method method: b = bye; // Two reps, ...

encryption - PHP crypt and salt - more clarification please -

I went yesterday and I really got a very good answer. Whatever I took and what I mixed, I took it, which I think would be a very safe algorithm. I'm having trouble using a bluffish with a loop generating loop. I am using base 64 characters and I am using a loop to get a random string. I want to take this generated string and insert it as a salt in crypt function. Because the documentation about bluffs is very rare and PHP docs do not really mention it, I'm stuck in the dark here. The odd thing is that if you run this code now, then it will fail no . Remove the crystal function from or to either with '$ 2a $ 07 $' and it will return an encrypted string from intestine . My understanding of bluffish is that the encrypted string starts with should '$ 2a $ 07 $' and ends in "$", so the inclusion in the crypt function. I really do not need a start string for loop and just wanted to get rid of it. I would like to clarify the best practice ...

How to initialize a QT thread in python -

As seen in the online view, I have created a worker thread to run my GUI I'm looking for a thread, whereas a thread executes my code worker thread is defined as: class worker (quetect) : Def __init __ (self, original = none): QThread .__ init __ (self, guardian) self.exiting = false self.size = QSize (0, 0) def __del __ (self): self.exiting = true Self.wait () B Electricity is easy to me window in the class, I __ init __ function: self.thread = Worker () This line . However, I do not do anything with that self. What am I doing with it? It seems that the other threading system is not kept as well .. me Looks like you are looking for examples? But that example does "do something later with that thread" - it sends code a code when it starts and ends, hooks the way to answer the signs , class worker it triggers a method to pull random stars etc, etc. Not sure how do you feel that this is "excluded"?

asp.net mvc - how to render a full view using Ajax.BeginForm -

I have a partial view in which an Ajax. There is a form in which an UpdateTargetID is set when the validation on the form fails, the update target ID is replaced with verification errors, but when there are no verification errors, users should be redirected to the new page. Code in my partial view & lt; Div id = "div_UID" & gt; & Lt;% (Ajax.BeginForm ("FindChildByUID", new AjaxOptions {UpdateTargetId = "div_UID"}})) {%> & Lt; P & gt; & Lt; Label & gt; UID: & lt; / Labels & gt; & Lt;% = Html.TextBox ("UID")% & gt; & Lt; / P & gt; & Lt; Input type = "submit" value = "continue" /> & Lt;%}% & gt; & Lt; / Div & gt; & Lt; / Pre & gt; The code in my controller is as follows: [AcceptVerbs] (HTVBrbs.post) Public Action Result FindChildByUID {student student} {student matching Student = _Student Service FindChildByUID (student.UID); If (ma...

cocoa - warning on nsbundle bundlepath -

I have to get the executable path of my bundle. (I want to get the path, so I can load images in NSImageView) I have found this. NSString * _Ruta_APP = [[NSString alloc] init]; _ Ruta_APP = [[NSBundle main bundle] bundle]; But the compiler says / ControlPP M: 33xx / ControlApp. M: 33: Warning: The local declaration of '_ Ruta_APP' hides the frequency variable but can not I use the value of _Ruta_APP ? If you really want to put the path in an example variable, just kill the first line You do not need to declare an example variable in the method. You should then maintain the instance variable object: [_Ruta_APP autorelease]; _ Ruta_APP = [[Copy the NSBundle main bundle] bundle]];

css - jQuery - jCarouselLite - Images are not showing up -

I've included jCarouselLite with the site already working, though PREV and next buttons appear, but No image Image links are correct. Any thoughts? jQUERY: & lt; Script type = "text / javascript" & gt; // jCarouselLite $ (function () {$ (".l slider"). JCarouselLite ({btnNext: ".nxt", btnPrev: ".prev", view: 4});}); & Lt; / Script & gt; HTML: & lt; Div id = "list" & gt; & Lt; Div class = "prev" & gt; & Lt; Img src = "image / prev.jpg" alt = "prev" /> & Lt; / Div & gt; & Lt; Div class = "slider" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" headline = "title1" & gt; & Lt; Img src = "picture / archive_item_mag.jpg" alt = "image1" class = "captive" /> gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A ...

not able to get any results or printout while fetching attribute from xml node using dom object in php -

यहाँ ticketcity.xml फ़ाइल का एक उदाहरण IM का उपयोग कर रहा है: & lt; घटनाक्रम संस्करण = "3.0" विधि = "GetEvents" स्थितिकोठ = "0" स्थिति संदेश = "सफलता" & gt; - & lt; इवेंट आईडी = "569402" नाम = "हेअर" सीटिंगचार्ट = "http://www.ticketcity.com/images/seatingcharts/MARTINBECK_THEATRE_NYC.GIF" पृष्ठ = "http://www.ticketcity.com/theatre- टिकट / ब्रॉडवे-टिकट / हेयर-टिकट / हेयर-टिकट-अल-हिर्स्फेल्ड-थिएटर-फरवरी-3-200pm.html "इवेंटडेटटाईम =" 02/03/2010 2:00 पीएम "& gt; & Lt; कलाकार आईडी = "463" नाम = "बाल" प्राथमिक = "सच" / & gt; - & lt; स्थान आईडी = "961" नाम = "अल हिर्स्फेल्ड थियेटर" & gt; & Lt; सिटी आईडी = "36469" नाम = "न्यूयॉर्क" / & gt; & Lt; राज्य आईडी = "34" एबब्र = "NY" नाम = "न्यूयॉर्क" / & gt; & Lt; देश आईडी = "1" एबब्र = "यूए...

python - How do I do "or" in Django template code? -

{% if_loggedin या is_anonymous%} परीक्षण संदेश {% endif%} {% if_loggedin या is_anonymous%} परीक्षण संदेश {% endif%} उस तरह।

Elegant Log Window in WinForms C# -

I'm looking for ideas in an effective way to apply a log window to windows applications I am In the past I have used many textbox and rich textbox but I am still not completely satisfied with the functionality. This log is intended to provide users with the latest history of various events, mainly used in data-gathering applications where one can be curious that one How to complete special transactions In this case, the logs do not need to be permanently saved in the file. First of all, some proposed requirements: Efficient and fast; If hundreds of lines are written immediately to log in succession, then it needs to consume minimal resources and time. Be able to offer a variable scrollback of 2000 lines or so, now nothing is unnecessary. Highlighting and color are preferred Font effects are not required. Trim the lines to reach the scrollback limit automatically. Scroll down when new data is added automatically. Bonus but not required: Pause Auto-scrolling du...

How to set up gdb watchpoints in a program consisting of many files in C++? -

I am trying to establish a clock to monitor variables in a package containing many C ++ files. There are several files abc.cpp qwe.cpp .. xyz.cpp and so on I have a variable 'temporary' in some function qwerty () Want to monitor the file abc.cpp How do I set the clock's position? I tried clock abc.cpp :: temp watch abc.cpp: temp clock temp but I do not see errors' abc.cpp: : Temp ',' abc.cpp: temp ',' temp 'Not in the current context, a notification clock point also tells me that no watchpoints are set. Note that I can successfully set a breakpoint for the same variable I always set breakpoint in the function When I press it, then set up the alert point so that I am in context, then remove the breakpoint as much as possible.

java - Problem counting in Map<String, Integer> -

I asked about calculating the number of words in the orerelists: ACU ACU ACU AC AC AGC Then we will meet 4 for ACU, AC AC will get 2, AAR will get us 3, AGC will get 1. I have got some help but I can not work on it. Darren gave me a very important answer: Maps & lt; String, integer & gt; WordCount = New Hashmap & lt; String, int & gt; (); (String Seek: Your Wordlist) {wordCount.put (seq, wordCount.get (seq ++)); } but part wordCount.put (seq, wordCount.get (seq ++)); I get an error that can not be changed from string to int. I tried to modify the code to work but I am getting the wrong numbers ACU 0 ACU 1 ACU 1 ACU 1 ACY 1 ACY 2 AER 2 AER 3 AER 3 int value = 0; Maps & lt; String, integer & gt; Word = count = new hashmap & lt; String, integer & gt; (); (String Seek: Waldlist) {Set & lt; String & gt; Set = wordCount.keySet (); Value = set. Size (); WordCount.put (seq, value)); } Please help me on this one. Thanks to all...