Posts

Showing posts from September, 2011

c# - Problem Serializing a Class Containing a Collection using XML Serialization -

I have this XML snippet as part of an XML file that will be deserialized for the AC # object. > & lt; EmailConfiguration & gt; & Lt; SendTo & gt; & Lt; Address & gt; MyEmailAdress@bah.com< / Address & gt; & Lt; Address & gt; Too & lt; / Address & gt; & Lt; / SendTo & gt; & Lt; Cc & gt; & Lt; Address & gt; CC & lt; / Address & gt; & Lt; / Cc & gt; & Lt; BCC & gt; & Lt; Address & gt; BCC & lt; / Address & gt; & Lt; / BCC & gt; & Lt; / EmailConfiguration & gt; Note that SendToAddress is a collection of addresses & lt; Address & gt; MyEmailAddress@bah.com< / Address & gt; & Lt; Address & gt; Too & lt; / Address & gt; My class currently looks like this public class SendTo {public string address {get; Set; }} This is good for 1 address, how do I change the class, so that it can handle more than 1 address. I tr...

How do I require and provide clojure files? -

I have a set of tasks saved in .clj. How do I provide selected sets of work and then import these functions into my other files? You have a few options. If this is just a file (not in the package) then in your files, you can only use load if your file was named "fun.clj" You will only use the file name without expansion: (load "fun") (provided fun.clj was on your desk). Or (load "files / funny") If it is not in your class, but in the files directory Or you can use load-file and it can replace the location of your file: (load-file ". / Files / Fun.clj ") If you want to give them the namespace (by putting them in the package), then you have the ns macro Put the file, then put it on your squares, then you can load it via the Usage or requirement . There are documents for the tasks described here:

objective c - UserDefaults in system preference pane installed for multiple users in OSX -

I have only a background app that is controlled through the preferences panel in the system preferences to communicate between the prefix and the app I use distributed notifications. The user is shared through the default. It all works very well. The problem occurs when the user installs the "For all users" prefix pane, when prompted by the system priority pane In this case the prefix is ​​written on ~ / Library / Preferences / , as is "only for this user" installed. (I think this is the right behavior.) However, when Prefen reads a default key, then prefpane appears on / library / priority / , not in the user's home directory. To deposit it: The prefix pane is installed in: ~ / Library / PreferencePanes / The following: ~ / Library / Preferences / Read by default: ~ / Library / Preferences The prefix pane is installed in: / Library / Preferencespons / Written by default: ~ / library / preferences / reads by default: / Library / Preferen...

C# ASP.NET MVC: Dynamic Querystring for Search -

मेरे पास निम्न परिदृश्य है: 1) एक फोन बुक टेबल 2) तालिका के माध्यम से खोज करने के कई तरीके (प्रथम नाम, अंतिम नाम) 3) अनिवार्य पेजिंग (पेज आकार और पृष्ठ संख्या) के साथ-साथ सॉर्टिंग भी है जब उपयोगकर्ता पहले पृष्ठ को एक्सेस करता है पहले यूआरएल बस / फोनबुक है अब मान लें कि उपयोगकर्ता "एबीसी" खोज रहा है, तो यूआरएल / Phonebook? Q = abc हो जाता है? फिर वह पहले नाम से आरोही क्रमबद्ध है, और यूआरएल को / फोनबुक = q = abc & sort = firstName & amp; order = asc होना चाहिए। मेरे पास समस्या यह है कि मैं अपने दृश्य को क्वेरी स्ट्रिंग को स्वचालित रूप से जोड़ने / संशोधित करने के लिए कैसे काम करूं, ताकि यह अभी भी पहले दर्ज बाधाओं (जैसा कि "एबीसी") के रूप में है, लेकिन इसके लिए नई बाधाओं को समायोजित / जोड़ता है उदाहरण के लिए यदि सॉर्टिंग, और फिर पेजिंग आदि का उपयोग किया जाता है तो? मुझे जेएस का इस्तेमाल करना और इसके लिए स्थान को दोबारा लिखना और न ही प्रत्येक के लिए प्रत्येक पोस्टबैक के बाद पेज को वास्तविक एन्कर्स (एआरआर) उत्पन्न करना है। मेरे पृष्ठ पर सॉर्ट...

.net - ADO.net Entity Framework: Update only certian properties on a detached entity -

I want to update a unit without loading unit from the first database. I completed it, but only after knowing the properties of all entities and then using "Atato" method. My problem is that I do not want to remember all the properties of my app. Example: new shopper as dim customerEntitiy customerEntitiy.shopper_id = CustomerData.CustomerID customerEntitiy.market_code = CustomerData.MarketSector customerEntitiy.email = CustomerData.Email customerEntitiy.modified = DateTime.Now context.AttachTo (made "shopper", customerEntitiy) context.SaveChanges () unit area on the one that's why "". I do not want to pass this "created" date through my "n" level app. How do I "update" the area when saving the database? Thanks! Paul I figure it out, basically, you instead use a stub, attach it , then set props you want to update the unit structure will update only changed things dim customerEntitiy as new commerce_sho...

C# ASP.NET MVC: Single-Line If Clause in View? -

I've got a slight issue ... and it can not be solved. I see this: & Lt;% = Model My Text% & gt; & Lt;%}% & gt; As you can see, I am using 3x & lt;% and%> He just screams like bad code but I can not seem to work in this same line, it throws all kinds of strange errors (like semicolon is missing, and when I add it, it's something Throws): Any ideas ?! Try: & lt;% = model Display Text? "": Model. My Text% & gt; or & lt;% if (Model! Display Text) Response Write (Model. MyText); & Gt%;

sql server 2008 - Can I use a Trigger in this scenario? -

I have a table (i.e. report data) which includes some calculation data -> example class average score, number of students , Average grade points, etc. etc. I work great. Now, if I change some data in some of my other tables (like classrooms table), then I need to update the report data table. So I thought that if I insert, update, or delete a classroom table, then I can run my stored process which updates the data table, data. So I thought a trigger would be good for this but I'm not sure. Why? Well, stored procedures that are used to perform all custom maths, will actually ask the class rhom table often. So will it use the most recent (eg converted) data? e.g. If I change the field number number from 4-> 5. The stored procedure (which will check the field on the classroom table, can get 4 or 5 as data? thanks :) Note: Class discussion, etc. are just fake for the purpose of this discussion. The rule of transaction is that you always change itself data c...

