Posts

Showing posts from July, 2012

php - Mutliple sites on same server sharing code -

I am creating a series of about 5 sites, they need to run all on the same system. I am planning to make them all points on the same server, then used to use on the basis of that domain, different content / styles will be used. Therefore, it is essentially going to have 5 or very different retail sites specializing in a particular product type. But all using the same back-end code so that it is very easy to maintain. I have never set anything like this before and want to know that if there is any information, then I should consider or know a good place which tells me how to do this? Apart from this, we are not hosting ourselves, but go through a hosting company (if that is the case). Thank you! Very straight forward to write to me: There is just one directory: / post / text "itemprop =" text "var / www / sitelibraries / foo.php or other appropriate directory. After that /var/www/site1/foo.php/var/www/site2/foo.php and default set up PHP () in

unit testing a method that returns a non trivial object -

How to test a method that returns a complex object that does not allow access to its fields on this snippet Consider - Get public results getResultState () {ResultState resultState = new ResultState (); // logic // it RestelState = ResultState; // set parent parent class field results; } ResultState is an object which does not allow its many methods and areas. assertNotNull (object.getResultState ()) / / Return ResultState is used by other class methods My question is normal, but I hope That it shows how to get a hint about how to go on trial ... Thanks for the help OK, what's important about the result? Perhaps it can do something or it would be a worthless result, in this case, the code that works with broken codes will be separated? (I am not trying to make light of the problem - sometimes it is very difficult to keep tight encapsulation but test effectively. To make an object a bit easier, test ...)

user interface - Wix UI conditionals best practices -

I have a fairly complicated installer that I am writing in Wix with a lot of custom dialog options, depending on which Restoring 'on the basis of the components Generally, the default is fine, and thus an unattended installation will be successful, but optimizing it helps in things. What am I thinking, is there best practice in Wix for UI conditions? I have found that Wix all & lt; Publish & gt; evaluates the tag, even if the previous one has been evaluated or not, which is leading to many such codes: And so on "back" sections for each dialogue. Is this the best practice? Is there any way of short-circuit evaluation to publish the elements and any previous truth that is correct? You are already using the published / @order element to simplify the code, Although I would advise as clear as possible. You can make logic anyway and can not worry about the order value ...

ssl certificate - Problem viewing sites with SSL certs -

I am managing several websites that use SSL certificates and there are some complaints from those people who do not see anything In the safe mode of these sites, the problem persists regardless of browser or version, which is used, does not affect viewing in non-secure mode, and only with some secure sites, all No. Each site has a different SSL certificate. I have no information about what might be the cause of this problem or how it can be dealt with and appreciate any useful questions or ideas that will contribute to fixing it.

.net - How do I browse a Websphere MQ message without removing it? -

I am writing a .NET windows form application that will post a message in a websphere MQ queue and then a separate queue If a response has been returned for a response, the application will partially process the response in real time. But the response needs to be in queue so that the job of a daily batch, which also reads from the response queue, can rest the rest. I read the message that I could not understand, how it is read without removing it. Even so far away from me, I am an MQ novice, so any suggestions would be appreciated. And hesitate to respond in C #. MQMessage dim q = ConnectToResponseQueue () Dim msg as the new MQMessage () Dim receives the new MQGetMessageOptions () Dim as the Public Function GetMessage (ByVal msgID by string) Dim RunThru = Now.AddMilliseconds (CInt (ConfigurationManager.AppSettings ("ResponseTimeoutMS"))) system. threading. Thread Sleep (1000) 'Wait for one second before checking for first reaction' while True Try q.Get (msg,

version control - git commit frequency -

Since I started gig switch from svn every time I recompile and started earning more and my test I decrease my work from the end in the end I decrease the function by function. I also track some other projects using GIT like GAET, WordPress etc. I see that they do not do this often, so I am thinking of how much work do you do? Guidelines for the GIT project itself (and the Linux Project, AIFI) is a "logical different changes" For one is committed. It is a bit unclear, but you probably do not want to work every single day if you are continuously working on a project, and you do not want to probably do not want to do this After the change in the function - if you have edited many functions in many different files, then you want to add all related functionality together if you can provide a useful comment message with it and provide it. Are. All committed in the committed code should be all related, but it can certainly be in many files. Do you want to keep in mi

c# - recording screen issue -

I am using Windows Media Encoder 9, and in the dual screen environment, I want to record only the primary screen. Any ideas or samples how to implement it? Non-programming solutions are also appreciated. : -) I am using VSTS 2008 + C # + .NET 3.5. I use it for all my recordings It is very easy to use and is at a fair price Allows you to choose the exact area that you want to record. You can also get a free trial to see if you like it or not.

removing html element styles via javascript -

