Posts

Showing posts from July, 2010

jquery - find a pattern anywhere in a string? -

When it comes to selectors and patterns, I still get a bit confused ... Actually, I parents I'm trying to find an input item's div and if a string gets anywhere in its ID, then I want to set it to be displayed to anyone I did this by doing something like First done: if ($ ('div [id * = string]')) {$ (this) attr ('display', 'any'); } But, I'm not sure how to do that for a variable? As far as I have found, and then I get stuck ... $ ('input.rclass'). Each (function () {var myDiv = $ (this) .Parent (). Parent (); if ($ (myDiv ...}); markup looks like this = "Editgci [0] [fua] [value]" class => for "Option" & gt; input type = "radio" class = "arxas" value = "" name = "edit [0] [fua] [value]" id = "editgci-0-value-string- Idnum "& gt; N / A & lt; / label> & lt; / div & gt; attr is used for the "text"> setting...

ruby on rails - How do I check to see if my array includes an object? -

I have an array @hors = [] which fills me with some random horses. How can I check that my @horse array includes a horse which is already present (present)? I tried to do something like this: @ suggested_hors = [] @ suggested_hours & lt; & Lt; Horse.find (: First ,: offset => Rand (Horse Quarter)) while @ suggested_horses.length & lt; 8 horses = horses. Search (: first ,: offset = & gt; rand (Horse Cuba)) until @ suggested_horses.exists? (MAR.ID) @ Get Recommended & lt; & Lt; End of the horse end I also tried to include ? But I noticed that this was only for string. Is present? I get the following error: Undefined method 'exists?' # for; Hey: 0xc11c0b8 & gt; So the question is how can I check that my array already contains a "horse" so that I can not fill it with the same horse? Ruby does not have an array exists? Method. And they've got the method to do something like as long as @ suggested_horse...

asp.net - IE 8 and the UPS Thermal Printer ActiveX Control -

There is no solution to print UPS labels from custom web pages (not UPS testing site) UPS thermal printer ? In Firefox and Chrome it will print two labels at one time, but in IE 8 I can not print it using the tag or I have the type set on "application / epl2", but it is not working. If I return the label as a document with an Apple Extension and connect the Explorer with Internet Explorer then this label will print, but this is not clearly an ideal solution because its Requires a lot from the user side Do anyone have experience with that which can help? I really appreciate any pointers to do this thing.

sqlalchemy in a single python script file -

I have read about using sqlalchemywith under the pylons framework. If I need this then how will things work for a simple script file? I am like an importer who is spidding a site and I want to save in mysql. If any one is in the file, then am I still using Sqlalchemy? How do I set up my model / mapping? If things are in the same file, can I still use the Skelechmy? Yes, SQLLime does not impose any restrictions on how you use it You can see examples here on single-script initiality:

web applications - How to build a program, where I can update data and get the corresponding data updated automatically? -

I'm interested in making a start-up website which is a program that will allow me to update a daily data base That will change the estimated values. For example, if I want to rank top ten family vacation sites, or public golf courses, or investment firms etc ... for a particular state. Each item will receive a value based on the classification of norms. What I want to be able to do, it has the ability to make changes and the results are immediately reflected, for example, if ranking golf course had a condition of one of the criteria and present them in the course at the third place at present Green was conditioned. I want to gain the ability to change benchmark ranking which will change the overall value and will probably rank. My guess is that my query is in relation to a basic program Is this a program I can download and work on developing myself? It seems that you will need a database that you are looking for, and a server that Allows you to develop in a server-enab...

visual studio 2010 - What is causing Thread Contentions with my Azure Queue code? -

I just ran a Visual Studio 2010 Thread Profiler against my Azer code and saw that I got a lot of controversy, my code was running More often than is blocked! There is no custom threading argument in my worker. This is a simple while loop that asks different queues if they have work. I make an example of QueueRepositoryClass and then I invite the GetQuueueMessage function. It seems that for some reason many threads are killing my GetQueueMessage method and are using the same Qi client instance. Maybe it's a result of me rusing the CloudStorageAccount object? Or is this the CreateCloudQueueClient extension method? This is partly speculative, without seeing the calling code, but it will appear that you receive GetMessage () Are calling in a tight loop. GetMessage is a synchronous call, by doing so waiting for a response from the queue (continuing to run other threads) that specific thread will be blocked automatically in a profiler, this is actually a bad b / c rest loop ...

flex - AdvancedDataGrid - disable the header rollover and selection color -

I used a datagrid before and fixed the issue while overriding that issue, but now I have an advanced data grid And ' in your CSS file: AdvancedDataGrid {/ * or stylename that you are using for ADG * / / * * other styles / headerStyleName: "myHeaderStyle"; / * Other styles *.}. MyHeaderStyle {up-skin: embed (source = "myADGHeaderSkin.swf", symbol = "upskrine"); Hyper-skin: embed (source = "myADGHeaderSkin.swf", symbol = "upscin"); Selected skin: embed (source = "myADGHeaderSkin.swf", symbol = "upscin"); } In whatever situation you want to use the same skin as the skin up.

php - how to get live results with jquery? -

I do separate queries with php and jquery and get results with .jax () when all The question comes back to their values ​​what I want to do, as soon as they are ready to get those values. Now the user has to wait for all the questions, but the first query gives the value 30 seconds before the second value, so I should not wait to see all the results once the user wants me to see the results. Just return results for how can I do this? If you are waiting for several database queries to return, Increase in many AJAX calls In other words, 2 AJAX requests, one for the first query and the second for the second query (which is the value of 30 seconds after the first time). This way you can return the first query back to the page and display it - or whatever should be done - while waiting for any additional AJAX call Of course you can increase this technique as additional AJAX requests.

networking - How to get a list of IP connected in same network (subnet) using Java -