silverlight - WPF: Can I get the size of a UIElement AFTER a transform is applied? -

In WPF / Silverlight, I can get the calculated value of UIElement after the conversion is applied Am I (As per the comment below): I have a stack panel and I have applied it to TranformGroup . groupTransform.children.add (new translation transform ()); (warning, further psuedo code) There are two translations and a scale change in the group. GroupTransform.children.add (new scale transforms ()); GroupTransform.children.add (new translation transform ()); ContainerToScale.RenderTransform = groupTransform; ... // code which sets the value for all changes Obviously the scale is the one which is the most interested in me. realism and actual height changes you do not make changes . After calculating the size of the control of the layout system, the real height and actual height reflect the calculated width / height (depending on the values ​​like margins , horizontal alignment , etc.) One way of achieving the size of the control, keeping in mind all the...

Small SICP/Scheme question (local state) -

I'm actually reading a book for fun but it can be considered homework. In any event, I do not feel comfortable with the local state variables with this language ... For example, use this code: (define flip (0 Counting (counting) counting (counting counting number 0)) (Lambda () (lambda) (if (= 0 count) (start (count! Count 1)) (start (count! Count)))))) Why is code optional between 1 and 0? The value of count 0 is called this function every time! A dragon will be equivalent: class flip: def __init __ (self): pass def __call __ (self): count = 0 if count = 0 0: count = 1 return count else: count = 0 Return calculation It gives every single thing every time I am confused ... I have a little experience writing compiler for functional languages, so perhaps a brief description of how memory is represented is in order. Each function can be broadly considered as a pair (E, F) where e is the set of free variables, and the "code" of the F function itself is it...

Global memory management in C++ in stack or heap? -

If I declare a data structure globally in a C ++ application, does it contain stack memory or heap memory Does it consume? For example Structure AAA {... / ... / ../../ ..} arr [59652323]; Since I was not satisfied with the answer, and hopes that he wants to pay > Initial Data - BSS Volume Stack Stack If you really want to know where the saved Where and Read: (see table w.5)

Find unused Javascript functions? -

I have around 100 .js files in my application. I need to find unused functions from these files. Which editor or tool can help me? See the code quality tool.

c# - is it possible to fetch data from multi dbs through one connection request -

I have to work on this poorly designed DB where a new set of data was installed by adding a new DB on the server is. So I have to get data from Multi DBS, I wonder if there is any way to get all the data in the group through a connection? I am using C #. (On one side: is it possible to influence the design? What database schema names are designed. .) This is sometimes possible (for example in SQL Server by using database.schema.object notation, or even server. Database.schema.object ), but I do not recommend it because the same approach will not be suitable for all usage cases, and it breaks many best practice-related guidelines. I strongly believe that only suggests to generate a database connection string, I might like, or more specific types using. If you are worried about having too much open connections, then you can disable the pooling on the dynamic connection (but then you have to handle the connection management, I personally have to leave the pooling. I'll...

How do I escape unicode character 0x1F in xml? -

I need to write a text with the Unicode character 0x1F in the UTF-8 document (this is not an allowed character in xml ). Is there a way to escape it, or do I have to leave it? This will do XML 1.1 (but frustrated): & # 31; This is not supported at all in XML 1.0. A workaround is a Basic-64 encode that contains the letter containing the text.

how i install gcc to my new linux system by using source code :centos5.2? -

In my new centos5.2 system, there is no component. The method used to install the source code, failed! Because there is no compiler for C / C ++ code. How to use the RPM method? Which dependency should I want? Thank you! Michael Zhou yum gcc gcc-c ++ kernel-devel

delphi - Does "Long running method is done" have a design pattern? -

I have a way that takes a long time to complete and wants to check regularly has been done. This is that I came up with (simplified code, Delphi 2007): type IWaitForDone = interface function ISDone: boolean; End; Function TSomeClass.doSomethingThatTakesLong: IWaitForDone; Start the result: = TClassThatDoesIt.Create; End; War Waiter: IWaitForDone; Start Waiter: = SomeClass.doSomethingThatTakesLong; While not a waiter Waiter: = zero; End; It is possible in context that calling is exactly what is to be done in reality and what is true, when it is finished and goes wrong, even when parts Is done. Alternatively, it can only check if another thread is done with its work. I do not want to see this caller. I think I am not the first person to come into this kind of problem and this solution has already got a name (a design pattern?), But I could not find it. So what is it called? I have seen it as a 'future' first. / P> Here are some links: This is done by an Oren I...

Create a directory on UNC Path web part sharepoint -