I'm trying to change an element's inline style tag value. The current element looks like this: `& lt; TR class = "row-even" style = "background: red no repeat scrolling 0% 0%; position: relative; -moz-background -clip: -moz- initial; -moz- background-origin: -moz- Initial; -moz-background inline policy: -moz-initial, "id =" 0000ph2009-06-10s1s02 "& gt; ` And so much that it's styling from the class instead of it's inline style I want to remove all the style stuff. I have tried to remove the element. Style; And element.style = null; And element.style = ""; no point. My statement on this statement breaks as the whole function looks like: function unSetHighlight (index) { if (index of index of 10; 000) + (000) + ( Index); Else if (index & lt; 100) index = "000" + (index); And if (index Lt; 1000) index = "0" + (index); If (index> gt; = 1000) index = index; Var mainElm = document.getElem

xcode - iPhone SDK: How can I add a scroll view to my application? -

I am creating an application for the iPhone that has a button that animate an image view , I have created another scene in which buttons are organized, although I want to be able to make horizontal or vertical, scroll this view of the buttons I have seen to add scroll view and I have also followed a tutorial, But i do not know this Education how it can add to my app. Any idea anyone? In the tutorial, I add that man to the scroll bar in the main window. XB, now my app has been created and designed in Design Controller. ACB. So after following the tutorial, when I affect the build and load it, that nibb and whatever you see is a white background and a scroll view. (In that tutorial, he scrolled an image, where I want to scroll a long view of the buttons) I know that the navy of my question may be crazy, but I'm new to all programming at once. Here's another question, if someone helps me to work with this scroll view, then you design the content of the scrolled scene, if this

background attribute in CSS -

पृष्ठभूमि: # 777777 कोई दोहराने नहीं स्क्रॉल करें 0 0; इसमें 5 विशेषताओं शामिल हैं- पृष्ठभूमि-रंग, पृष्ठभूमि-छवि, पृष्ठभूमि-दोहराने, पृष्ठभूमि-अनुलग्नक और पृष्ठभूमि-स्थिति। मेरा प्रश्न यह है: पृष्ठभूमि-दोहराना, पृष्ठभूमि-अनुलग्नक और पृष्ठभूमि-स्थिति बेकार है यदि पृष्ठभूमि-छवि कोई नहीं है? क्योंकि दस्तावेज़ के अनुसार, ये सभी पृष्ठभूमि-छवि को बदलने के लिए उपयोग किए जाते हैं। हाँ इसके बिना उनका कोई मतलब नहीं है।

subsonic generate invalid JOIN query -

I am new to SobSonic and am trying to create an add-on query for two tables. I got the LeftInnerJoin option, which generates a valid query when trying to run it on MSSQL 2005, then it does not work because the left Inner Join is not valid, but join the left. And I still have the Mathials tables and the output multiplier table. You want a query similar to the following: MyFirstTableCollection myFirstTables = DB.Select (). From (MyFirstTable.Schema) MySecondTable.Schema .executeAsCollection & lt; MyFirstTableCollection & gt; (); If you want to return all the columns from both the tables (Output Multiplier Table), but you should probably create a view that contains all the columns you need and that is the query. >

Does Microsoft Expressions Web support Web Application Projects? -

I want the designer to be able to open the same solution file like me, is this possible with the expression Web? The short answer is "no"; But this is a very common request, and I know many people hope that the next version (whenever this happens) will get better support for this. Specifically, web application projects seem to be fast (especially for things like MVC, but obviously tooling changes a lot).

database - General Oracle Data Collection Storage -

I am preparing a new laboratory database. I want to store raw results together for all tests. In some cases, the result is a single value. However, the result is sometimes a raw wave or signal. The case below is the ideal (and why)? ... or provide your own ideal choice. Option 1: Store each individual data as a separate result line (with offset from T = 0). Option 2: Create a signal_header table (start time, sample rate, units, etc.) that are linked to a raw_signal_value table (signal, offset index, value) OR OR Option 3: Store raw data in an external file to recover it when necessary. In addition, in the related post, I asked whether a normal result table is to be stacked in hair tables on the basis or not accurate and scale (data type). I would like to avoid option 3 - if you are going to use to store raw results In a database, you can also use it to store all the results. Option 1 sounds like you would duplicate a lot of data for each result line, and chan

.NET streams, passing streams between objects, best practices (C#) -

I'm currently writing a small toy codel in C # (going along the way. .) The coder takes an input file path and removes the junk (comments etc) lines. Then the file is passed for parsing, then finally another module that creates binary code. This is not very complicated, but I do not want to write a temporary file in the file system at the end of an object all the time, which is the processing of the input file I just stream I want to pass on the next object. I basically thought that each class involved in removing parsing / junk would be idisposable, but I think that means I can not stream on the next object for processing (the stream will stop, unless I Do not use it one in all.) I think I am missing something here, is there an easy way to clear the streams between objects, or do I need a different approach? In general, the responsibility of the consumer is to properly handle disposable objects. help!! Like So in a clear scenario, either your reference to a di

sql - I want to do INSERT without record in DB -

उपरोक्त प्रश्न का गैर-मूल अंग्रेजी से अंग्रेज़ी का अनुवाद: यह एक प्रश्न है डेटाबेस में मान डालने का उपयोग करने के लिए सबसे तेज़ तरीका, जब मान पहले से डेटाबेस में हो सकता है INSERT असफल हो जायेगा जब मूल्य होता है और अद्यतन नहीं होगा जब यह नहीं है। इनमें से कौन सा विकल्प सबसे अधिक वांछनीय है? पहले चुनें और INSERT या अद्यतन चुनें। पहले डालें और अद्यतन करें यदि इसकी एक डुप्लिकेट त्रुटि है। यदि उपर्युक्त के अलावा अन्य अच्छे विकल्प हैं, तो कृपया मुझे सिखाएं। पर्यावरण MySQL 4.1 का उपयोग करता है। यदि आप ऐसा एक बयान में करना चाहते हैं (लगता है कि आप क्या चाहते हैं), मैं INSERT ... पर डुप्लिकेट कुंजी अद्यतन का उपयोग करने की सिफारिश करेगा सिंटेक्स, निम्न प्रकार से: सारणी (IN, someothervalue) मूल्यों में INSERT (1, 'हाय माँ') डुप्लिकेट की कुंजी अद्यतन someothervalue = 'hi mom'; निर्दिष्ट कुंजी मान (या तो प्राथमिक कुंजी या अद्वितीय) के साथ कोई मौजूदा रिकॉर्ड नहीं है तो प्रारंभिक INSERT कथन निष्पादित होगा। यदि कोई रिकॉर्ड पहले से मौजूद है, तो निम्न UPDA

vb.net - How to ignore password protected excel sheets programmatically -

We are scanning Excel files and preparing reports with our tool. My problem is that some Excel sheets are protecting the password and they get the pelft when scanning and it stops the device to move forward. Does anyone have the solution to deal with this problem, leaving me the letter and continuing with scanning without any user intervention. Thanks, Easy A haspad in the workbook Property is (C #): workbook book = GetYourWorkbook (); If (book.HasPassword) {// Ignore! } And {// display your operation here}

erlang - Parse MIME messages -

The email module for my new project I need to show all the email information on the web. Server base64 encoded after applying to the MIME data base 64 decoding technology, is getting under the MIME data: / *************** *** Mime Data Start ***** ************************************* From prashant.n@geodesic.com Tuesday, June 23, 12:01:02 2009 Date: Tuesday, 23 June 2009 12:01:02 From +305: Pacific R. Nike & lt; Prashant.n@geodesic.com> To: koushik.narayanan@geodesic.com Subject: This is an exam mail message id: & lt; 20090623063102.GA27080@picopeta.com> Answer: Pacific R Nike & lt; Prashant.n@geodesic.com> MIME-version: 1.0 Content-type: Multilateral / mixed; Border = "Ricoscog Obiacfaksbiacac" content-rendering Inline User-agent: malt / 1.5.18 (2008-05-17) Status: RO Content-Length: 1 9 12 rows: 52 - Riacsoksjiobiacafaksbiacac Content-Type: text / plain; Charset = us-ascii Content-Disposition: inline Test match Prshansent Regards, - Pacific R lau

vb.net - Help with Infragistics ultragrid cells - manipulate text property? -

I'm having trouble with ultragrid using an infragistics vb.net I currently have the value "internal" There is a cell, though I want to be able to display a completely different string for that cell without losing value. I think cell has two properties, one value property and one text property. Text property is read-only, so I can not specify a new string only on it Depending on your implementation, you may have to use a sequence to do this. As stated on: The value of a cell can not be anything different from its value in the text property. The text setting overwrites what is already in the value property. It is better to set the value property directly so that you can set a type object. If you need the text displayed to separate the columns from the value, then you can add an ultrgrid column to the column. It has a list of text and value pairs. You can use a validlist to do this, even if you do not want to make the column editable. You can also handle i

java - How to test HQL queries? -

I'm looking for a fast (really fast) way to test changes to hibernate I am I have a large application with thousands of different HQQ queries (in XML files) and 100+ mapped sections and I do not want to completely recruit the whole application to test a small change in a query. Is a good setup feeling that I am free from reconsideration and able to check the fastest questions? Intellij IDEA 8.1 with 3 likes is called mechnism 'facet' If you create a data source - add data source, add data source, define driver, yor development db password and password If you do not already have a hibernate coof or you have your session factory Do not configure it in a different way than XML: In terms of all XML mapping, a hibernate CFG f L (Create name for session function, just for easier handling) Add 'facet' to your module's liking 'project structure' and assign the recently defined data source to the new aspect < / Li> Switch to Java EE view

multithreading - What free tools are available to analyze lock contention in java? -

I need to determine which lock in my application code are the most contenders. Which Free Tools Can I Use? You can use both jconsole or jstack in your JDK bin directory. Specifically, jconsole allows you to connect to your process and monitor the thread in which the resources are locked, and this can help you identify the deadlock situation.

ajax - Progress notifications from HTTP/REST service -

I am working on a web application that presents work to a master / worker system which can be used for any worker examples The series work queue master runs as a separate process (completely on a separate machine) and the tasks are presented through HTTP / REST requests. After the job is submitted to the queue, the client can submit another HTTP request to obtain status information about the application task. For my web application, I want to give it some kind of progress bar view which gives the user some indication that how much work has come with the processing. The obvious way of implementing this would be an AJAX Progress Meter widget that periodically voted in the working queue for the position on the tasks presented. My question is, is it a better way to complete it without continuous voting? I have considered opening client sockets to client web applications, on which the task master can listen for notifications. I had another common idea to use XMPP or a similar protoc

c# - filename.Contains #(pound) or ' (single quote) -

How can I check in the filename "Pound sign" and "Astro sign" I have tried it now But does not work if I need to send an error if # or 'are in the file name return the name of the file. ("# \ '); You can use it: If filename.IndexOfAny (new letter [] {'#', '\' '}) gt; -1) {// file name is included in # or'}

apache - Force a prettified URL with mod_rewrite -

In this way I have made my ugly php URL beautiful: RewriteEngine On RewriteRule ^ main /photo([^/\.]+)/?.html$ Main / details.php? Gid = $ 2pid = $ 1 However, now I want to emphasize on anyone http://www.example.com /main/details.php?gid=20&pid=5 to redirect htto: //www.example.com/main/photo5 .html I have tried the following Rectified condom: Revoked code% {REQUEST_URI} ^ / Main / Description \ .php [NC] Rewrite Rule ^ Main / details.php? Gid = (. *) & Pid = (. *) Http://www.example.com/main/ Photo $ 1.html [R = 301, L] But that Was not working. Any ideas? You need to decide whether the current request is original URI or not. In addition, you need to use the RewriteCond command to test the URI's query: rewrite %% {THE_REQUEST} ^ get / main / Details \ .php rewrite% {QUERY_STRING} ^ (([^ & amp;; * & amp;; *)) * pid = ([0-9] +) (and. *)? $ Rewrite rules ^ / Main details / .php $ / home / photo% 3 .html? [L, R = 301]

Is it possible to combine Cloud Computing and MYSQL? -

The main bottle neck of a web server usually finds MYSQL in the database, in my case. More specifically, full text search and master-sled replication. And Sphinx is a potential solution to complete text search, so there is a master-sled replication The last pain in the ass. Is it possible to promote performance with the technique of cloud combinations, for example, by services provided by Amazon Just a wild guess! Edit : What about MySQL and Google App Engine? Of course. Also see and have a MySQL package for. Edit: The API engine is higher than the EC2 and is actually only designed for /. However, see, which allows copy between AppGen and MySQL.

regex - Is it possible to parse this nightmare using Perl? -

I am working on some doctor file, when the text file is copied and pasted, then the following sample 'output' ARTA215 Advanced Life Diagram (30 million) (2: 2) + Studio This advanced study in drawing with 1 hour life .... Prerequisite: ARTA 150 Lab Fee Required ARTA 220 Ceramics II (30 million) (2: 2) + Studio 1 Hour In this course, It is ... Lab Fee Required Special subject in ARTA250 Arts focuses on the selected subject in this course .... ARTA260 Portfolio Development (3 million) (3: 0) The aim of this course is to pre ... BIOS010 Introduction Biological Concepts (3 IC) (2: 2) This course is an introductory course designed to start ... BIOS101 General Biology (4 CR) (3: 3) .. Lab fees required anthropology (4 million) (3: 3) Required for BIOS102 Introduction: This course is an intrusion .... Lab fee is required I want to be able to parse it so that 3 fields can be generated and I can output the value to a .csv file. Line brakes, spacing, etc ... How can this be any

html - Call one function from another function in javascript -

I am still a newbie with Web Technologies and I have some questions with the following code. I am trying to call getDetails () function from any other Javascript function displayTable (). Click on the 'My CD Fact' button, displayTable () is implemented. Well, this is not working for me. I have some silly estimation of this but I can not understand. I tried to diagnose it with firebug and said that getDetails () is not defined. In addition, I have an original CSS file to display the table in a particular style. He is not working either, is it because I have added it to the body and I am using it in my head? & lt; Script type = "text / javascript" & gt; Var xmlDoc; Function displayTable () {var artist name; If (window.XMLHttpRequest) {xmlDoc = new window.XMLHttpRequest (); XmlDoc.open ("GET", "Artists.xml", false); XmlDoc.send (""); XmlDoc = xmlDoc.responseXML; } And if (ActiveXObject ("Microsoft.XMLDOM")) {

Getting absolute 'top' position from a mouse event (Javascript/jQuery) -

On a mousecenter / mouseWeave event, I would like to capture the full 'top' position of the cell of a table. / P> So far, the event is so enclosed: $ ( 'Td [someAttr]). Mousecenter (mouse) {// How do we get TD's top full position? // FYI: mouse.pxx and mouse.GPY will provide mouse position}} $ (this) .offset (). Top

How to start a background process in Java EE -

I want to start a background process in a Java EE (OC4J10) environment. It's wrong to start a thread with just "new thread", but I can not find a good way to do this. In my special case it is difficult to use the JMS queue because my parameters for this method call are not serial I have a onTimeout on session bean There was also a thought about using the timer method but it does not allow me to pass the parameter (as far as I know). > Is there any "theory" method to handle such a task, or I have to return to "new thread" or java.concurrent.ThreadPool . Java EE usually tries to remove threading from developer concerns (this is a complete success Is a different topic). JMS is clearly the preferred approach to handle it. With most parameters, you have the option of compelling or trapping serialization, even if they are not serialized by default. Depending on the data, consider wrapping it into a sergeizable object that can reload th

convention - Variable naming and team members who speak another language -

I work with many developers in India and one of our biggest difficulties is the naming of the first. Was frustrated and did not understand why they did not give things properly (this was laziness?) However, I realized that they are probably not using the naming of variables because they read all the codes. , And his reading English words There are little or no meaning. It seems to be obvious now, but if you can not understand English enough, then the name's name is impossible for it. For better naming practices with a foreign-speaking team member How will work? Sorry it's a little subjective, I've marked it as a community wiki. > Thank you! Change the requirements for members of your team - they should have enough understanding of written English. Edit: In response to Bill's comment, I think the cost of dealing with poor communication problems is not in the savings calculation, but I have never worked with foreign developers. , But I work with 2 non

Importing Python modules from different working directory -

I have a Python script that uses the built-in module, but it also imports many custom modules present in many directors. The main script itself is For example, I will call python agent.py and import a number of agents, in which The following include: import check where a file in the same file should be agent.py agent / agent / Agent / checks.py When the current working directory agent is / then all is well. However, if I call agent.py on any other directory, then it is clearly unable to import checks.py and errors. How can I ensure that custom modules can be imported, regardless of where the agent is from. Py is called as an example dragon / home / blog / article / finder Actually your example works because check.py is in the form of agent.py, but it is to say that checks.py was in the first directory, like; agent / agent.py checks.py then you can do the following: path = os There is no path in .path.abspath (os.path.sys.path (join sys.path.i

c++ - What is a good random number generator for a game? -

What is a good random number generator to use for games in C ++? I think: Very random numbers are required, so speed is good. The player will always complain about the random number, but I have given them a reference that says that I have really done my job Since this is a business project for which I have more It does not have time, it would be good if the algorithm was either a) relatively easy to apply or b) a good non-GPL implementation was available I already have rand () in many places Code> C am, so that should justify the changes to the other generator that is needed. I do not know much about this subject, so only one option I can come up with; Does it satisfy all these requirements? Is there anything else that is better? Edit: Merson Twister likes consensus but what about # 4? Is it true that rand () ? better than edit 2: , let me think a little bit at point 2: there is no way for it to cheat players to know the random number of periods. I want i

Having trouble creating .NET Regex pattern to capture multiple line text -

Sample text is as follows - it is part of a very large document that is being parsed (before each line Location is the end of it): Process Information Primary Process: Laparoscopic Partial Upper Nephrectomy / Intraoperative Robot with Ultrasound Process: 5/4/2009 9:01:00 AM Process: 5 / 4/2009 3: 29: 00 PM I get this string I want to draw "primary process" data from this, in this case, "Leptoshchopic partial upper nephrectomy / robotic with introvertrous ultrasound" The following expression identifies the primary process location and manages to draw the first line of value, but not both rows (using the multi-line flag): ^ Primary Process: \ s * ([\ w \ s] * \ w) \ s * $ I can not understand any expression to get both lines It is possible for the value that this value is always 1 or 2 lines long. And it is also possible that we can rely on the presence of the "start the process:" string at the beginning of the line. new regepix (@ &qu

How do I get this mysql query to include null values? -

I am writing a sorting script, to remove content from my site that was uploaded a week ago, and 0 or 1 Daily_hats - which stores the item ID, date and the number of hits that the item receives on that date Video - actual Stores the content I came with it. $ last_week_date = date ('ym-d', $ now- (60 * 60 * 24 * 7)); $ Last_week_timestamp = $ now- (60 * 60 * 24 * 7); sql SELECT vid_id, COALESCE (amount_heat), 0) Add daily_high to video_id = hit_imit as a total_harning from the video (hit_date) ; = '$ Last_week_date') and vid_posttime & lt; = '$ Last_week_timestamp' hit_itemid by group Total_ights total & lt; 2 It produces items that have reached once a week ... but not all of them that have not been used at all. If an item was not used in the past week, there will be no entry in the daily_hat table. I thought coal should take care of it, but it did not work. How can I fix this? Overall_hats & lt; 2 or total_heets are em

.net - returning Abstract Types through REST -

I am trying to create a rest of the service which will return some data which is a collection of abstract classes in which Various implementation classes include For example. & lt; RootType & gt; & Lt; DataAttribute & gt; & Lt; / DataAttribute & gt; & Lt; Array & gt; & Lt; ItemofClassA & gt; & Lt; / ItemOfClassA & gt; & Lt; ItemofClassB & gt; & Lt; / ItemOfClassB & gt; & Lt; ItemofClassC> & Lt; / ItemOfClassC> & Lt; / Array & gt; & Lt; / RootType & gt; I belive I'll need something like this in my definition. Root Type {{XMLType (Type A) [XMLType (ClassB)] [XMLType (Type C)] Public Abstraction [] array {get; set; }} Probably test an indication.

Install Shield 2009 Premier : Install Windows Installer 3.1 or 2.0 (best fit for system) with any sysem restart -

The original MSI project from the Release Wizard, I chose to remove from Setup, by installing Windows Installer 3.1 or 2.0 (the best fit for the system). exe. When in installation, after restarting the Windows Installer system. Can it be started again? I am in Installshield 2008, and an option in the Release Wizard, "Until the delay of your installation, Reboot ". Have you enabled this option?

c# - Extract derived elements from a list of base elements -

I have an interface list that stores different objects taken from the interface. I would like to write a function where the caller specifies the type to extract I have tried to: list & lt; IParts & gt; part of the list; ... Public list & lt; IPart & gt; Receive (type type) {return.PartList.OfType & lt; PartType & gt; (). Cast & lt; IPart & gt; (). ToList (); } But it does not like an passed type. any suggestion? If you have to support different types of runtime (instead of compiling time with generic): Public List & lt; IPart & gt; Receive (type type) {if (! Typeof (IPart) .IsAssignableFrom (PartType)} {New ArgumentOutOfRangeException ("PartType", "Received from IPart"); } Return it. The delist. Type (i = & gt; i! = Null & amp; amp; amp; amp; amp;; & amp; section; i.GetType ()). ToList (); }

Using PHP to store results of a post request -

IM is currently working with an API for which we can use XML The details must be sent to your server. There is nothing bigger there but it is not working, so I want to output the XML sent to a text file so that's what I'm actually sending! Instead of posting, API IM targets posting for a document, but XML looks really wrong in outputting its recordings. This is my target script, note that posting script 3 The item posts, so the description of each post request in the written file should be one after the other. & lt ;? Php error_reporting (E_ALL); Ini_set ('display_errors', 1); // Get Request Data ... $ payload = ''; $ Fp = fopen ('php: // input', 'r'); $ Output_file = fopen ('output.txt', 'w'); While (FIF ($ FP)) {$ payload. = Fgets ($ fp); FILIT ($ output_file, $ payload); } Fclose ($ fp); Fclose ($ output_file); ? & Gt; I also tried the following, but this last post request was filed so that all the 3 <

How to determine when an application started using java reflection has completed -

I have a Java program that can find and apply the main (string [] algues) method of another Java program Uses reflections. This other program is usually a swing app that produces its own threads. I was wondering if there was a way to decide when this 'program' would end. I'm not sure that it is anyway to find out because it is implemented in the same place as a host program. The present method is only to check whether any of the open frames are not ours, it is not the biggest solution. Edit: It seems that the answer is a dual approach. First create a thread group and launch that child's program in the thread that is a member of that group. Then make sure to check the frame.getFrames () if any frame belongs to the child. Thanks, - Sandro Set the child app to a different one (possibly : Set this as the best daemon thread group) and periodically check whether there are any running threads or subgroups in it.

collections - Multi-valued hashtable in Java -

Is it possible to have multiple values ​​for the same key in a hash table? If not, can you suggest any class or interface that can be used? No it is the idea of ​​hash tables. However, you can either use the map & lt; YourKeyObject, list & lt; YourValueObject & gt; & Gt; You can roll your roll with and use some utility methods to make lists if it does not exist, or use something like that. Example: string key = "hello"; Multimap & lt; String, integer & gt; MyMap = HashMultimap.create (); MyMap.put (key, 1); MyMap.put (key, 5000); Println (myMap.get (key)); // print either "[1, 5000]" or "[5000, 1]" myMap = ArrayListMultimap.create (); MyMap.put (key, 1); MyMap.put (key, 5000); Println (myMap.get (key)); // always prints "[1, 5000]" Note that multimap is not accurate as a home-baked solution is ; Synchronizes all of its methods, while multimap does not make such a guarantee, this means that you ca

ajax - cakephp with jquery .load -

I have a problem, I am using the kppp and loading IM in one page Function Load Dialog (Target Diiv, Source URL) {$ (TargetDiv) .empty () Html ('& lt; img src = "/ gambu / img / ajax-loader.gif" />'); $ (TargetDiv) .load (sourceUrl); } This work is fine, but in the loaded page I have got the complete and thickbox, and it is not working :( When the page load normally without Ajax If everything happens, I think that AJAX loaded pages can not see my JPY scripts. I have tried live, but it works only in the same way: $ ("# check"). Livequery ('click', function (event) {$ ("# myform"). Toggle checkbox (); Return but do not know how to use it with autocomplete and thickboxes in the keyboard) Anyone in your sourceUrl & lt; Script / & gt; . They will not be executed. Either take the script to the main page, or & lt; Script src = ... js / & gt; On the fly you can see the .load () page. By the way,

mouse - how to do click and drag in a winforms application -

I have a simple winforms application with many controls in it I want to be able to click and drag from anywhere on the form I want to move around (around) the whole thing. I have already explored the situation of some relief. I still need to know how to update my offset to tie the click and drag. What I've tried so far is that it mainly looks like MouseDown , mouseover and mousemov events ), But they are not being called (breakpoints are not hit in them) What am I doing wrong? EDIT: I am not looking for drag and drop because I do not necessarily need to drag or drop. What do I want the following device to dry up? There is no control Set up an X and Y variable, which are printed in the form title, whenever They update When a user clicks and drags anywhere on the form, X and Y are updated to reflect the speed of the pointer (click and drag down and right to the side < Code> x> 0 What's the way (with a setup like controller use) to hold all

fonts - Can you recommend any information about least ambiguous letters/numbers? -

I'm interested in making short codes (up to 6 characters) which are clear for human readability: A good code would be like this: AE37HT, say. Obviously, I can try to understand myself, but I was watching that no one was studied by people like NASA or not. If you are also impressed by seeing the readability color, typeface, size, and distance (I'm potentially seeing something about an inch high from around 6 feet), It will also be useful on the monitor or perhaps even in print. I have been given these guidelines, but there are no empirical results in it, which I can change in a table to prepare the code: If your goal is purest clarity, then it will be a matter of choosing that font Which is preferably: 1) To select the fixed width random numbers / letters, there is considerable help in the fixed width, because the kerning is not changing when going across the fern. 2) Use a font with different 0 / o - which are definitely dirty people. See similar letters

python - Downloading a Large Number of Files from S3 -

What is the fastest way to obtain a large number of files from Python S3 (relatively small 10-50kB) from Python? (In the order of 200,000-million files) I am currently using beto to generate signed URLs, and I am using PyCURL to get files one by one. Will some types of concurrency help? PyCurl.CurlMulti Object? I'm open to all the tips thanks! In the case of dragon, because it is IO bound, multiple threads will use the CPU, but it probably Will use only one core if you have multiple cores, you may want to consider the new module. However, you want to use multiple threads for each process. If you use many threads, then this is a good candidate for class.

email - Maintaining HTML Content Positioning in ENewsletters -

How do I get HTML content to be in relative status and to format from a browser / email to another? While developing e-newsletters, the format looks different in comparison to the other in an email server (when tested on my two emails). Example: When I open an email in my Gmail, padding around images is where I want it, but when my work opens in Outlook, there is almost no padding. Example: The font is displayed in Outlook according to style sheets, but changes to Gmail. > How can I keep the status sheet to keep the style sheet and presence stable? The e-mail client is extremely awesome to provide HTML (especially Outlook and Lotus Notes) Usually write crippled HTML with inline CSS styles. It will not be better. Make your design as easy as possible, and you have trouble finding the right look on many clients. The actual best practices for writing HTML depends on which customer you plan to support. Some useful articles that provide insight into common solutions for HTM

asp.net - DataTable.Select("ColumnName IN ") Guid error -

I am having problems with a DataTable line, the idea is that I have any rows from one line of rows I want to remove where one of the column values ​​is in the grid's set. However, I'm getting a grid / string comparison error from the selection () function. The code is as follows: Slow sb for each line as new stringbilder as dtData.Rows in the DataRow sb.Append ("'sb.Append (Line ("SomeField"). ToString) sb.Append ("',") Next gvDataView.DataSource = dtSubData.Select ("SomeField IN (" & Amp; sb ToString.TrimEnd ("," .ToCharArray) & amp; ; ")") However, as someField is a unique identification column, dtSubData.select is throwing an error about Guid string comparison, keeping this in mind, Can I work on this issue? If you can use Net 3.5 and System.Data.DataSetExtensions.dll, you can take advantage of LINQ here. First, I populate a hashet with values ​​from the DataData. dtData.AsEnumerable ()

multithreading - Mutex in Python Twisted -

I am using the twisted framework, and getting the RPC asynchronously, I have another task which Works in 2 seconds, and sleeps in the middle, it is called through the reactor. It depends on shared resources, so I need some thread-safe way to reach them. How does the use of an important sections / mutex / locks go into twists? Although you can use thread in twisted, always with twisted RPC To do parallel using the thread is to do. One of your advantages will run a twisted framework reactor and your handler will call the event when RPC results are ready for you. Then your code runs, and when your handler turns out, the control goes back to the reactor, which will prepare the code to the next handler. So even though a lot of things are going on in parallel, turn turns to make sure that one of your functions is running only at one time, so you should not need any mutes, just keep the state variable so that your callback It can be ascertained that the current context is sufficient

asp.net mvc - What's the standard for safeley and legitimacy for bringing in contacts from other websites? (ie. Facebook, Twitter, Gmail, etc...) -

Check it out: Using Facebook as an Example : Is Facebook login considered sufficient because it is considered a legal / secure login or requires a full redirection on Facebook? I know that Facebook is trying to push Facebook connect, but I'm not sure if they still allow this kind of thing or something that they can get rid of trying. Any thoughts? I think the current state of art is in cross-domain data sharing.

scripting - java expression language that can't access 'unsafe' java methods -

I am working on a project where I will send users 'small' scripts to the server, and I execute those scripts Will do There are several scripting languages ​​that can be embedded in Java programs, such as mvel, ognl, eul, closer, rhino javascript, etc., but as far as I can tell, they allow all script writer Java constructors to call , Static methods, etc. I do not want my users to be able to call anything that I do not provide them (usually through any reference item) most of their script will be arithmetic and logical expression, in some cases They have to find the object properties (gates / sets) or the contents of the map. I do not want them to escape from the sandbox. Any suggestions? I think you can get it by the use of A.

oop - Is the function of interfaces primarily for using functions without knowing how a class is built? -

As I understand the interface, they are contracts, I explain it as contract term, that is what is specified in the interface Pre-open, close, read, write for an interface handling files). But is there a reason to redeem a difficult time that you will need an interface that tells what the class should do exactly, will not you know that you have written in the interface specification? The only reason that I can look for the interface is in big projects, where you want to use a class without actually knowing it has been created, you need to use it by looking at the interface Will be allowed to know about I wonder why I should use the interface in projects (or if I want to) that I am only working on it. I am quite convinced that there are more uses for this which I do not see. I believe most of my beliefs and interpretations and Writing a group of implementing classes is writing. You may have a pistol, a rifle and a machine gun, then, suppose that you decide to use these c

regex - Regular expression to delete HTML strings -

I am trying to remove the part of a string that does not match my pattern. For example, & lt; SYNC start = 364 & gt; & Lt; P class = KRCC & gt; & Lt; Font color = lightpink & gt; ABCD I would like to delete & lt; P class = KRCC & gt; & Lt; Font color = light pin & gt; How do I do this? Just match pattern 'and write that file or update the table of a database like this , You delete are left.

VB.NET/ASP.NET With and New keyword muddle -

Can anyone explain that new works with with this code examples from the MVC framework. routes {.controller = "home", .action = "index", .id = ""}} with new "MapRoute" ("default", "{controller} / {action} / {id}", Use this syntax to create an anonymous type in VB.Net It allows you to define a type on the fly with the set of name / value pairs, to change in properties of all kinds of names. If you open the reflected assembly in the mirror then you will be able to see these types. Do not fool you with the syntax part, with this feature nothing to do with reference feature of "V". other than the "." Prefix at the name of the value

c# - How to populate listview with a lot of information without blocking? -

I am creating an array of ListViewItems on a background thread and then I populate my list view with it on the UI thread. The problem is that if the array is too large ui block, the list viewer is updated. Is there any way to populate the list visibility with a small effect on ui? After What you can use in virtual mode is enough data to log in, so to do To set up ListView control property by true . This means that the ListView will not be populated in the traditional sense, but you will hook up the item handlers where the item is displayed on the list view in small pieces as the item is being displayed. Very Simple Example: Private List & lt; String & gt; _listViewData = New list & lt; String & gt; (); Private Zero ToolStrip Button 1_Click (Object Sender, EventEurge E) {_listViewData = GetData (); // Find the list that will show in the list view list View1.VirtualListSize = _listViewData.Count; // list size set} // RetrieveVirtualItem event private zero

c++ - Sprites in directx10 and texture filtering -

Is it possible to set different texture filtering when working with sprites? How can you be more specific about how Sprat is being portrayed? The idle filtering device is determined by the ID3D10SamplerState objects bound to it. If you are using the ID3DX10Sprite interface, it will not change shaders or samples for each set of sprites, only texture So whatever shaders and samplers are set before drawing sprites, it will be used - just before spraying the drawing, you set up a sampler with filtering mode.

file - How to find PHPs tmp folder relative to script running? -

Is it possible to find a PHP TMP folder on runtime? I am uploading files and I am using it for: $ _ files ['upfile'] ['tmp_name'] However, for one of the APIs I am using, it is necessary for me to give the full file path of the uploaded file relative to my script! It's a little annoying but will have to do it. How can I do this but any thoughts? Edit I am currently doing this because I know how many levels can go up but I'm sure that the TMP folder is different for different servers May be on. $ file = '../ ..' $ _ Files ['upfile'] ['tmp_name']; thanks Not sure that this is an easy way But it works on my server In addition, there is probably a way to change folder names .. but this is behind me. $ folders = explode ('/', $ _SERVER ['SCRIPT_FILENAME']); For ($ i = 2; $ i & lt; Count ($ folder); $ i ++) $ dir = '../'; $ Dir = substr ($ dir, 0, -1); $ Dir = $ dir $ _ Files ['upf

c# - Database Factory pattern with multiple databases -

I am creating a database factory pattern for an application that should be able to work with SqlServer and Oracle. I have used the same approach suggested in the following article: Now, the problem is that my application communicates with multiple databases on the same server for pre: I am running some queries against database DB1 and few questions are being run against DB2, both SQL Server, using the above article, I can make an example of a database I have multiple data Using the same approach to dealing with the press, how can you possibly do? Can somebody help me with this? Thank you. I recommend that you take a look at the repository pattern. With the use of a repository pattern, you can separate your application from the basic features. This allows you to communicate with one or more databases, web services, file systems or any other data source that is outside of your domain and the application direct control. With it you can make a basic structure that can communi

less - Unable to unbind a shell function -

Based on this question. I have a shell function function man () {man "$ 1" & gt; / Tmp / manual; Less / tmp / manual} There is command command in the problem. How can you change commands with your command? Change the person to "$ 1" with the path name: / usr / bin / Man or change it to use 'Which Man' within the backquotes? Then run your script in the current shell. On Bash / ksh you need to save your file in some files, say man.sh and then run it as './man.sh'. Cat & gt; Man.sh Function Man () {/ usr / bin / man "$ 1" & gt; / Tmp / manual; Low / tmp / manual} ^ d. ./man.sh You get this idea. You can define the function at any time: unset -f man

iphone - View not drawn correctly when switching views -

My app has 3 ideas. I switch between AppDelegate to switch between each view 3 helpful methods have defined (so that each view can call others), which looks like this: - (IBAction) goToView1 {if (view1 == blue) {View1 * ThisView = [[View1 alloc] initWithNibName: @ "View1" bundle: zero]; Scenario 1 = This view; } (See in UIView * window.subviews) [see viewFromSuperview]; [Add window Sweeview: Scene 1. View]; } If the user wants to switch to another view, then I put a button to define IBAction in the controller of the view: < Pre> - (IBAction) goToOtherView: (ID) sender {ViewSwitcherAppDelegate * root = [[UIApplication shared application] representative]; [Root goToView1]; } It works fine to switch all the scenes, but when the view is drawn it is displayed incorrectly, as it is ignoring the status bar: What am I doing wrong? When the app starts, it gets cured, so I suspect that there is something wrong with the way I am adding subviews in the wind

How to get XML structure with jquery? -

Is it possible to map the structure of an XML file with jquery? After calling AJAX, the client gets an XML file, but it does not know the file's node structure, how can we get all its contents? Thanks EDIT: Changing the node structure for the exam for this XML I can rebuild the exact node structure with jquery? & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Children & gt; & Lt; Children & gt; & Lt; Name & gt; Daniel & lt; / Name & gt; & Lt; Age & gt; 5 & ​​lt; / Age & gt; & Lt; Eye & gt; Brown & lt; / Eye & gt; & Lt; / Children & gt; & Lt; Children & gt; & Lt; Name & gt; Herold & lt; / Name & gt; & Lt; Mother & gt; Helena & lt; / Maan & gt; & Lt; Hobbies & gt; Painting & lt; Hobbies & gt; & Lt; / Children & gt; & Lt; Children & gt; & Lt; Name & gt; Catlin & lt; / Name & gt; &

windows - Executing win32 file ( using UpdateResource winapi ) in unix -

I think this is impossible, but I will ask it anyway. I have a windows app that can execute BeginUpdateResource / UpdateResource / endupdate resource Can I execute it on any Linux / Unix? Its server-side, so no GUI emulator can run. I'm not sure what is actually achieved with what may be, but it There can be a way to go near source code for applications that can be run. See also. Another option is to rewrite the functionality.

math - How to calculate a point on a rotated axis? -

How can I calculate a point (X, Y) of the specified distance on a rotated axis? I know which angle I liked "moving" in "degree" (in "degree") x = cos (a) * dy = sin (a) * d Where there is an angle and d is the distance. If trigonometric works, degree of radian int, you have to convert the angle by dividing it by 180 / pi.

iphone - How to add a subview in settings.bundle? -

I want to show my copyright statement as one subview in one of the settings. Bundle items I have googled for this, but no help was found. Does anyone know how to do this? It reads and properties and subviews makes it to match the properties. It may seem limited, but it's a deliberate move: it adjusts all the settings equally to make the settings app feel unified. You can create sub-plast in your setting bundle that defines "SubViews" and you are allowed to create the hierarchical preference interface. You can find information about the document here:. To display your copyright statement, you can define only one "PSTextFieldSpecifier" field from these sub-plasters. The user can then click on the "copyright" item in your prefix, and you can see the entire interface slide to the left to reveal your copyright text. Hope that helps! Ben

regex - regular expression to parse short urls -

I have a list of possible URLs on my site, such as 4 5 6 I want to be able to match all URLs like 6 and want to redirect them to But I I do not want to redirect. 5 url I tried to do something like this - ((*. * People | Groups) group)) \ r Something is wrong. Any help? Thank you You should check that this is not people Groups : (group! Group) group (. *) Right now you are seeing that regular expression What language / framework you are using by people or groups Can not be done on the basis to make sure that you are matching the whole string, ^ and $ < / Code> Use: ^ (?! People | group) (. *) $ You should also consider whether you Want to match URL, which starts with people , like http://dev.site.com/People2/ . So it can be better: ^ (?? (?: People | group) (?: / | $)) (. *) $ < P> Checks that a negative match URL for the people or groups is done after the end of the URL or slash. You want to make sure you do

Does 'And' vs 'AndAlso' matter with linq in vb.net? -

Is that the case if you are using 'and' or 'endoslow' in the linq query in vb.net? I know in normal operation 'and also' is short circuit and therefore will be faster, but I do not know whether it is in linq questions Does it make any difference if linq query is against database or against memory storage? Object queries from LINQ, it will definitely talk. For other LINQ providers, it depends on the provider at the level of expression tree, they are different but providers can translate it in the same way. For example, there is no similar assumption in SQL, so SQL from LINQ translates them into the same SQL.

objective c - How to get PDF chapter information with CGPDFDocumentGetCatalog? -

कोई भी नमूना कोड मैं देख सकता हूँ? हाँ / डेवलपर / उदाहरण / क्वार्ट्ज / पीडीएफ में "आउटलाइन" देखें।

iphone - How do you draw a cylinder with OpenGLES? -

आप OpenGLES के साथ एक सिलेंडर कैसे आकर्षित करते हैं? आपको ऑब्जेक्ट लोडिंग के माध्यम से यह करना होगा आप ओपन जीएल ES का उपयोग करके 3 डी आइड प्रिवेटिविटी पर कॉल नहीं कर सकते। जेफ लैमारके के ब्लॉग के माध्यम से देखो, वहाँ लोड करने के तरीके पर बहुत अच्छे संसाधन हैं।

"How to get the Google video's thumbnail image ? " in PHP or Javascript? -

I want to use thumbnail of Google Video in PHP or Javascript function function getScreen , Size) {if (url === null) {return ""; } size = (size === empty)? "Big size; var vid; var result; result = url.match (" [\? Amp;] v = ([^ & amp; #] *) "); vid = (result == = null)? Url: Results [1]; If (size == "small") { return "" + vid + "/ 2.jpg";} Other { Return "" + vid + "/ 0.jpg";} } You Tube Videos < imgUrl_small = getScreen ("uVLQhRiEXZs", 'small'); Here's a small script that you might want to work with: & lt; ? Php $ content = file_get_contents ("http://video.google.de/?hl=de&tab=wv"); $ Reg Ex = '| & lt; img class = thumbnail-img. *? Src = (. *?) |'; Preg_match_all ($ regex, $ content, $ result, PREG_PATTERN_ORDER); $ picture = $ result [1]; foreign Currency ($ images $ image) {echo $ image;}? & Gt;

visual studio - Stop VS from automatically opening the folder for the active item -

Just wondering if anyone knows how to stop the VS from opening folders automatically for active items. It does this on my work computer but I do not have the installation, but I can not find the setting that I need to change. Cheers Anthony Tools - > Options -> Projects and Solutions -> (General) -> Track Active Items in Solution Explorer

python - How to analyze IE activity when opening a specific web page -

I want to retrieve data from a specific webpage using the urlib library. The problem is that some data must be sent before the server to open this page. If I do this with IE, then first update some checkboxes and then press the "Display Data" button, which opens the desired page, by looking at the source code, I think that some type of "pressing data" Let's present the form - there is no specific URL address. I did not know by seeing the code sent to the server on the parameters ... I think the easy way to do this is to analyze the communication between IE and the webserver after pressing the "Display Data" button. If I can clearly see what IE does, then I could have copied it with urllib. What is the easiest way to do this? An HTML debugging proxy will be the best tool to use in this situation. As you are using IE, I recommend, because it has been developed by Microsoft and is automatically integrated with Internet Explorer through a plugin

sql server - delete duplicate rows -

Anyone know how to remove duplicate rows by writing a new way from the script below to improve the functionality. DELETE lt1 FROM #listingsTemp lt1, #listingsTemp lt2 WHERE lt1.code = lt2.code and lt1.classification_id & gt; Lt2.classification_id and (lt1.fap : Delete table_a where the row is not (Select the minimum (line) from Table_A group by Table 2, column 2);

sql server - run-time error '713' - Application-defined or object-defined error -

Hi, I have some software written in VB6.0 which uses a SQL Server, but I get this error: Run-time error '713' - Application-defined or object-defined error Do anyone know the reason for this error Is it? Is it related to this? Can a DLL be missing?

c - fscanf reading problem -

Sorry, maybe this is a stupid question. I have a file: 36 146 10 53 240 133 104 28 51 81 124 ... So I want to read numbers from a program , So I do: ... some functions ..... int i; Unsigned four key [16]; File * FP; Printf ("\ n ------ \ n"); // open filename fp = fopen ("key.txt", "a"); Printf ("Reading 128 bit key: \ n"); (Fscanf (fp, "% d \ t", and key [i]); Printf ("% d \ t", key to [i = 0; i & lt; 16; i ++] ];} Printf ("\ n ------ \ n"); fclose (FP); return 0; But when the program prints the results on the screen Just meet me: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ..... Any ideas? p = fopen ("key.txt") It is also a good idea to see that fscanf () to be truly successful in reading To view the value. Edit: I just saw: Unsigned four keys [16]; There should be an array of inner (I think - what this "key" means) is not very clear from the code: int key [16];

Mentioning the HTML TAG element before a CLASS or ID (Good or unnecesary CSS practice?) -

Actually, I want to know what is best to avoid future problems and confusions with CSS code. .. Naming the species of CSS like this: div # content ul # navigation div.float-left ( Is it really unnecessary?) Or just #content #navigation .float-left There is no experience so I want someone to tell me that HTML and CSS Which method is better for long-term use. Thank you in advance! It depends on what you want to do. #content will apply to everything with id = "content", but div # content only a & lt; Div & gt; With id = "content" Usually this is a problem with sections because all elements on an ID should be unique. Know the style information will apply to only a certain type of HTML elements, then include the element tag, by applying these elements in the same category (or with IDs, unexpectedly apply to different elements Can stop, but it's naughty).

unique constraint - Container which checks for the uniqueness of the content -

Is there a datatype / container in any language that checks the specificity of the content rather than the value or index item? Yes, it is called a set Most languages ​​are in some way Apply.

c++ - How does a hardware trap in a three-past-the-end pointer happen even if the pointer is never dereferenced? -

उसकी, हर्ब सटर लिखते हैं ... int a [17]; Int * endA = A + 17; के लिए (int * ptr = A; ptr & lt; endA; ptr + = 5) {// ...} [O] एन कुछ सीपीयू आर्किटेक्चर, जिसमें वर्तमान वाले शामिल हैं , उपरोक्त कोड उस बिंदु पर एक हार्डवेयर जाल उत्पन्न कर सकता है जहां तीन-अतीत-अंत-सूचक सूचक बनाया गया है, चाहे वह संकेतक कभी dereferenced हो या नहीं। कैसे एक बिटपाटन पर सीपीयू जाल? इसके बारे में ... int a [17]; // (i) हार्डवेयर इस जाल करेगा? Int * pugly = A + 18; // (ii) हार्डवेयर यह भी जाल करेगा? Int * pend = A + 17; ++ pend; // (iii) क्या यह मूर्ख होगा? Int * precious = A + 17; अहस्ताक्षरित लंबे समय तक tricksy = reinterpret_cast & lt; अहस्ताक्षरित लंबे> (बहुमूल्य); ++ धोखेबाज है; Int * pHobbits = reinterpret_cast & lt; int * & gt; (ट्रिक्ससी); बोनस प्रश्न: क्या वाक्यांश "कुछ मौजूदा सीपीयू आर्किटेक्चर" को साधारणतः शिपिंग उत्पादों को संदर्भित करने के लिए समझा जाता है, या इसमें काल्पनिक आर्किटेक्चर को शामिल किया जाना चाहिए, साथ ही यदि वे कहानियों के काम में हैं