How do I get an IP address list for devices connected to my own subnet using Java? This should work when the host ICMP on your network (ping) (> JDK5) Give Feedback: Public Zero Checking Host (String Subnet) {Int Timeout = 1000; For (Int i = 1; I Call the method for a subnet (1 9-2.168.0.1-254) like this: checkhost ("192.168. 0 "); did not test it, but doing something like this should be done. Obviously it only checks the 254 hosts in the previous byte of the IP address ... Check: Hope that help

php - Problem with sprintf error when using S3->copyObject() and filenames with % in them -

I am using PHP S3.PHP class to manage files on Amazon S3. I use the copyObject () function to copy files in my S3 bucket until I complete the filenames, do all the good work, which requires urlencoded (I urlencode everything anyway) is. For example - file name 63037_Copy% 287% 29ofDSC_1337.JPG throws the following error when passed to copyObject () when a file name ends with% characters copyObject () function dummy spits for example - - Warning: sprintf () [& lt; A href = 'function.sprintf' & gt; Function.sprintf & lt; / A & gt;]: line 477 Here is the copyObject function in line 477 public Fixed function copyObject ($ srcBucket, $ srcUri, $ bucket, $ uri, $ ACL = self :: ACL_PRIVATE, $ metaHeaders = array (), $ requestHeaders = array ()) {$ rest = new S3Request ('PUT', $ Bucket, $ Yuri); $ Remainder- & gt; Set header ('content-length', 0); Foreach ($ requestHeaders $ h = & gt; $ v) $ rest- & gt; Set header ($ h, $ v); F...

ruby - Change Rails Scaffold Naming Scheme -

I am a happy user of ROR but there is a complaint. When I generate scripts / scaffolds it automatically generates all my files and places them in their proper folder. However, all the different scaffolds I have created are their views the same files I have a bunch of index.html.arb view files and when I have to open them in my text editor, it is difficult to say I want to designate the path command's default naming scheme to name the individual files in the name of their view folder. Therefore, instead of index.html.erb, use index.home.html. Is there any way to do this, or am I stuck? Solving many files with the problem of the same name Have you been searching for developers? Thank you! You are going down the road to fight the railing conventions and when you work against it So the rail works best. One of the main parts of the train's philosophy is that there is a set of conventions once taught that makes it easier to find their way around any rail applicatio...

MATLAB: How can I use a variables value in another variables name? -

I'm thinking this is possible. My code looks like this: indexStop = find (firstinSeq (x, 4) ~ = ... littledataPassed (y: length (littledataPassed), 4), 1, 'first') ; For Z = 0: (n-1) index process = search ((Lititatappassed (y: y + indexStop-1,6) == 1 & amp; ... Litatatap (y: y + indexStop-1,2 ) == firstinSeq (X, 2) & amp; ... Litaladapted (y: y + indexSet-1.5) == z), 1, 'first'); If imprim (index process) msglength [n] (countangaleeng [n], :) = [first six (x, :) [0] 0]]; And msglength [n] (countmsgLength [n], :) = [firstinSeq (x, :) ... littledataPassed (y + indexing process-1, :)]; End count [n] = counting gal [n] + 1; End I think that [n] can be switched to the actual value of n , expected to be everywhere As I use it to add data to nine different variables in format msgLength # . I have tried to find a tutorial and not what I have not seen anything on the subject. This is almost always, for example, you have a1 , A2 , a3 , it is be...

c# - Strange Problem with a .NET Windows Service -

I have two Windows services written in C # after the same pattern and method. Both services were tested against Windows 7 VM and QA which was tested on Windows Server 2008 VM. Both services have been installed and uninstalled under this testing environment many times, however, one of these two services has been refused to launch production environment (Windows Server 2008) . The use of InstallUtil.exe with ServiceInstaller and ServiceProcessInstaller component is connected to the service. From all the attendees, the unsuccessful service is established successfully InstallUtil.exe reports success and the service appears in the service snapin. You can locate the service in the registry under HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Blah Blah. However, if you try to start the service, you receive the following: Pure start blah.blah.exe "The service name is invalid." ... or service snapin ... "Windows could not start the" Blah Blah ...

.net - Making a DLL COM accessible -

I have a class library written on the net. I think I want to make available for VB6 / VBA I am What I tried was not working (obviously I am asking this question) What have I done here: I created a class library project in Visual Studio 2010 Express and the code Put in the class module. I opened the project property and went to "Assembly Information" and checked "vs. com view" I have the "Advanced Compilation" option and Targeted Net 2.0 (this Very easy code) was gone. I then removed all the references for "system". I did not create the project (no alerts or errors) and copied DLF from bin folder to C: \ Windows \ System32 \ RegSvr32 to register DLS Gone and got the error: The module "MyDll.dll" was loaded, but the entry point DLLRegisterServer was not found. Ensure that "MyDll.dll is a valid DLL or OCX file and try again. Clearly my first attempt was a little naive. ?

javascript - How to setup visitor variables in Google Analytics -

How to use visitor level variables is not enough, do I need to determine whether the visitor is returning the visitor or Am I just using the _SetCustomVar method as if I would have a page or session variable? Google Analytics will determine if there is only one visitor based on the presence of a person's cookies or No. Therefore, GA is able to differentiate visitors (i.e., same computer, browser similar to previous visits without deleting cookies), custom variables will continue to set the fourth parameter (area) to 1 You need all to set a variable for 'Visitors'. Just make sure to set custom variables before your page - view calls, otherwise custom variable data is not sent to Google

Can a semantic web Ontology have the same expressivity but a different profile? -

I am analyzing some plays with tablet logic, but I am getting some strange results. When I execute the "bullet information" method on a sheet, and compare the OLL profile to DL Expressivity, sometimes I find facts that have different expressions similar profiles. It seems that it is at least commendable, but still I am searching differently along with the same personality as well as various OWL profiles. How is this possible, because the profile is a mark of personality expression and mitigation in the first place? If you want to compare autologi based on OOL L2 (based on) in general Are considering, for example, a profile that is sub-language such as O-L-L (based), it is estimated that one can be similar to ontology if you have full OWL2 with 'profiles' and Personality DL-Express to consider, SROIQ uses EL ++. However, if profile you mean strictly one of three separate ones; , And, however, it is possible that two people with different OWL 2 profiles ...

codeigniter - Default Controller not loading after rerouting -

I have a codeigniter multistie installed where I have code that I can serve sites with such links Site.com/sites/sitename/controller/function/vars site.com/controller/function/vars/ subdom.site.com/controller/function/vars The challenge is that, in routing $ route [sites /([^/]+)/(.*) '] =' $ 2 '; $ Route ['default_controller'] = "content"; I am working like a link site.com/sites/sitename/controller/function/vars site.com/controller/function/vars When I go to www.site.com/sites/sitename/ , the default controller is not loading. I created Config.php so that the link structure is related to when I site.com/sites/sitename/controller/function/vars link Go $ config ['base_url'] = "http://site.com/sites/sitename"; If I go to site.com/controller/function/vars $ Config ['Base_url'] = "http://site.com/"; The default controller for the second case is fully loaded for the subtitle case / ...

c# - How to configure WCF with transport security behind a load balancer -

I have a WCF service which will be configured to use transport protection with a certificate. Service load will sit behind Balancer (F5). The service will be loaded on the certificate load balancer, which will end the SSL session. I understand how to configure it - my question is whether I am able to authenticate the client using client certificates or not. Is it possible, or do I have to choose between client certification authentication or load balance? See this article that covers this special scenario:

jQuery Regular Expression Problem -

Iam एक jquery पुस्तकालय का उपयोग कर जो फाइल में json प्रारूप में नियमित अभिव्यक्ति लेता है और फाइल से मान्य करने की कोशिश करता है "छात्र संख्या": {regex: "/ ^ [- / @ # और $ * \ w \ s] + $ /", चेतावनी टेक्स्ट: "* अमान्य विद्यार्थी संख्या"}, // .. । मैं इसे अपने टेक्स्ट बॉक्स फ़ील्ड में निम्नानुसार उपयोग कर सकता हूं & lt; इनपुट प्रकार = "टेक्स्ट" वर्ग = "मान्य [आवश्यक, कस्टम [ छात्र संख्या]] टेक्स्टबॉक्स "& gt; इससे पहले मुझे फ़ील्ड के लिए जावास्क्रिप्ट रेगुलर एक्सप्रेशन था, जैसे कि & lt; input type = "text" मान्य = "regex" regex = '^ [- / @ # और amp; $ * \ w \ s] + $' name = "sno" id = "sno" & gt; मैं jquery के लिए जावास्क्रिप्ट में उपयोग किया जाता है कि एक ही नियमित अभिव्यक्ति का उपयोग करते हैं। यह जावास्क्रिप्ट में उसी के रूप में वैध नहीं है और अनुचित परिणाम दे रहा है। दोनों के बीच अंतर क्या है? चूंकि एक स्ट्रिंग में बैकस्पेस का उपयोग करना है, और...

unit testing - Database interaction code -

I am writing a small application that works with a database and how can I check this interaction. My application depends on 5 stored procedures, which I have decided to incubate in one class. This class offers 5 public methods that execute processes and, if necessary, converts the results into an object collection. I really can not understand how to test my code in a simple way and I think that I probably made some mistakes. What do you think about my design? Is there a better way to handle these matters? Thank you very much for your help EDIT: There are only "Insert" and "Selection" questions in my stored procedures. Generally, I recommend for testing things against a live database for some reasons: > SQL can execute your tests may take a long time Data may change under your nose, resulting in broken test not even a visible code change You can. You want your tests to be different and deterministic, so they pass or fail, when your code changes...

iphone - Creating .sqlite file from Core Data store? -

I have seen tutorials on books and websites that have .sqlite files to download. SQL data is used for core data > If you are going to create a pre-populated sqlite file to use with core data then You must want to create a basic desktop application for data entry with core data to make it comparable and use it to use that file, and then in your iOS device M Make bread. Do not attempt to duplicate or duplicate the data structure in the file by hand. You can work on this but you will spend more time working on it and it is finally failing. Internal structure of core data SQLite file should be treated like a private API. The structure is not public and can change without notice.

whats the difference between these methods of defining arrays in javascript? -

संभव डुप्लिकेट: जावास्क्रिप्ट में एक सरणी को परिभाषित करने के इन दो तरीकों के बीच अंतर क्या है? var arrayList = [] और var सरणीलेस्टअगैन = नया अर्रे (); एक अच्छा है और दूसरा बुरा है: -) गंभीरता से नहीं, पहला रास्ता छोटा है (तार पर भेजे गए कम बाइट्स) और इसमें कोई भी अजीब संभावित समस्या नहीं है दूसरा, हालांकि, ठीक काम करेगा। यह > नए सरणी () के साथ अजीब भाग है: यदि आप एक संख्यात्मक पैरामीटर को पास करते हैं निर्माता, इसका अर्थ "सरणी को इनिशियलाइज़ करना है ताकि वहां खाली ( null ) सरणी तत्वों की दी गई संख्या हो, और इसलिए कि लंबाई दी गई संख्या के बराबर है । " (अच्छी तरह से यह एक पूर्णांक होना चाहिए, मुझे वास्तव में लगता है।) यदि आप एक एकल-संख्या, या दो या दो से अधिक संख्याएं पास करते हैं, तो इसका मतलब है, "सरणी को आरम्भ करें ताकि इसकी सामग्री इस तर्क को प्रतिबिंबित करे सूची। " ठीक है अब मैंने कहा था कि यह एक अजीब हिस्सा था, और यह है: यदि आप किसी प्रकार की सर्वर साइड फ़्रेमवर्क का उपयोग कर रहे हैं, और आप संख्यात्मक मानों की एक सरणी ...

mysql - How can I add other columns from a foreign table in the sql? -

मेरे पास यह एसक्यूएल है: SELECT` feed_entries । * से `feed_entries` जहां में आईडी (चयन` ई````` से `feed_entries` के रूप में` ई 'में शामिल करें' फीड्स 'के रूप में `एफ` पर ई.फीड_आईडी = एफ.आईडी पर शामिल करें प्रविष्टियां प्रविष्ट करें' वर्गीकरण 'के रूप में `चालू ई .entry_id = e.id इन श्रेणी में 'categorias' एसी` c` पर शामिल करें ec.categoria_id = c.id WHERE e.deleted = 0 और c.slug IN ('manchete', 'google') ग्रुप द्वारा `ई `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` ` `एफ` .````````````````````````````````````````````````````````````````` / /> मैं यह कैसे कर सकता हूं? इस त्रुटि के बिना: # 1241 - ऑपरेंड में 1 कॉलम होना चाहिए यह काम करना चाहिए: SELECT e1। *, F1.titulo एएस फ़ीडटितुलो, एफ 1.उर्नल एएस फ़ीडयूरल एफआईआर फ़ीड_नेट्री एएस ई 1 जॉइन फीड्स एएस एफ 1 ऑन ई 1। Feed_id = f1.id WHERE f1.id IN (चयन ई.आई.डी. FROM feed_entries के रूप में ई इनर JOIN फ़ीड के रूप में एफ पर e.feed_id = एफ.आईडी इनर प्रविष्टियां प्र...

c# - Is there a way to use LINQ query syntax with .NET 3.0 projects? -

I have a project that can only be deployed on a server running on the net. I want to use LINQ to simplify some strict rational logic very strictly. Is this an easy way to accomplish this? I will compromise for any syntax Thank you very much Since .0.0 All Run 2.0 on 3.5 CLR, all LINQ content is just a bunch of libraries. If you include DLLs on your version of the framework, then it will work fine. As Patrick says, there are main 3.5 DLL systems. Core.Del (which provides system LINQ) and System.Data.Linq.dll (Linq-to-SQL). If you do this, then I think that you need System.dll at least. NET 2.0SP1 I believe. P> LINQBridge, as quoted by Mark, works by re-implementing the functionality, but I believe only for Linq-to-Objects. Another option is to run these DLLs (System.Core.dll and System Data. Linux.dll) mono project. They have all implemented LINQ again, Linq-to-Sql content is probably slightly immature but it has the merit of working with other databases compared t...

uinavigationcontroller - UITableView becomes slow when switching views -

I am working on an app that has a main menu, which then switches to the views of the menu item Which is clicked using the UINAVG controller. Whenever I run my app and click on an item in the menu, this view is a good five seconds before loading. Is it normal or do I have to do it in another way. - (zero) table view: (UITableView *) table view was selected Select Endpace: (NSIndexPath *) indexPath { NSString * Selected Menu Tool = [Menu Option ObjectAutEXx: IndexPath. Cry]; If (selected menu device == @ "trails") {trailsview controller * trails viewer = [[trailsview controller alok] initWithNibName: @ "trailsviewcontroler" bundle: [nsbindal main bundle]]; Trails viewer Selected menu available = selected menu tool; [Self. Navigation Controller Push ViewController: Animated Trailsview Controller: Yes]; [Trailsviewcontroler release]; } If (selected menu option == @ "bike shops") {shopsviewcontroller * shopsview controller = [[Shops scene controller Alo...

sorting array of names in php -

मेरे पास लोगों के नामों की एक सरणी है: अर्रे ([1] = & gt; ए। एटकेन [2] = & gt; एसी स्किनर [3] = & gt; ए चेन [4] = & gt; आर बैक्सटर) सरणी को क्रमबद्ध करने का सबसे तेज़ तरीका क्या है (वर्णानुक्रमिक) php में उपनाम के आदेश? अरा ([1] = & gt; ए। एटकेन [4] = & gt; आर बैक्सटर [3] = & gt; ए चेन [2] = & gt; एसी स्किनर देने के लिए यानी देना ) वहां दिए गए उदाहरण पर एक नज़र डालें और, जो आपके समान है समस्या। आप regexps को प्रतिस्थापित कर सकते हैं preg_replace ("/ [AZ] \।।", "', $ A);

cocoa - I would like to insert token at the insertion point of the cursor, not the end of the array -

I have a button that adds a token to a NSTokenField. At the end of this field always adds token: NSTokenField * currentField = [dispatcher representing object]; // Define which token should be inserted in the field using the sender's tag. Switch to ([sender tag]) {case eFileNameToken_StartDate: [currentField setObjectValue: [[currentField object value] Arraybazing Object: [NSMutableDictionary dictionaryWithObjectsAndKeys: kTokenName_StartDate, kTokenKey_Name, @ "% m-% d-% Y", kTokenKey_Format, [NSNumber number : 0], KTokenKey_FormatIndex, zero]]]; break; Because it is grabbing the array with the currentField objectValue and then creating an array by adding the object. I like to know the insertion point of the cursor and to insert the object in the resulting currentField objectValue, so that I can set the object value of the current field with the correctly ordered token. Thanks for any help yall So I understood it and I thought that ID is my solution . ...

java - Loading classes not present in the classpath -

Assume that I've compiled a Groovy script using Grovik, which has one or more classes in the file system. Files are generated. From the Java application, how do I add those classes to dynamically by loading them and how to call them? The goal is to compile the Groovy script first and store it in the database, so the compilation versions of the scripts can be evaluated. You can create an example of loading new classes from a directory: URL dirUrl = new URL ("file: /" + "path_to_dir" + "/"); // 1 URLClassLoader cl = New URLClassLoader (New URL [] {dirUrl}, getClass (). Class.getClassLoader ()); // 2 class loaded class = cl.loadClass ("com.xyz.MyClass"); MyClass obj = (MyClass) loadedClass.newInstance (); Obj.doSomething (); Line 1 creates that code as URL where. Class files remain. Line 2 creates a new URLClassLoader Example The first argument is an array of URLs to be used as source. You can specify several directory URLs with...

Python: Passing a function name as an argument in a function -

I am trying to pass the function name to another function in the form of argument, but I get an error : "TypeError: 'Str' object is not worth calling" Here is a simple example of the problem: def doIt (a, func, y, z): result = z result = func Return dork1 (arg1, arg2, arg3): thing = (arg1 + arg2) / arg3 return talk def dork2 (arg1, arg2, arg3): object = arg1 + (arg2 / arg3) return Talk about when I call this: Var = 'dork1' ned = doIt (3, var, 4, 9) print (ned) I am getting: traceback ( Most recent call final): File "& lt; pyshell # 9", line 1, & lt; Module & gt; (A, Y, Result) Type: Error: 'str' is not worth the object corner If you want to pass name to the function, as you said and you are doing, of course you can not call it - why a" Will call a name "? It's meaningless. If you want to call it, then pass the function yourself, which is the most powerful no var = 'dork1'...

Add page in the middle of itextsharp -

I am creating a PDF using iTextSharp and after adding all my pages, I add a table of contents I want to be able to initially. Is there a way to "rewind" the PDF driver? var d = new document (pages altitudes); PdfWriter w = PdfWriter.GetInstance (D, new filestream ("test.pdf", FileMode.Create)); D.Open (); (Var i = 0; i & lt; 200; i ++) for {d.Add (New paragraph ("Hola Sener Page:" + w.CurrentPageNumber.ToString ()); } W.GoToPage1; D.Add ("Table of Materials Here"); D.Close (); Is this possible? Not so, after leaving the given page after the author, all for that page Some output is written on the stream. Any page-related links are already embedded. How to create an example or two floating TOC on the web somewhere, see if I can dig one ... > In the above example, they produce the last TOC, and then fold it in front before saving the PDF. Learn something new every day.

c# - Encrypting app.config File -

I have an app.config file that I need to distribute with my application for an ASMX web service Service was created due to reference. This is not a big deal, if this file is modified, but I still want to protect it. I am already checking the hash of config and making sure it is valid, but I still need an extra layer of security. Here I am configured: Can I encrypt or do anything? You can enter & lt; System.serviceModel & gt; - This is a configuration section group, which contains the configuration section. aspnet_regiis will only encrypt the configuration sections - so that you need to encrypt those selected parts, such as: cd: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 aspnet_regiis.exe -pef "system.serviceModel / bindings". Aspnet_regiis.exe -pef "system.serviceModel / services". etc. With it, you can easily encrypt what you need - which is not very important, can be left in clear text. Warning term: Because it is as...

c# - Displaying related, but non-foreign key data in a Silverlight datagrid column -

I have a silverlight application that uses 2 different databases. I have a situation where I have a database There is an ID column in it, and the other is the lookup table in the database. Obviously I can not apply it as a foreign key, and the unit framework will not allow me to create a single data model for two databases, so I Definition of this relationship Injury can not. When I create an ID column from database 1, I would like to display a field from database 2. Ideally I would like to define this relationship and would like to use a compulsive path (and I do not know about my model about my ViewModel) a column to which the combo box likes to Can be bound, for example & lt; Data: DataGridTextColumn header = "project" binding = "{binding path = ProjectId}" itemsource = "{binding path = data source. Projects, source = {static resource view modelprosy}}" displaymemberpath = "projectname" /> Any help or criticism of my appro...

iPhone, How do I rotate an UIImageView around a point using Core Animation and CATransform3D? -

This is what I want to do: (1) (2) | / | / | / | I want to transfer a UIImageView equivalent to the point (2) around the position (2) to the position of a clock pin (width: 9px, height 73px) (/) / (3) My DegreeToRadians defined the macro as follows: Received: #define degreesToRadian (x) (M_PI * (x) / 180.0) / * kmPointer is UIImageView * / NSValue * value = zero; CABasicAnimation * Animation = Zero; CATransform3D conversion; Km Pointer.lier.techpoints = cp pointmake (0, 0); [Kmpointer. Remove LayerAll Animation]; Animation = [with CABasic Animation Animation: @ "Transform"]; Transform = catariform 3dmacrotation (degree trouadian (30), 0.0 f, 0.0 f, 1.0 f); Value = [NSVLite valueWithCatransform3D: Transform]; [Animation Setup: Value]; Transform = cateriform 3dmacrotation (0.0 F, 0.0F, 0.0F, 1.0F); Value = [NSVLite valueWithCatransform3D: Transform]; [Animation setfavalvalue: value]; [Animation setautoorswords: no]; [Animation set duration: 1.0f]; [Change anim...

zend framework - Getting Response Body using Zend_http_Client -

मैं निम्नलिखित कोड के साथ एक REST API को कॉल कर रहा हूं $ client = new Zend_Http_Client (); $ ग्राहक & gt; setMethod (Zend_Http_Client :: पोस्ट); $ ग्राहक & gt; setUri ( 'http://www.example.com/api/type/'); $ Client- & gt; सेटपैमैटरपोस्ट (ऐरे ('useremail' = & gt; '******@********', 'एपीकेआई' = & gt; 'गुप्तकी', 'विवरण' = & gt; 'टेस्ट वेब एपीआई', 'राशि' = & gt; '5000.00')); हालांकि मैं निष्पादन के बाद लौटाए गए हेडर वैल्यू (201) और रिस्पांस बॉडी दोनों को प्राप्त करना चाहूंगा। मैं इसके साथ कैसे आगे बढ़ूं? मैं मान रहा हूँ कि आप वास्तव में हैं अनुरोध के माध्यम से निष्पादित: $ response = $ client- & gt; अनुरोध (); उस बिंदु पर आपको केवल $ प्रतिक्रिया वस्तु में है, // डंप हेडर print_r ($ response-> हेडर); // डंप शरीर प्रतिध्वनि $ प्रतिक्रिया- & gt; getBody (); अधिक तरीकों के लिए Zend_Http_Response डॉक्स को देखें:

tsql - Call a stored procedure that requires parameters without parameters? -

Can I call in a compact process in some way without any advice, even if it is generally advisable? Thank you: -) If you can, the SPRC has the default criteria Rebuild with create prok microk (@ param 1 as INT = 0, absolute 2 AS váarar (20) = '') etc.

sql - Update all column values in a table with a column value of another table (related by a foreign key) -

I'm trying to populate a new column in the table with data in columns of another table. UPDATE dbo.PackageSessionNodes SET Created_By = (dbo.PackageSessions, select dbo.PackageSessionNodes, where dbo.PackageSessions.PackageSessionId = dbo.PackageSessionNodes.PackageSessionId) the update puts fails because re-created more than one value of the subkey I obviously am a SQL Nob, so would appreciate any help. Thx! I think you are looking for this syntax: update dbo.PackageSessionNodes Set_B_B = left dbo.PackageSessionNodes pn from p.userid dbo.PackageSessions p on p.PackageSessionId = pn PackageSessionId I believe that only a PackageSessionNode the Packejaseshn be?

social networking - Implementing Community Moderation -

I am building a social network platform as a forum for web development. I have a few questions about how community control should be implemented properly. Flagging Should it be fully automated? like. If a post has been marked XX times, will it be closed / deleted? I think there are some problems, if by any means the group of users has decided to wreak havoc, can they go to flag everything? Surely there are not many users of the community? A more non-destructive method is hiding the post by default, and users have been clicked to view the flagged posts, until it is removed by trusted moderators. ? By closing / deleting a post I think it should be reserved for reliable intermediaries / administrators? Or can this be a lot of work? How is it implemented in general? Like Forst or Stack Overflow? This is a difficult balance, but the person marking the post in some form of mechanism on the basis of reputation The proper "One size fits all" solution (examp...

openoffice.org - Opening multiple documents in a same window with UNO -

I have a script in Python, which removes data from several Excel files. My problem is that for every file I open a window with url = unohelper.systemPathToFileUrl (os.path.abspath (file_name)) file = desktop And I'll stop. LoadComponentFromURL (url, "_blank", 0, ()) and file.close (True) Is there any way to remove data from files without opening a window? Or at least without opening a new window for each file? Opens a document without displaying it: // Call the bootstrap to get component reference com.sun.star.uno.XComponentContext oComponentContext = null; Try {String oooExeFolder = "C: / Program Files / OpenOffice.org 3 / Program /"; OComponentContext = BootstrapSocketConnector.bootstrap (oooExeFolder); } Hold (com.sun.star.comp.helper.BootstrapException pre) {System.out.println (ex.getMessage ()); } If (oComponentContext! = Null) {com.sun.star.lang.XComponent oComponent; Com.sun.star.sheet.XSpreadsheetDocument Opsdate document; Com.s...

Is it possible to add ajax to the struts2 tags ,textfield or checkbox in jsp page using DOJO ? if yes how? -

Is it possible to add AjJ to struts2 tags, textfield or checkbox in jjp page? If so, then? Or if not, then should I use the library to implement Ajax for a textfield? Take a look at this. There is one for Strauss 2.

initialization - Why does not this work - Android - onCreate() -

The following code does not work, and throws a runtime uppress because of NullPointerException public Increase the activity activity of the category list filter (linear type type = new linearlayout (this); Override public zeros on @Create (bundle saved instanestate) {super.Nocrat (savedinstenstate); ScrollView sv = new ScrollView (this) ; This.setContentView (sv); //this.typeSelector = New linerlayout (this); this.typeSelector.setOrientation (L InearLayout.VERTICAL); sv.addView (this.typeSelector);} When I went to the initialization of the creator () inside the this.typeSelection Great work. @Override Public Zero OnCreate (bundled savedinstenstate) {... this.TypeSelector = new linear line (this); ...} Why is the empty indicator error? As the inline announcement in the first part of the code is called as Constructor, and then the Oktit () has access to the object, right? for linear layout you must pass in an Android lifecycle The object and the Java object is no...

.net - Prevent same value chosen in several dropdown lists -

I have four dropdown lists with the same item / value. When I upload the form, I want to stop at the same price. How can I do this using a custom verifier? Thanks! I will advocate the first solution of the cura to modify the dropdown lists so that the selection of the same value Can not be done, it is always better to stop the problem, tell the user what they did was wrong. However, if you want to use the following code, it will work: & lt; Asp: CustomValidator id = "Dropdown Validation" runtat = "server" onsvvitadet = "dropdownwise validation_servised" error message = "The price can not be selected in more than one drop down." / & Gt; And after that in the code behind, or a script tag. Secure blank dropdown Validation_ServerValidate (Object Sender, ServerValidateEventArgs e) {e.IsValid =! HaveSameValue (Dropdown List 1. Selected Price, Dropdown List 2. Selected Price) & amp; Amp; ! Usage (dropdown list 1. Selected ...

performance - Scheme: Data serializing, efficient [and functional] -

I am serializing data that can be an integer, an object (list) with other nested objects, and keys In the choice of two ways to use the way, firstly, by constructing a byte vector, a big single byte vector is to be copied into calling functions; Second, to use any type of stream which I can write, in the end, despite the choice, I will be able to use the resulting binary array in any further process which may be, and live. I will compress the output data and send it through the network or I will write some part of it in a file. I still want to be functional enough (or completely), I am using, though implementing any other plan. Thank you. Update: Example that I have found a solution after which I have added so that the user can save some time while searching for the way to write data. ] Byte writing and write-bytes are of special use when you have to write an octet. & gt; (Bytes? (Output-to-bytes (lambda (byte 42))) #t & gt; (Byte vector? (Output-to-bytes...

tex - LaTeX - Description list - Split the item across multiple lines -

Image
I have the following latex file Notice how the item on the description is too long ... foo ... . \ documentclass {article} \ start {document} \ start {description} \ item [foo foo foo foo foo foo foo foo foo foo foo fu fu fu fu fu fu fu fu Fu Fu Fu Fu Fu Fu Fu Fu Fu Fu] Bar \ Object [Buzz] Bang \ & {Details} \ End {Document} This generates a file like this: Fu is all on one line and will participate from the side. Is there no way to split the details portion in many places, so he does not take part from the edge of the page? I just want to be able to do this in the preamble, because I can not edit the actual body of the document. mdwlist: \ usepackage {mdwlist} \ renewenvironment {description } Change the description environment in preamble using {%} {originemcript} {\ desclabelstyle {\ nextlinelabel}, \ Renewcommand {\ makelabel} [1] {% \ parbox [b] {\ textwidth} {\ bfseries ## 1}%}% \ desclabelwidth {2em}}} {\ end [drawing]}

extend - Extending class in Java and constructing using an instance of the extended class -

I would like to expand a square and then copy that version of the value that has been extended, so I If it does not understand all its parameters in my new category, then what I'm trying to do is a simple example: Public class MyTableModel default tellable model {public MyTableModel (public) DefaultTableModel model) {This = (MyTableModel) model; / * I know this is invalid * / / public newMethod () {// some extra code}} Is it possible? It looks like you composition inheritance Instead of wanting, in particular, it seems that you are trying to use. That is, you want to take a current example of DefaultTableModel , and create another DefaultTableModel which the underlying representative wants to take most of the methods forward, but maybe some Add / modify / decorate you this = somethingElse; can never be set, but you can be DefaultTableModel rep , and also see Effective Java version 2, item 16: Follow the structure on heritage / em> Guava ex...

asp.net - .NET Memory Leak -

Our ASP After running our stress test for the internal Web Services on .NET applications, our mid-tier server (where we host Asmaks. Net 3.5 web services) showed close to 1 GB of memory consumption. The review of memory dump from the mid-tier server, I have more than 1000 objects Microsoft.Xml.Serialization. GeneratedAssembly.ArrayOfObjectSerializer is referred to by the Web Services Runtime. What are some deals that are being Siriylaijd / Diserilaijh our custom objects in Web services level? Can it be more light on this? When I look gcroot on some of these 1,000 objects, I discovered the following: (Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Storage.ConfigurationChangeFileWatcher) -> 1c4bb450 (System.Threading.Thread ) -> L8236aa0 (Sistmkruntimekremotingkcontektskcontekst) -> 18,236,914 (Sistmkappdoman) -> L0409dc4 (Sistmkresolviventhandler) -> 10,409,494 (Sistmkvebkkanpaileshnkbuildmnagr) -> L0409f30 (Sistmkveb Kkanpaileshnkmemoribuildresul...

MySql, Entity Framework, Inner Joins with null checks generated -

I had a play with the unit framework and MySQL driver. Sorry it's a stupid question. Table ad vacancies have an FK in PK. Both fields are not marked as tap I am displaying a simple join: var qry = (in spacing by reference). Join the advertisement on the vacant position. Equivalent ad advert.vacanscies.id on vacancy.id where advert.status == 1 new {id = advert.id}); This generates the following SQL: Selection 1 as the C1, from the empty positions as Extent2.id as Extent1 INNER Add Ad Extent2 ON (Extent1.id = Extent2.vacancy_id) or ((Extent1.id is the IS faucet) and (Extent2.vacancy_id is the IS tap) where 1 = Extent2.status Why Creating the position of "IS Null" for EF, when the column is not marked blank? Thanks, Bob this is the provider, not EF , Which generates SQL. The query is incorrect anyway. And by all this, ads are restricted with spacing, which you say is unnecessary anyway.

c# - Unable to load an external image in Silverlight - "ag e network error" exception -

I am using Silverlight 4 and I am experiencing the following problem: First of all, code: bitmap image bitmap image = new bitmap image (); Bitmapmize Create Option = Bitmapcreate Option. Ignore Image Catch; BitmapImage.DownloadProgress + = New Event Handler & lt; DownloadProgressEventArgs & gt; (BitmapImage_DownloadProgress); BitmapImage. Urisoro = new uri ("http://choteborsky.aspone.cz/Images/Label.png", UricandAssolute); BitmapImage.ImageFailed + = New Event Handler & lt; ExceptionRoutedEventArgs & gt; (Bitmap image_example); The bitmap image activates the ImageFailed event with "Image and Network Exceptions" I do not seem to be able to load any external images, even if I do. Do I need to configure something special or not doing this work? Thank you The server on which the image is hosted requires a crossdomain.xml file, cross- Domain Permission Requests File should look like, almost: & Lt; Allow / -to & gt; & Lt; For...

php - How to position a element (drop down menu item) exactly below the parent menu -

I am trying to install a dropdown menu item below the parent menu. When you hover over the original menu, the visibility of the child's dropdown menu item will be visible I've given the child elements using the position: full and up and left side access. But when I change the monitor's resolution to the left and top alignment changes > How to determine the position of that element PLL help will be appreciated It's a wonderful, if all of the old, CSS drop-down menus on the intricacies, to fix IE, just a little with my javascript Believe that all CSS still works great, but I still do JS Can not talk with irrelevant.

c# - How to call method inside of usercontrol which is nested inside of RadDockableObject from content page? -

This is my code. I am playing ASP.NET UserControl and with features, but I have specific rules Need to call me. Can anyone tell me how to do this? var usercontrol = (UserControl) RadDockableObject1.FindControl ("ControlName"); Usercontrol Valid = true; Usercontrol.methodName (); You have to enter it for the proper type. You are currently casting it to userstrokes. This will give you access to a set of properties and methods, but not all. Cast it for a special type and you will have access to everything. Everything that is not private ...

.net - DataTable.Select using the IN operator -

I have never found a great way to do this, so I'm wondering what other developers like (For performance, readability, etc.). Is there a way to use the selection operator in the datatable? The selection () function, based on the results of a query, on any other data store. For example, in SQL Server, the syntax would be: Select some values ​​from TableVALUE where myfield IN (select some fields from some fields, where some code = some filivariable) I know that in terms of coding, this is a very simple query to do against DB, but it is being done in an app, where it does this by doing hundreds of thousands on a server Calls are due to the number of calculations included. I have given it time, and better to get all the data at once and use datatelle. Selection () or DataTable.Compute () To get the results I needed I open anything from LINQ to datasets etc. What I really need to do, there are many trips to the server. db Select t1.SomeValue from T1 in Table1 (where D...

wpf - Databinding Issue With Custom ObservableCollection Properties -

I am creating a small personal finance program that uses "envelope" as a method of budget. I am doing this as a means for learning mostly WPF & MVVM. I have participated in a problem where I can not datatinted custom properties created in my Custom Observe Collection, here it is seen: public class observableEnvelopeCollection: ObservableCollection & lt ; Envelope & gt; {Public decimal total} {decimal total = 0; Forex Currency (envelop in env) {total + = env.Balance; } Total Return; }} Public Decimal Saving Amount {Mill (Blah Blah.}}} I am able to store my datagrid with no problem, although I have a label near my datagrid I need to show the total balance for the envelope. Collection I. I am able to database the collection count, which is the property of the Parent Observation Collection Class, but I Tum can not tell the total or the Savington from the class. The label is empty only when the program is run, and if I use the VS 2010 designer and go to the...

Comparing large numbers in php and sql -

I need to compare a large number of php (30 digits long) with 2 numbers in my database. What is a good way to do it? I tried to use floats, but it was not accurate enough and I do not have a great way to use a large number of php. Have you tried to compare the string? Just make sure that each number is padded with zero. mysql> Select "123123123123123123456456456" & lt; "123123123123123123456456457"; + ------------------------------------------------- ------------ + | "123123123123123123456456456" & lt; "123123123123123123456456457" | + ------------------------------------------------- ------------ + | 1 | + -------------------------------------------------

jQuery - How do you select children of children when in the context of 'this'? -

After rolling on the wrapper div, I need to talk different nested children differently. . I do not know how to call children in children .... I've tried every Freikin Junkie's combo but it just does not want to play, because this part of the function 'this' Is bump on. But if I remove it from 'this' then it takes action in all cases. & lt; Div class = "vpmedia" & gt; & Lt; Li & gt; & Lt; A href = "http://site.com" & gt; & Lt; Div class = "vpArrow" & gt; & Lt; Image src = "http://site.com/image1" & gt; & Lt; / Div & gt; & Lt; Div class = "vpLeft" & gt; Title & lt; / Div & gt; & Lt; Div class = "vpRight" & gt; & Lt; Div class = "vpRightImg" & gt; & Lt; Image src = "http://site.com/image2" & gt; & Gt; / Div & gt; & Lt; / Div & gt; & Lt; / A ...

python - Problems with Tornado Web Server -

I am using OSX 10.58 with the following versions: curl - change Curl 7.16.4 (libidium / i565) libcurl / 7.21.0 OpenSSL / 0.9.7l zlib / 1.2.3 Protocol: IPv6 Largefile NTLM: dict file FTP FTPS http https imap IMAPS ldap pop3 RTSP smtp smtps telnet TFTP Features POP3S ldaps pycurl 7.16.2.1 processing pycurl: SSL pycurl == 7.16.2.1 Search for best match setups for setuptools processing dependencies /library/Python/2.5/site-packages/setuptools-0.6c11-py2.5 for setuptools Deprecation of .egg processing dependencies Io libz-7.16.2.1-py2.5-macosx-10.5-i386.egg pycurl 7.16.2.1 Using / Library / Python/2.5/site-packages/pycurl-7.16.2.1-py2 already easy to install.pth The active version is simplejson 2.1.1 processing simplejson-2.1.1-py2.5-: pycurl == pycurl == 7.16.2.1 for search for simplejson best match 7.16.2.1 for finished processing dependencies .5-macosx- 10.5-i386.egg processing dependence MacCox-10.5-Eye .386.GG Simple Generation 2.1.1 is already for simplejson I founded Torned...

c - Check if a word-sized variable has a carry after arithmetic operation -

Is most compilers able to check whether the execution performance was executed earlier in the code ? For example: unsigned int n = 0xFFFFFFFF; // 8F's // is doing some stuff here ... n = n + 1; // (n> UINT_MAX) {// moving to}} {/ code> Unusual intestine will wrap around 0 in your example (32 bit signed ints are used to handle your implementation) The compiler can not tell if they wrap around, you have to look at your results to see . if (n> n + 1) {/ * wrap * /}

i get error on Windows 7 64bit after i installed my C# program -

मैंने विंडोज़ 7 64 बिट पर अपना सी # प्रोग्राम (एक्सेस डाटाबेस के साथ काम) स्थापित किया है I और यह त्रुटि प्राप्त करें: Microsoft.jet.OLEDB.4.0 प्रदाता स्थानीय मशीन पर पंजीकृत नहीं है समस्या क्या हो सकती है? पहले से धन्यवाद आपका सॉफ़्टवेयर 64 बिट मोड में चल रहा है, और ओडीबीसी ड्राइवर केवल 32 बिट। आपको .Net के 32-बिट संस्करण के साथ चलाने के लिए मैनिफेस्ट को बदलना चाहिए। आप इसे विजुअल स्टूडियो कॉन्फ़िगरेशन विकल्पों से कर सकते हैं।

php - Is there a way to determine if a page is compressed or not? -

I am writing a script that can determine whether a page is compressed or not, and I'm doing a bit Research and can not figure out how a page is compressed or not. I thought that in order to compress a page, there should be something in the header that it is a compressed file like content type or something like that. Any help is appreciated. This is actually content-encoding . Depending on the type of compression, it may be gzip (or x-gzip ), deflate or compress In case of compressed data. Excerpt: Optionally "Content-Encoding" / "Accept-Encoding" and "Transfer-Encoding" / "Te" Header in HTTP / 1.1 Allows to send compressed requests to get compressed HTTP responses (and less common). Specification for HTTP / 1.1 (RFC 2616) specifies three compression methods: "jizip" (RFC 1952; material wrapped in GPIP stream), "Deflate" (RFC1950; content that is a zlib-format Encoded format produced by the general U...

java - How to integrate CMS to existing web site -

I try to solve the problem with the existing web app with some CMS integration. The web app is based on Java (basic 3-layered architecture). The UI layer is based on Apache wicket framework. Our web app is positioned on the Glassfish server. I have to insert a new part into my existing pages, it will be part of CMS. For example: I have two screens on the web page The entire page is generated from the html wk, the first devail service is generated from the wicket with the data, the second div - CMS division is generated from the CSM. I think it is only my idea to have a CMS for the appropriate article HTML for the CMS element . Can you give me some suggestions on how to do it, because I really do not know how to do it. Thank you for your prompt reply. Jason Smith If you have not selected your CMS yet, you may wish to see CMS projects is listed.

php - cakephp routing problem (or maybe just confusion) -

I have just started learning the cakepap and working in addition to routing, as an example example, I still have complete Not sure how many works on this routing (included in the official cookbook book), after reading several documents. My problem is with '/' root routing, I want to go to the index () function PostControler so I use it: router :: connect ('/', Array ('controller' => gt; 'post', 'verb' => 'index')); But if I go to the url, then it does not work: localhost / This is probably (most definitely) Because I do not know where to put the cake_1_3 folder / installation, currently on my local directory (in HTDOX) my directory tree looks as follows: - htdocs> posts> KDODO_3 This means that when I navigate: Localhost / I do not get anything When I navigate to: local host / post / I do not get anything, only folder "post" the directory entry that I Directory for "Kek_l_3". This ...

c - Dropping root privileges -

I have a daemon that is started as root (hence it can be tied to low ports). After initialization I want to leave the root privileges for security reasons. Does anyone indicate a known right code in C who will do this? I have read the man page, I have seen its various implementations in different applications, and they all are different, and some of them are really complex, this is security-related code, and I actually Do not want to change the same mistakes again, which other people are doing. What I see is a best practice, which is a good, portable library function, which I can use in the knowledge that it must be received properly. Is there such a thing? For reference: I am starting as root; I need to change to run under a different UID and GID; I need to set up the supplemental group correctly; I do not need to change later in root privileges. You are looking for this article: Not sure how to enter the best information without replacing the content of that page...

java - Fuzzy Queries in Lucene -

I am using Java's Lucene and indexing a table in our database based on the name of the company . After the index I want to make a fuzzy match (Levenshatin distance), on which we want to input into the database. The reason for this is that we do not want to enter enemies due to spelling errors. For example, if I have the company name "WidgetMaker XYZ" then I do not want to include "widget maker xyz". Of the things I have read, Lucene's Fuzzy Milan algorithm should give me a number between 0 and 1, I want to do some tests and then set a sufficient value for us to determine fixed and reasonable prices. should do. The problem is that I am stuck, and after the search that looks everywhere on the Internet, it needs the help of the Stack Overflu Community. Like I said I have listed the database in the name of the company, and then the following code is: index explorer explorer = new indicator finder (directory); New query parser (version LUCENE_30, ...