I created a web part that gives a button, on the click of this button, I want to reach the directory of another machine Once in the LAN, when I get access to this directory, I will create nested directories in it with different extension files, but the problem is that when I try to access this folder from the UNC path it gives me an error Giving it as "Path '\ comp01 \ ibc'" Here is the LAN which COMP01 computer name and IBC is a shared folder on that machine. The following is the code to click on the button, void _btnBackup_Click (object) sender, EventArgs e) {try {// UNC path -> \\ IN-Y-SVR2 \ IBC if (string! ISNLLlight (Unpack)) {SPS ite current site = SPCentral.GateConttexSite (this .conttex); SPWeb parentWeb = currentSite.OpenWeb (); String Dior = Path. The name of the gate directory (ankapath); // If the IBC folder is not present, then create it if (! Directory. Axis (DIR) directory.CreateDirectory (dir); Birth Through Children (Parents, UncPath); } ...

java - An unbounded set of hashes based on bounded sets of hashes based on paths -

Suppose that there is a tree, XML tree for logic and if you want to have a complete set of root paths for the node, Although you want to split that group into a group of i, where I specify the user. For example an HTML document: / html / html / head / html / head / title / html / head / title / [text] / html / body For example, when I'm 3: {{1, 11, 111}, {/ 1}, 11, 111}, / html / body / [text] 1111, 12, 121}} then becomes for example: {3, 4} Using simplified tree classes which can only get node names; Get an array list of sub-streams; And check that this is a leaf node; What is the best way to make this set of hash? Edit: See your sample solution answer below, it is far from optimal because it is very slow and probably not even the best approach. My own solution is as follows, though I am unsure if this is the most to achieve this goal The effective way is ... maybe you can provide some insights into other Java's complexities. Public Arrestists ...

c# - Linq to SQL Data context doesnt commit if multiple inserts are called on table with auto increment -

I am having a problem while trying to insert two at a time An automatic increment in the table is the primary key If the comments objects are not set up, the id value is not set so that the database can be assigned to it. My code works for single inserts if I send directly, but if I try and do multiple InsertOnSubmit then it does not feel like Ignore, and does not give any error or exception Even if my code is within an attempt and hold block Example 1 (this is not committed to the database) // my comment is started with data dc.tblDailyComments.InsertOnSubmit (mycomment); // myComment2 different data has been started with dc.tblDailyComments.InsertOnSubmit (myComment2); // When it is said that this database is not committed to dc.ubmitchange (); Example 2 (this works fine) // My information data has been started with dc.tblDailyComments.InsertOnSubmit (mycomment); // database dc. SubmitChanges (); // myComment2 different data has been started with dc.tblDailyComments....

jquery - problem with mouse event for absolute position div -

I have a list of images on mouseover, some information is visible on them. The problem is that the trigger for the mouse event notification is not. #team_div {display: block; Status: Relative; #pop_div {width: 300px; Padding: 5px; Height: 200px; Hidden flurry; Border: 2px solid # ccc; Background: #fefefe; Status: Completed; display none; #pop_div img {margin: 10px; Display area; Swim left; } . & lt; Div id = "team_div" class = "team_div_loading" & gt; & Lt; Div id = "pop_div" & gt; & Lt; / Div & gt; & Lt; Table & gt; List of images & lt; / Table & gt; & Lt; / Div & gt; . $ ('# team_div' table img '). Hover (function () {var top = this.parentNode.offsetTop; var left = this.parentNode.offsetLeft; var img = $ (this) .attr ('src'); var id = $ (this) .attr (' Id '); var content = $ ("#" + id + "$ (" # Pop_div "). $ (" # Pop_div "). CSS...

c# - ASP.net ListView Access controls in ItemUpdating event -

I'm missing something here ... I need to reach the values ​​of controls Item which is leaving the editing mode, thus firing item updating. I found how to get a significant value so that I can know which record I need to update in the database. The problem is that I can not reach the values ​​of controls on the editing line. The edit template includes some checkboxes, a dropdown and a text box, these values ​​need to be used so that I can update the records. When watching events, nothing shows up. I think I'm seeing something important here, some help will be easy. You use "ListView.EditItem.FindControl (" X ")" to access direct controls can do. Protected sub list view_item update (object as same sender, same as e.e. as Web.UI.WebControls.ListViewUpdateEventArgs) ListView.ItemDigDownList = ListView.EditItem FindControl ("DropDownListddl") Lblwarning.Text = Dropdown Listlist Selected preference ended sub

SharePoint SiteDefinitions -

I created a simple site definition based on the publishing portal. Every time I want to use the template to create a site collection, so I get the following error message: You've selected template is invalid or could not be found. I do not use any custom features, only the default features with publishing portal site-def is a sign? Is log an error, but it just gives me the information went up: URL "http:" PalfingerPlatformsOrderRoot # 0 "template web // Datsa0004: 8080 / platform / order / +0000112233 ". Failure to obtain a site template for language 1031, this warning is expected when provisioning from the search key 'Pulpperplatform order' custom web template. "Http: // datsa0004: 8080 / failed to implement Platform / Order / 0000112233" PalfingerPlatformsOrderRoot # 0 "templates on the web". Apply the template on the web URL to "PalfingerPlatformsOrderRoot # 0" failed "http: // datsa0004: 8080 / Platfo...

html - Removing border style changes page layout -

मुझे निम्नलिखित HTML / CSS कोड में समस्या है: सीएसएस * {padding: 0; मार्जिन: 0; सीमा: कोई नहीं; रूपरेखा: कोई नहीं; } # कंटेनर {मार्जिन: 10px ऑटो 10px ऑटो; चौड़ाई: 960px; पृष्ठभूमि रंग: #dddddd; सीमा: ठोस 1px काला; } # कंटेनर 2 {मार्जिन-बायां: 200px; मार्जिन-शीर्ष: 400px; पृष्ठभूमि रंग: पीला; } HTML & lt; body & gt; & Lt; div id = "कंटेनर" & gt; & Lt; div id = "container2" & gt; & Lt; p & gt; यह वेबसाइट स्वत: अनुवादित किया गया है। एक छोटे से खेतों के लिए, जो कुछ भी प्रयोग करने के लिए कोई कसरत नहीं कर रहे हैं, उन्हें छोड़ने के लिए, और इसके बाद के परिणाम। & Lt; / p & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; / body & gt; नमूना पृष्ठ दिखता है जैसे मुझे उम्मीद है, यानी निम्न डिवा (पीला) बाहरी डिवा (ग्रे) की ऊपरी सीमा से 400px नीचे धकेल दिया जाता है। लेकिन, जब आप लाइन को हटाते हैं: सीमा: ठोस 1px काला; # कंटेनर की शैली की परिभाषा से, बाह्य डिवी (ग्रे) भीतर की तरह एक ही शीर्ष स्थान...

php - How to load new images, when changed in a web application -

How to push new images into a web application, so that the cache can not be taken? When I'm getting a new JS or CSS file, it's easy. Because they are in smart templates, and I have a version number (like a.js? V = 9) in the URL. Now, there are problems with images: - They are referred to as CSS files, and I can not have a version variable. So, how do you do it? In the middle of the most clean and easy way, I would: In CSS, point to images with URLs with specific markers; Such as " image.png? VERSION_NUMBER " (literaly) This will help to develop the CSS file To avoid any problems with the cache, I will use some kind of "build process", which will mark it as VERSION_NUMBER in each CSS file (and possibly, JS, PHP , HTML, ...) This will create modified files with the correct version number those files will be deployed to the webserver Respect The term as, VERSION_NUMBER may SVN revision of each file; In this way, only the modifie...

java - How do I setup log4j properties so that each thread outputs to its own log file? -

I have several instances of thread classes that I have at any time to log in to log me to use log 4 Which is setup. I need a way to setup log-46 so that each installation of my thread class can output logs to a different log file. Here's what I did (in the phonetic code) The public class extends the doSomething thread {Private logger de_logger; Make public some (int id) {d_logger = logger.get logger ("doSomething" + id); String logfileName = "doSomething" + ID + ".log"; Properties PRO = new properties; Prop.setProperty ("doSomething" + id, "Debug, WORKLOG"); Prop.setProperty ("log4j.appender.WORKLOG", "org.apache.log4j.FileAppender"); Prop.setProperty ("log4j.appender.WORKLOG.File", logfile name); Prop.setProperty ("log4j.appender.WORKLOG.layout", "org.apache.log4j.PatternLayout"); Prop.setProperty ("log4j.appender.WORKLOG.layout.ConversionPattern", "% d% c ...

wordpress - Does this simple PHP function wrapper look sensible for its purpose? -

With the new to PHP, and riding on this "function wrapper", I thought I got some feedback I would like to get around five comments if possible, and a slight reaction. Before asking now, I have several reasons to wrap other (WordPress) functions, primary trouble free upgrade. It was also important to be able to set a custom name for each function definition, so $ wrap array . But I retreat, is it acceptable and relatively bulletproof? function core_oo ($ function) {$ args = array_slice (func_get_args (), 1); $ Wrap = array ('comment' = & gt; 'the_comment', 'comments' = & gt; 'has_comments', 'post' = & gt; 'the_post', 'posts' = & gt; 'has_posts'); Return call_user_func_array ($ wrap [$ function], $ args); } ... and the function will be called in this way ... core_oo ('post', 'arg1', 'arg2') ; Many thanks! Edit: Sugeestion below the chaos, is this th...

Connecting to APNS for iPhone Using Python -

I'm trying to use push notifications to use Python in the iPhone. I have exported my certificate and private key to a p12 file fromChicon Access and then converted it to a PAM file using the following command: openssl Pkcs12 -in cred P12 -out cert.pem -nodes -clcerts I'm using Python for connection. I run the following code: deviceToken = 'kun \ xaa \ xd ... c0 \ x9c \ xf6 \ xca' # wrap the wrapper = APNS Notification Wrapper ('/ Path / To / cert / cert.pem ', True) # Make message message = APNSNotification () message.token (deviceToken) message.badge (5) # Add message and send for API server wrapper.Apend notify (message) wrapper And then I get the error message: ssl.SSLError: (1, '_ssl.c: 485: error: 140 9 4416: SSL routine: SSL3_READ_BYTES: Sslv3 warning certificate unknown ') Can anyone help me on this Is received? I have recently done using Django - can be useful is? It is not already using any other additional libraries ...

actionscript 3 - Flash CS4 Textfield weirdness! -

I am working on a flash project where a designer has typewriter effect Working for the best part of the day, and now with some minor changes in other parts of the flame, it is not working! Does anyone have any idea why this does not work .... import flash.text.TextField; Var phrase_string: string = "sale is ending"; Var n: number = phrase_string.length; Var i: Number = 0; AddEventListener (Event.ENTER_FRAME, textCheck); Function text check (e: event): zero {if (i & lt; n) {display_txt.text = phrase_string.substr (0, i + 1); I ++; Trace (phrase_string.substr (0, i + 1)); }} This is simply called display_txt with the dynamic textfield of the movieclip (embedded with fonts) I'm completely foggy! This is a classic font embedding problem. Some fonts treat different types of bold and italic wits, and to display these bold or italic versions, you can export a new 'font' (same font name, but different font weight) to your library. May have to add....

c# - Can a userControl event cause an update panel to refresh? -

मेरे पास एक aspx है। & lt; div id = "headerRegion" class = " borderDiv "& gt; & Lt; xy: पेमेंट हेडर आईडी = "पेमेंट हेडर 1" रनैट = "सर्वर" / & gt; & Lt; / div & gt; & Lt; div id = "भुगतान रीजन" class = "borderDiv" & gt; & Lt; asp: UpdatePanel आईडी = "भुगतानफ़ॉर्म अपडेटर" रनैट = "सर्वर" & gt; & LT; ContentTemplate & gt; & Lt; एएसपी: प्लेसहाल्डर रनैट = "सर्वर" आईडी = "पीएलसी भुगतानफ़ॉर्म" / & gt; & Lt; / ContentTemplate & gt; & Lt; / एएसपी: UpdatePanel & gt; & Lt; / div & gt; पृष्ठ init पर, जगहधारक एक ascx लोड करता है। निजी नियंत्रण GetPaymentControl (चार? कवरेज BenefitPeriod) {नियंत्रण भुगतान सीटीएल = नल; स्विच (कवरेजबैनिफाईपियरियोड) {केस 'एल': भुगतानसीटीएल = यह.लोडकंट्रोल ("~ / कंट्रोल्स / लैंपफॉर्म.सकैक्स"); टूटना; मामले 'डब्ल्यू': भुगतानसीटीएल = यह। लोड कंट्रोल ("~...

regex - Manipulating huge CSV files with sed -

I have a set of 4 large CSV files, which I need to modify. What I need to do is this expression Match (. *), Copy the atom to / , then include it later on each line until the atom is reconciled. Then I need to rinse and repeat till the end of the file (there are approximately 25k lines in each file). After all I need to go back and forth through the atom for the first time. If this is possible, I would like to use sed for it. I tried to do it with VIM but regex could not get it right. Any help would be greatly appreciated. An example is illustrated below: Earlier: 0917 ,,, 882-1273,1, 95F 9475,1, 276 -080, 1, 40, 0080,1, 275-690 A, 1, TX-2311,3, TX-3351,4, B-07432,1, B-6901,1, 23-753,1, 02F 4307,1,1 QBK-ND, 1, 0944-026,1, 0944-027,1, 0944-004,1, 0944-056,1, 0944-057,1, 0944-082,1, 0944- 024,1, 0944 -05,1, 0944-102,4, Lor 102,1 0918, CJ1085,1, 1352-152,4, DMS3102 A-18-, 1, 6-32 KEP, 7, 6-32 X 3/4, 4, 6-32 X1 / 2,4, 1251-102,8, Oct-32, 4, 10-32, SAE, 8 After: 0917,8...

database - Does stored procedure help eliminates SQL injection / What are the benefits of stored procedured over normal SQL statement in apps? -

I am very new in SQL world Here are my questions: Applications include the usual SQL What are the benefits of the above stored procedures? Does Archived Process Assistance End SQL Injection? In Microsoft SQL Server it is called stored procedure. How about Oracle, MySQL, DB2 etc? Thank you for your explanation. The stored procedures should only prevent directly SQL injection if you want them If you still have the name of the process with your app, and you have consolidated criteria of that string in your code from user input, you still have trouble. However, when Exclusively, you add some additional security to the stored procedure This can make it possible for you to disable permissions for all but EXEC orders In addition, the query / prepared statements with parameters are usually cached by the server, and in almost every case, just like a stored procedure Are there. Despite this, there are two major advantages for large enterprises of stored procedures: ...

actionscript 3 - Why properties are not declarables in interfaces -

In Action Script 3, I can not tell the wars in the interface. I do not get this. I know that I can define the gates and the setters and work around it, but what if I just want a simple public property? I usually use gates and sets if something happens when I set or get a property, but what if I want to save the value? You can put it in such a way: the interface exists because in your language you have many abstract base classes Can not get from If AS3 has allowed you to do this, then it might not be the 'interface', but 'pure essence classics'. In other words, your interface will be from there for implementation name conflicts and many other legacy problems (diamond). However, should be a setter with only one recipient or any implementation should work. Public Interface I {function get A (): int; } (I do not have the AS3 compiler in my hand)

git - Set up Gitosis, but can't clone -

I have set up Geetosis on the remote Ubuntu box, which I referred to as the Linux commander Will do I'm also connecting to a Windows box using Sigwin. I followed the instructions accordingly: I had no problem until I needed to clone the gitosis-admin store Local Machine git clone git @ linuxserver: gitosis-admin.git When I do this, executes the command, but there does not display anything until I do Any message ctrl-c does not appear exactly to return to the command prompt. I am pretty sure that my SSY key is installed properly, because using "SSIL LinuxServer" in my regular account, the password works perfectly without any password. Edit: At the weekend I set up an identical Ubuntu box at home, and there was no problem in the installation of the Gitmos. The only difference was that I had OSX instead of Saigwin. Was connecting to. Edit: I also noticed that when using the "shell extension" provided with the shell shell, I have no problem, ...

iphone - How is the UIView integration with Core Animation? Layer hosting or layer-backed views? -

I'm not quite sure, but I can bet on layer-backed views. It is: Using visual coir animation layers with a layer backup as their support store, you release the scenes responsibly to refresh the screen. Ideas only need to be greedy when the visual material actually changes. Or is this the second method of integration? All iPhone view layers are supported.

perl - Where can I find 'more advanced web toolkit' for Template Toolkit? -

I really like and like how it works, but I need more 'Web Advance' toolkit. This may be a package of * .tt files for such web objects, such as: selector, selector, datedate, menu, dataTouch ... Is there anything like this Somewhere on the web? If not, then why not? Do you want to create your own template, or who was already developed by someone else? You can fine-tune your own components with Template Toolkit, and you can easily insert other widgets found in template files. I do not know of any prepared packages, which you can download only for general, things that appear on web pages will be good if you spend time and make them available Spend. I think people do their own things that are perfect for their problem, not necessarily refactored or well architectural, or a little rubbish and embarrassing I have my own There are bits, such as templates for country or state selection menus, but I also have some code to set the default. I do not particularly want to s...

How to perform this task in 1 single, efficient mysql query? -

I have a list of 1 TV show stored in the table. Another table stores show genres (action, romance, comedy) Most shows usually have more than 1 style, so there is no option by having a single TV_engier column and entering the style id. I can create a look-up table that will store the TV Shows ID + Gene ID, and I can add 1 row for each style associated with the show. Where things get fuzzy for me, when I want to produce a list of shows on the index, and the name of the style associated with the TV show, how do I add 3 tables in 1 skillful query (index But instead of getting your style instead of running different queries for each item). For the purposes of this post, the tables are as follows TV show table - tv_id - tv_name Genre Table - genre_id - genre_name Thanks! JOIN The heart of SQL will air with something like you Select from tv_webs tv_vname, genre_name, join show_genres to join the TV show tvshows.tv_id = shows_genres.tv_id joining genres.genre_id = sh...

Can you add values to an Oracle APEX Shuttle item using a textbox? -

LHS is still dynamically populated with a question, but if you do not have a value you want , Then just type a value in the text box and then add the RHS of the shuttle (and update the related tables in the database when you submit). When you use '& lt;' If you click on it, it should be okay to add it to LHS or '& lt; & Lt; & gt; button. I think this is possible. R.hs.s. To add value to the text box. Just do the shuttle: : p1_shuttle: =: p1_shuttle || ':' || || : P1_textitem; (You may have to set the LOV "display additional additional values" property on "yes" to shuttle item to be able to see.) You are then able to shuttle the new value for LHS, however, it lhs But after a page is refreshed, the new value added for the table in your code is based on the LOV.

Can I change the marker in a Google Maps embedded map (iframe)? -

I know that I can do it with the Google Maps API, but do you know that there is no change in the marker Is an embedded google map way? I want to change the default "A" button for one. I have not played Google Maps with embedding (I usually do this kind of straightforward Go to the API for stuff). I tried some approaches: I thought embedded syntax would be similar to a static map API so I caught a static map url, copied the markers to the ultimate and iframe Tried to paste it in the URL. It has not worked so much I have adapted another one to use one provided to you. It was one that made the proper marker icon. I then caught the embed code and got stuck on another!

php - How to model a many to many relationship? -

Only a bit of past experience with the database and no formal education with them, how can I model this Retrieve the data needed for it) This is what I'm trying to model: For each item on my site, allow it to upload multiple tags such as files, uploads, PHP, recursive, etc. is. Although the tags are reusable, I can do two different items and each of them can have a php tag. How have I read it and whether it is lacking in experience or I do not know, but I am unable to understand this concept. Obviously you need a central table that connects both together? Once I have a definition of these relationships and tables, how will I work like this: - Recover all items with a certain tag? - Retrieve all tags of an item? Thank you for your help, if anyone can list it to strengthen my understanding of the concept to read more on this. DB part is easy. It's just a sample so that you can see how a particular SQL Engine can look like a database, not just queries. Create tabl...

plsql - Oracle Analytics inside Cursor -

I'm wondering why my "analytics" line inside "cursor" in the oracle form causes an error It is written: Select the cursor READ_C1_REC Select the total Kapilkopar from the different maize, TCODE, COUNT (all TRANS_NO) (division by Mac, TCODE order by MAC, TCODEE) (select. By order, make, TCODE; C1_REC READ_C1_REC% ROWTYPE; ... and there is an error message during compiling: error 173 line 17, column 29 faced the symbol "(" when a Is expected from and in the error analytics indicates the part after the word "over". What could be wrong with my code, what analytics Is allowed in "cursor"? :) In the PL / SQL engine (or at least once), and it came Is on the back of the product database in terms of the features it supports. It may be that your version of the form contains a PL / SQL engine that is before the beginning of analytical functions. You have said that you can not create ideas; Can you make the package? If s...

height - CSS-P nightmare -

I have a container HIV status: relative. Hold everything in it then a left column is a right column, a classical layout. These two relatives are completely located inside the # main. I want the right to become fluid, so I say at the top: 0 px; Left: 280px; (Left column width) Correct: 0 pixels all works but below: 0 pixels do not work. I say height: 100% still nothing. It comes to the edges in all except the bottom. The height of that div is always 1px or 0px, but only px values ​​start working, but it will be useless. What is the reason for this? any clue? In advance thx ... The code has been pasted below html: CSS: body {margin: 0 pixels; } # Main {status: relative; } #LeftSection {status: complete; Width: 280px; Height: 100%; } # Logo {Status: Absolute; Margin: 10px 0px 10px to 30px; } #dvPanelMenu {Status: Completed; Top: 140px; Left: 0 pixels; Width: 280px; Height: auto; Align text: left; } #writous {status: complete; Top: 0 pixels; Correct: 0 pixels; Bottom: 0 pi...

qt - How to create a subdirectory for a project QtCreator? -

I would like to divide my QT project into several directories because it is growing very large. However, when I click on browse in QT creator, then there is no 'Add any directory' and there is no such thing in 'Add New'. Can it be done in any way? You can use a method to add a project that contains files for each sub directory . Qt creators have displayed them in the GUI in nested fashion, and you allow them to add files. For example include project.pro include (folder1 / include.pri) In folder1 / include.pri HEADERS + = MyClass.h source = + = MyClass.cpp etc.

Delphi 2006 loses component package -

Delphi 2006, whenever the component starts out fresh, the component package loses it is on a daily basis, we have custom There are component packages with VCL components that we wrote manually. When Delphi starts 2006, nothing is mentioned. But as soon as I open some components on it, I bds.exe - unable to detect component this application starts Failed to do because DclOpusRep2006.bpl was not found. When I try to re-install the component package again, there are two things: List me an Imperia Design package And before removing the package, it will go on regedit to remove the package. I get a list of design packages right and it shows me in the loaded package and is available. This package is available on local drive, but Delphi is not in one place. Any thoughts in troubleshooting? Just to clarify my problem based on the first answer: I am the only developer on this project. The library has been installed from the same location which still remains and the path i...

java - Why does Eclipse compile this, but javac doesn't? -

We have some unit tests that run in compilation and precisely Eclipse 3.4, but when we compile them using Java If you try, it fails. I have managed to cut code in some small and self-sufficient, so there is no external dependency in it. The code itself does not understand much because it is out of context, but it does not matter - I need to know this That's why Javak does not like it: public class test {public zero test} (matchon (with some michur (.) (Another mile ()); } Zero MatchOn (Submachter Matter) {} Submachore Some Much () {Return New Submeter ()}} Matcher Another Matter () {Return Tap; }} Interface Matcher & lt; U, T & gt; {} Class Besamacher applies to Maitre {Mater & Lt;?,? & Gt; matte} with the public spat (back); }} The square submeter increases the bettemperature {@ with override public submeter (matter mitchure)) this return; }} I have tried JDK 1.5.0_10 and 1.6.0_13 , with the same result: test.java:6: Matches in the examination (test...

php - Padding a time on the left with sprintf? -

I am trying to use sprintf () in PHP at one time (Time of an MP3 time) . Sprint ("% 02d: 2d: 2d", $ time); The function that gives time, for example, '1:56' if the MP3 is 1 minute 56 seconds long, and it returns the call "01:56:00" while It should be 00:01:56) How can I take it to work? How can I tell a sprint to the pad on the left? Or is there a better way to go about this? Can be a more reasonable job? Thanks I think you should calculate each element individually , Then about: sprintf ("% 02d:% 02d:% 02d", bottom ($ time / 3600), floor ($ time / 60)% 60, $ time 60 %);

Firefox addon development: how to create empty numeric or date boxes -

I am trying to create a form with some fields in XUL. I failed to find a way to create a datepicker with a numeric box and one empty values. Typ number has the default "0" value in the textbox, I can change the default to different numbers, but I can change the box Want to be empty The same goes for the datepicker element, I have to specify a valid date, but I want to decide to enter user dates until it is empty. Any suggestions? I suspect that everything may result in a default value, although I do not know the official documents Its concrete evidence in terms of (except for empty and properties in Firefox 3.0, I have been led to this hypothesis). Keeping this in mind, your only option is to use the scheme textbox or to choose some defaults. If you have not changed or you provide an option to enable / disable the field, can you always ignore numeric and date fields?

.net - DotNetOpenId — Getting replay attack failure with programmatic and web logins -

I'm adding optional OpenID authentication to the system. Everything works smoothly with DotNETOpenID, however, I get a problem when: The user logs into the web application using a standard login (formattentation) The user adds some openIDs to the account (we use programmatic open-reads to log on here to obtain the claiming identity) The user logs from the log-off form attestation and Op With ID (using the Login control) back log. In the last step we get an error of a replay attack. I suspect that there is some information left in the OpenID application store (can be used for requests) Is used to achieve the previous request instead of starting. Can anyone help in highlighting some problem here? If the problem is that I have understood it, then how can I clear the information of this specific state successfully after using OpenID using Programmatic Long (seeing that I have a hand Received a successful request from)? Which provider are you testing against? Hone...

ruby - Send allows access to private variables -

निम्न कोड पर विचार करें: def create_class (class_name, superclass, और ब्लॉक) क्लेस = क्लास.न्यू सुपरक्लास, और ऑब्जेक्ट ब्लॉक। ऑब्जेक्ट.कंस्ट_सेट क्लास_नाम, क्लेस एंड मेरे द्वारा किए जाने के बाद: create_class ('उपयोगकर्ता', एक्टिवरेकॉर्ड: : बेस) निम्न ठीक है: Object.send (: remove_const,: उपयोगकर्ता) लेकिन यह: Object.remove_const: उपयोगकर्ता इस में परिणाम: NoMethodError: निजी विधि `remove_const ' वस्तु के लिए कहा जाता है: कक्षा ? क्या मेरे लिए कोई मतलब नहीं है ... रूबी की एक्सेस जांच को ओवरराइड कर सकता है? कृपया मदद करें! ऐसा लगता है कि रूबी की पहुंच जांच ओवरराइड करता है। मेरा अनुमान है कि आप चीजों के साथ अच्छी तरह से खेलना चाहते हैं अन्य लोगों ने निजी बना दिया है यदि आपको किसी वर्ग की विधियों को कॉल करने के लिए भेजने का उपयोग करना आवश्यक है जिसे आपने नहीं बनाया है, तो आपको इसे पहले कॉल करना चाहिए।

asp.net - Binding RadioButtonList to nullable varchar workaround? (SelectedValue which is invalid because it does not exist...) -

In my database I have a blank varchar column in the table. I am compelling a gridview through this table ObjectDatasource and TemplateField similar to this: & amp; Asp: radio button list id = "rblRequirementOption" duplication = direction = "horizontal" runat = "server" repeat = "flow" selected value = '& lt;% # binding ("RequirementOption")% & gt; '& Gt; & Lt; Asp: ListItem value = "" text = "style =" display: none "/> & Lt; Asp: ListItem value = "requirement" text = "requirement" & gt; & Lt; / Asp: ListItem & gt; & Lt; Asp: ListItem value = "do not use" text = "do not use" & gt; & Lt; / Asp: ListItem & gt; & Lt; / ASP: RadioButtonList & gt; If there are any empty values ​​in that column in the table, I get an error: "rblRequirementOption 'has a SelectedValue that is invalid becaus...

nhibernate - How to use bitwise operators in HQL? -

In HQL, how can I use bitwise operators? Select RoleId, RoleName, RolePerms WHERE (RolePerms and @Parameter) = @Parameter But, writing this HQL role where (rollprom and param) =: param gives me this error: NHibernate.Hql Ast.antLR.QuerySyntaxException: 'Antlr The exception of type 'Runtime.NoViableAltException' was thrown. I got a solution to this: HLL works like this: Select from role r where r.Permissions & param: & gt; 0

captcha - asp.net mvc and recaptcha action -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब जब एक उपयोगकर्ता एक फ़ॉर्म सबमिट करता है , मैं कैप्चा पृष्ठ पर कुछ समय से (कुछ कस्टम नियमों के आधार पर) दिखाना / अनुप्रेषित करना चाहता हूं और यदि मान्य है, तो पहले क्रिया को निष्पादित / प्रतिबद्ध करें क्या यह ActionFilter का उपयोग करने का एक तरीका है? या किसी अन्य तरीके से? इस पर एक नजर डालें आशा है कि यह मदद करता है। / P>

filesystems - iPhone - fopen and pathForResource - Permission denied -

I tried to open a file directly to fopen ("/ test.txt", "w +") Is ; It works on the simulator but does not work on the iPhone. Then I have tried this: NSString * path = [[NSBundle mainBundle] pathForResource: @ "GirlName.txt" type: zero]; NSLog (path); Feature = Fopen ([Path SistringUzching Encoding: 1], "W +"); If (fichier! = NULL) {...} else {perror ("error"); } I get permission in the console: 2009-07-24 17:17 17: 27.415 Madomocell [8 9 7: 20b] / var / Mobile / application / ... / .... ap / golnam Commentary error: denied by permission Can you tell me what is wrong? You can not open a file within the application bundle and write it ("w +") Can create. This same code will probably work (if you have changed "R" mode then If you need a writable text file, you can write one In the qualified directory, I will do something like this: // method writes a string in a text file - (zero) write...

javascript - Google Maps API infoWindowAnchor not working? -

I'm trying to get information to show Windows in the right place on a Google Map integration (Just above the top left / top left corner of an image) whenever I try to adjust "InfoWindowAnchor", does not it work? However, "icon anchor" works as expected, I'm wondering if anyone has ever participated in similar situations? I'm using a custom icon, but even when I return to the standard icon provided by Google, infoWindow incorrectly (as it focuses on tail icon opposed to being placed in the upper right Position is being displayed). Below I am using code to do all this work code is important bits here, but I have removed some other functions that may come in your way when diagnosing. $ (document) .ready (function () {var centerLatitude = 37.782112; var centerLongitude = -122.4,1 9, 281; var sanFran = new GLatLng (centerLatitude, centerLongitude); var startZoom = 12; var map; var icon; // our tuberent image bridesmaid myIcon = new GIcon creates a de...

algorithm - Programmatically creating vector arrows in KML -

Is anyone practically practical examples of portraying a mouse that are vectors in KML? In particular, there is a magnitude and a brain data on the coordinates given to me, and I want to do the mouse (or other graphical element) generated on the basis of these values. How can I think about this: Image directory (a cruel power path): one of 360 different image files Create image directors (maybe the batch rotate an image) Every variant Azimuth I have seen "things like" but looking for code that I can use in a program instead of a web program problem : Arrow does not have magnitude reference That would be a label. Line creation in KML : Probably create a formula that creates a line with the origin at the coordinate points, the length of the proportional line for the magnesite With, and multiplied according to Azimath Then there will be two more lines, maybe to get the 30-degree arrow head expanded from the end of the previous line. Problems : Not a different ima...

php - Flex + Drupal Sharing Data -

I have seen a little bit and I can not find the answer to this problem: In fact, this is a stupid question and someone The answer is no. Anyway; Here's my problem. I have a website that is away from Drupal. So, I have also started to create some fancy drag / drop webapps with Adobe Flex, which I would like to embed in my Dupl site. Now the question is ... I should know what you have entered. So for example, I have an application that is voting college football and you only get one vote per week. However, I would like to avoid typing my user name and password to the user ... Is there any way that I can get an application to get the current user ID from the site, Behind the voters and filling the ballot box or voting as someone else? Any help would be great ... You might want to see the module Are there. This module has standard preconfiguration services for obtaining user data and node data. The Drupal Handbook is also something for you.

re-run of .net build when using teamcity -

I am trying to set up a pure build using TeamCity. We got it to compile and now the problem has started once, it creates it in a loop. Can I do a setting to get rid of many runs in TeamCity? I took MSBLUld from the command line using the same solution (.sln) file, works properly and runs only once. Thanks in advance Regards Ganesha Your project (In Team City) check the "Build triggering" settings in the build configuration.

Problem with asp.net forms authentication in internet explorer -

My company is a web application hosted on a client's machine that uses form authentication in ASP.net. When an attempt is made to go to the website and authenticate on the login page, the user is redirected back to the login page. When authenticating it, it works fine and the user is able to access the site. We can not repeat this behavior in our development environment, so we are pretty sure that there is something with their server / environment in it. The problem only occurs when Internet Explorer (6, 7, 8). Authentication works fine when the client tries to get it with Firefox. I have created a debug page which redirects the logon page after calling FormsAuthentication.SetAuthCookie, which displays information about the authentication cookie. While hitting it in Internet Explorer, the authentication cookie does not exist. It does this while executing it in Firefox. Is there any suggestion about whether someone has faced any kind of situation in this way or what could ...

How would you explain reflection to a non-programmer? -

I have a friend who is interested in programming and is asking about many different concepts, classes, interfaces And things like polymorphism / inheritance have become easy to understand, but I am struggling with some similarities for reflection. How would you explain how it is and how it works in practice?

code conversion - Need a little more help converting a CRC function from VB.NET to C# -

I should probably put all this in one question, sorry for this: ( second error Private static string getCRC (string input, bool attachment) {string toEnc = string.Format (" {0} {1} ", input, appendDate == true String.Format? (" {0: YYYYMMDD} ", System.DateTime.Now):" "); System.IO.MemoryStream mStream = New System.IO MemoryStream (System.Text.ASCIIEncoding.ASCII.GetBytes (toEnc), false); CRC32 oCRC = new CRC32 (); returned oCRC.GetCrc32 (((System.IO.Stream) mStream) ToString ();}} error return line form Compiler error message: CS1502: The best overloaded method matching for CRC.CRC32 GetCrc32 (ref system.ioastream) has some invalid arguments Here is the function that is being referenced: Public UInt32 GetCrc32 (IE stream. Stream stream) {// Dim the form of crc32Result Integer = & amp; in; HFFFFFFFF UInt32 crc32Result = UInt32.MaxValue; Try {byte [buffer = new byte [BUFFER_SIZE]; Int readSize = BUFFER_SIZE; Int count = stream.Read (bu...

asp.net - How to get trace output added to context.response in httphandler? -

I have my web Page layout in the config = "true" is traced and I have an easy way to see this stuff at the bottom of the page I want to get the same output from the trace at the bottom of the output from my httphandler There is a way to dump out the only detection information through code that will follow this code: Public class UploadHandler: IHttpHandler {Public Zero ProcessRequest (HttpContext Reference) {Reference.Respons E.ContentType = "text / plain"; Context.Response.Write ("Hello World"); } Public Child IRUUL ({return wrong;}}} I especially want to see the form and query string collection but all this is "Hello World". - Edit Update 2009/07/25: Public class UploadHandler: IHttpHandler {Public Zero ProcessRequest (HttpContext Reference) {context.Response.ContentType = "text / flat"; Context.Response Write ("Hello World"); Object htw = New System. Web.UI.Html32TextWriter (context.Response.Output); {Typeo...

jQuery find by inline css attribute -

मुझे विशिष्ट css विशेषता के आधार पर एक तत्व खोजना होगा सीएसएस इनलाइन लागू किया गया है और मैं एक वर्ग का उपयोग नहीं कर सकता jQuery आप इसे किसी चयनकर्ता का उपयोग कर सकते हैं उदाहरण के लिए $ (": रेडियो [शैली * = 'नियमित']") एक लिपटे सेट वापस करेगा

iphone - Will sending -removeAllAnimations to a layer also propagate to all it's sublayers? -

I'm surprised if I send all animation to a parent layer, then the sub-animation will run. removeAllAnimations according to the document: Attach all the animations receiver . You have to walk again through the sub-agents and also remove the animation from them: for ([CALayer * layer in container layer sublear] } {[Layer removalAllimations]; }

regex to match a single character that is anything but a space -

I need to match the same letter which is nothing but I do not know how to do it with regex To do. should be sufficiently: [^] If you want to expand it, but for white-space (line breaks, tabs, spaces, hard places): [^ \ s] or \ S

visual studio 2010 - How can I Enabling the breakpoint margin in VS2010 -

VS Beta 1 of 2010 does not have a margin on the left where I can click to add / delete break points with one click. I can not find any way to turn it back on. I really hope that MS has not removed this feature in his infinite knowledge! How do anyone go back to this important feature? Cheers, Jan I managed to extract some kind of tomorrow margin .

c# - Set button to disabled when AccessDataSource has no rows -

I am bound to use a AccessDataSource control for a DetailsView control. When there are no selection rows (the details disappear, but still visible), then I would like to disable some more functionality and disable some more functionality. Back in the C # code, I know that I need: buttonbab button. Competent = false; However, I am unsure of a way to get information from AccessDataSource or DetailsView which will tell me about setting prices. I have seen some other articles suggesting examples for the same item: Datavive DV = (DataView) SqlDataSource1. Select (Data source processing. Int Readded Products = (Int) D.W.table.rise [0] [0] For me, due to the data view is not the correct namespace The error is in: using the system web; using System.Web.UI; using System.Web.UI.WebControls; What should I do to disable the button? (Though this is a real newbie question, this is not a school homework because it is the first comment so On all the simple questions.) ...