Posts

Showing posts from September, 2014

windows - ACL Check/Management in C# -

I am thinking that there is a way to see user permissions against ACL of C #. I am creating a large system which is going to use Active Directory for authentication and I would like to use as much as I can in the windows security pipeline. After spending the past few hours browsing the System.Security.AccessControl, I'm not sure that it provides an easy way to check a user token against its ACL list. It seems that this window is too much for manipulation of the security descriptor, though there are enough abstract classes to implement custom systems. I have seen the Athz API which looks more flexible and a function AuthzAccessCheck which allows the reference to be checked against the security descriptor Is anyone else having the same problem and What were the pros and cons if you were looking at them? How is ACL stored and used? Is it possible to convert ACL entries to objects? If so, you can use the demand () method to check access rights, if users do not have access,...

select - Using MySQLdump for sub-set of database migration -

I want to teach myself how to get data from a database, but I use both my MySQL and mysqldump What I want to do is get a sub-set of a database in a new database on a different server, so I get two db / Create tables for creating tables and record data as well. Assume that my original DB has 10 tables, each of which has 100 rows. My new database will have those 4 tables (all original columns), but each 40 rows will have another sophisticated dataset. Those 40 rows are separated with some small SELECT statements, one for each table. I want to generate the .sql file, which I can call to load / insert from mysql Export Data How can I generate those SQL files? I have a HARD that you can make a select statement from mysqldump but do not see relevant examples with the statements I have selected. Currently I can output the SQL output which is the only column name, but there is no insert code, etc. Help is appreciated. You probably want to dump your tables at one time and where...

WPF DataGrid from WPF toolkit vs ListView - any benefits? -

I know ListView is very well, but DataGrid But never seen My question is simple - if you do not need editing in the list, then provide a profit compared to DataGrid what ListView Does it? Also, are there disadvantages of using DataGrid (more complex, performance, bugs, rigid to style etc.)? List view is just a control to read Normal Use list containing 'text description' To synchronize with. The datagrid does not lack anything in the list, such as multiple selection modes, styles, etc. However, provide support for some features at the top of ListView: Edit In-Place of Data Transaction related Edit > Auto-column generation Row details setting Actually there is a question - do you want in-place editing? If so, the data grid is a clear choice. If not, then both are quite similar.

why is embedding JSON in XML bad? -

My stomach tells me that it is wrong to put one format in another, but I do not seem to come for substantial reasons. & lt; Root & gt; & Lt; Accessories & gt; Talk & lt; / Stuff & gt; & Lt; More & gt; & Lt; [CDATA [{"one": ["b", "c"]}!]] & Gt; & Lt; / More & gt; & Lt; / Root & gt; Just put it in XML Two segments are going to be parsed by a rationally different code, but as an interchange format, is it okay to mix mix and syntax? Does your answer change if we have an existing ending point that parses JSON response? We have to remember this endpoint for XML ingestion. By using two formats, additional loads as an exchanging form are those people You want to inter-operate with you now they need the XML parser and a JSON parser. It also makes it difficult for people to mess with the format, because they have to switch gears while thinking differently to parts of your file. In the ...

upgrade - How can I update the schema of a single archetype object on demand in plone? -

I have hundreds of objects based on Planon Architectures (2.5.8 Explosives), which have their architectes schema in the latest Has been updated. . The basic schema migration tool is very good for objects with a small / medium number, but bringing my knees to my server to try to move them all where I always end the script. I would like to be able to update an object's schema, probably as a recovered object - is it possible? If not, then what is the other approach to updating the original schema in large Plans sites? Thanks in advance! After excavation through 2.5 catalog codes, I finally found an answer to a lazy schema update: Note that this Plone is 2.5.3 and that which I was digging through the stack 3 looks slightly different. For some objects where I have already optimized the process format, I upgrade to the form so that the form can display new fields and it is processed. For others only at the at_post_edit_script hook, because there are usually no mega critical sc...

c# - Windows Authentication, Custom permissions, WCF, Active Directory -

itemprop = "text"> I have a client / server project, communication with WCF (now designated pipes for now, but it can change - but I IIS can not use it). This project is integrated with Active Directory. This program is designed to give user permissions, which is usually not allowed by acting as a type of proxy, the user uses the client to "request" to work. is. Then the client works for the client, until the certain criteria are met. One of the criteria is that the user has permission to request this work. I need a way to guarantee the identity of the user for my WCF service, compare it to a database, and either work, or reject the job. How do I use Windows authentication for 100% guarantee? Mike There is a Windows certification for named pipes (Net Named PipBing below Scroll). You can do this for example ... Once you have the identity, you know that Windows has authenticated this user properly and you can do that identification in your DB. ...

ruby - How do you concisely get the average house price from an array of houses? -

@ हाउस एक्सचेंजों को मानते हुए निम्नानुसार सेट है: house1.price = 10 House2.price = 20 house3.price = 30 @ हाउस और लेफ्टिनेंट; & lt; हाउस 1 @ हाउस और लेफ्टिनेंट; & lt; हाउस 2 @ हाउस और लेफ्टिनेंट; & lt; घर 3 यह हमारी गणना का प्रारंभिक बिंदु है और हम एक घर की औसत कीमत खोजना चाहते हैं: कुल = 0 औसत = 0 घंटे के लिए @ घरों में कुल = = h.price अंत औसत = कुल /@houses.size यह सिर्फ एक औसतन पाने के लिए काफी टाइपिंग की तरह लगता है। क्या कोई बेहतर तरीका है? एक विशाल संग्रह पर विधि का उपयोग करें। इंजेक्शन आपको एक 'संचयकर्ता' (इस मामले में 0) के लिए एक प्रारंभिक मान में जाने देता है, फिर सूची में प्रत्येक तत्व को कुछ ऑपरेशन लागू करें, और संचयी के लिए एक नया मान अगली चलना में पारित किया जाए। संचयकर्ता का अंतिम मूल्य तब इंजेक्ट कॉल से लौटा है। तो इस मामले में, हम सभी घरेलू कीमतों को संचयकर्ता में जोड़ देते हैं, फिर अंत में कुल संख्या से विभाजित करें। आप मजेदार हो सकते हैं और संभवत: इसे कुछ रूबी कुर्सज़ के साथ और भी कम कर सकते हैं, लेकिन ये उचित रूप स...

How do you execute an INSERT statement using MySQL (in c++)? -

Google is failing me (or I'm failing Google.) I just Function, which executes the INSERT statement using the mysql.h library in CST. Not familiar with using MySQL, but what can I see in the file, make statement to you Should call mysql_stmt_prepare, and prepare a statement prepared to execute mysql_stmt_execute.

winforms - Exception Handling and User Friendly messages -

I am developing a winforms application and I would like to know what is the best practice for handling exceptions whenever I Exception happens when I display the required information to an exception dialog, i.e. message and stacktrace. In cases where I have a lot of confusion, in cases where I want to see only a friendly message from the user but at the same time make sure that the developer will get the necessary data for debugging. What is the best way to do this? I have not used it personally, but it seems a very good tool is your best bet The error may be to log on to the disk, so it should be available to anyone looking at it, but it should not pop up on the way to its users. If you want, you can open a window so that the user can ask you to submit exception information and stack trace through your web site (by clicking OK). Avoid sending personal information, which is probably not to send parameter values. EDIT: Oh, avoid saying "Exception and stack trace". S...

iPhone: Access a class from another class -

I want to create a program that parses an XML file and then updates the labels on 2 separate tab bar views On both of these ideas, I have a fresh button to update the result. What do I want to do, both visual labels are updated by either viewing I understand that AppDelegate is probably a good option to do this, but I tried to create classes that can use appellage but Since they are examples of a class, they have no value. I do not get any errors but do not update the labels, although the data changes, this is the method in my appellate which is called after the XML is parsed: - (zero) Callupdate Value {NSLog (@ "Updating Updating From Calling"); Home * Home Controller; Data * data controller; [Home Controller Update Value]; [Data Controller Update Price]; } One of the update methods looks like this: - (zero) updated values ​​{NSLog (@ "call home"); [Label 1 settext: [[Total data object overindex x 0] ObjectForreqi: @ "nodeshieldarrere"] Objec...

iframe - How do I pass a target parameter to a CakePHP redirect? -

I have a built in CakePHP module that is hosted within the IFrame. My parents' page needs a redirect target. I am using normal HTML: & lt; A href = "#" target = "_ parent" & gt; But how can I do this for a kPHP redirect? $ this-> Redirect ('http://www.url.com'); A "redirection" is actually done using the HTTP protocol, which means The user is completely transparent and no HTML is loaded. What you are trying to do is create a link in the HTML page. Therefore, you can not use the redirect () to do this, because the redirect () uses lesser layer than HTML. You have to create a page with HTML redirects (there are several ways to do this, Google will help you).

Problem running functions from a DLL file using ctypes in Object-oriented Python -

I'm sure this will not be an answer already or will not be stupid lately I do programming with several tools Was trying to create a test program to communicate between them. Although I have created some problems with a specific device, when I am trying to call the function, on which I have "masked" with the "docked" device when I use the interactive dragon shell, it is completely (Though lots of word clubbing). But when I implement the function in an object-oriented manner, the program fails, in reality it does not fail, it does not do anything, it is the first method that is called: (ctypes and ctypes.util import Is done) def init_hardware (self): "" in device "" auto ". Tuner ") VERSION_STRING = create_string_buffer (80) self.error_string = create_string_buffer (80) self.name =" Mori MT982EU "self.write_log (" Tuner DLL path:% s ", find_library ( 'MLibTuners')) self.maury = WinDLL ( 'MlibTune...

how to handle 1 value returned from sql in php -

$ query = "तालिका WHERE id = 1 से चुनें मान"; Mysql_query ($ query); यह डेटाबेस से डेटा का एक टुकड़ा देता है सभी तरीके मुझे पता है कि इस डेटा के साथ कैसे निपटना है mysql_fetch_array () और mysql_fetch_assoc () वहाँ 1 पेस डेटा से निपटने का एक तरीका है जिसमें इसे एक सरणी में खींचना शामिल नहीं है? ऐसा ही होता है जो आपको करना चाहता है। mysql_fetch_field (0,0);

objective c - Delete row UITableView issue -

I am using this code ... but it has terminated my application several times: ) - (zero) Table view: (UITableView *) TV Committee style: (UITableViewCellEditingStyle) forowAtIndexPathStyle for editing: (NSIndexPath *) indexPath {// FeedArray is NSMutableArray if (editingStyle == UITableViewCellEditingStyleDelete) {[self .tableView startUpdates]; [Fade removal object_it index: indexpath.ro]; [Self.tableView deleteRowsAtIndexPaths: [NSArray arrayWithObject: indexPath] with Row Animation: UITableViewRowAnimationFade]; } [Self.tableView and Updates]; } Why is this happening? Is there any other way to do this? I think that [self.tableView endupdates]; should be in the if {} block or [self.tableView startupdates]; should be before , if {}

security - Drag/Drop between medium/high integrity level processes in Windows Vista -

In Windows Vista, I am unable to drag / drop files on the window of my application because it is running as a process of high integrity level I . I need to run it as high, but I should be able to accept files left with low / medium integrity-level processes like Windows Explorer. I believe this is a UII that is blocking the drag / drop operation. I know that I can use the ChangeWebFilter function to allow some Windows messages to bypass the UIPI, but I'm not sure which message to add to the drag / drop operation. I want to changeWindowMessage Filter the right approach to allow, or is there a better way? Thanks! Considering the title of this blog entry: "", I think it The best way is not;) Now, it may seem like a great approach to the first - after all, you'll only use ChangeWindowMessageFilter when you are sure That you can fully validate a received message even if it is from an unreliable source, there is no way that someone is wrong, right? The probl...

http - How to change only the protocol part of a java.net.URL object? -

मेरे पास एक java.net.URL ऑब्जेक्ट है जो HTTPS प्रोटोकॉल का उपयोग करता है, जैसे: Https://www.bla.com और मुझे केवल इस यूआरएल ऑब्जेक्ट का प्रोटोकॉल हिस्सा बदलना है ताकि जब मैं इसे स्ट्रिंग () विधि को कॉल करता हूं तो मुझे यह मिलता है: http://www.bla.com ऐसा करने का सबसे अच्छा तरीका क्या है? आपके पास उपलब्ध तरीकों का उपयोग होगा: यूआरएल पुरानायूआरएल = नया यूआरएल ("https: // www .bla.com "); यूआरएल न्यूयूआरएल = नया यूआरएल ("एचटीटीपी", ओल्डयूआरएल.गेटहोस्ट (), ओल्डयूआरएल.जेटपोर्ट (), ओल्डयूआरएल.एफ़फ़ाइल (), ओल्डयूआरएल.जीटीआरईफ़ ()); एक और अधिक विशाल सेट () विधि है जो 8 आइटम लेती है, आपको उस के लिए अधिक विस्तृत यूआरएल की आवश्यकता हो सकती है। संपादित करें: जैसा कि मुझे सिर्फ बताया गया था , मैं ध्यान नहीं दे रहा था, और सेट () सुरक्षित है इसलिए यूआरएल तकनीकी रूप से अस्थिर है, लेकिन हमारे लिए मनुष्यों, यह अपरिवर्तनीय है तो आपको बस एक नया यूआरएल ऑब्जेक्ट का निर्माण करना होगा।

asp.net - How to dynamically show/hide a style sheet inside a content control? -

One content inside my head tag is a master page with placeholder control, so that I can easily add any content Can add (link tags, styles, script etc etc from content pages) Now, on one of the content pages, I have a style sheet (inline, i.e., inside a style tag, not linked to this, a link tag) that I can show / I want to hide (works like a wizard using multiview control on page page). I tried to wrap the stylesheet under the placeholder control in visible = false, then set the code to be visible to the right but that does not work, the style tag is not provided in the HTML I removed the placeholder control and styled Runat = "Server" was removed directly on the tag, but that did not work. The reason I keep the styles hidden in the first place is that they are formatting placeholders, i.e. {0}, {1} .. ATC, which I change to the code before showing the stylesheet. I do not want to send the styles to the client with these placeholders. To make it clear, styles look like...

g++ - C++ strange compile linker error -

I'm trying to compile a large C ++ project and I'm getting this weird error I know that This error is being linked but it can not be ascertained whether it is ok test_oqlquery.o :( rodata._ZTV8r_MarrayIhE [for vistor for r_Marray] 0x8): .. The undefined reference r_Marray & LT; Unsigned four & gt; :: ~ r_Marray () 'test_oqlquery.o :( rodata._ZTV8r_MarrayIhE [r_Marray & lt vtable; Unsigned four & gt;] 0xc):. undefined reference to r_Marray :: ~ r_Marray () 'test_oqlquery.o :( rodata._ZTV8r_MarrayIhE + 0x28) [vtable for r_Marray]:. `R_Marray: :: print_status undefined reference (std :: basic_ostream> & amp;) constants' What does this error mean? And, is it possible to see the line number where an error is occurring? how ? What do I mean primarily with In fact, my error is like this, but do not know why everything inside the angle. "Rodata._ZTV8r_MarrayIhE + 0x28 [for R_Marray vtable] "Concerned brackets are unavailabl...

What sort of return type does nHibernate use? List<T>? -

I want to create my database level so that I can swap it and use LINQ or whatever in the future. > In my abstract class (or interface), how should I use the results that return results / collections of results? What's the nHibernate return list? You must IList & lt; Should use T & gt; . NHibernate will always refer to the IList & lt; T & gt; and the documentation says: The name of the archive mapping is a clear place where Java and Net are shown. There is a lot of options in comparison to the system in Java's collection library. compilation. * & lt; List & gt; Map directly in an ILIST * & lt; Map & gt; Map directly in an IDictionary * & lt; Bag & gt; An IList map is a & lt; Bag & gt; Completely does not comply with the IList interface, because the add () method is not guaranteed to return the correct indicator, an object can be added without initializing ILIIT Either hide ILI from its API users or it is ...

Free Php encoder -

I do not know that this is the correct posting place, can someone recommend me some free PHP encoding software because someone Is not the money to buy one at present? Encoding PHP Script / Source Code Thanks. Which encoder are you looking for?

model view controller - When is MVC no longer applicable in large projects? -

After using some PHP frameworks as codeinitors and KOha for some small sites, I wonder if MVC It is still applicable for big projects and, if so, what practices do big sites do to prevent the use of caution in order to maintain clean clode? Does Amazon or Flickr code use MVC or some type of it? Is there a guide that has been given a certain problem, shows you how best to implement MVC for big projects? - Tangent - On an existing project using Kohana, I started what question should be the role of my model. Many times, a model can only tell a small part of the object that I am trying to make. I.e., requires an object for a user, so I removed my user from the user table using my Users_Model. But each user also has many items in their list, so I also have to use Users_Inventory_Model. But, in each inventory item, other tables are included along with it, and so on, until I feel that there is no need to reach many models to create a single user in my controller. Imagine doing this in...

visual c++ - How to Create a process in c++ to execute exe? -

I have an exe excecute which is available in some drives. How can I use this C ++? I am doing this way #include & lt; Stdio.h & gt; # Include & lt; Conio.h & gt; #include & lt; Windows.h & gt; Zero main () {STARTUPINFO si; PROCESS_INFORMATION pi; Xeromamari (and, shape (SI)); Si.cb = Size (C); Ziromori (and p, size (pi)); If (CreateProcess (L "c: \\ DOTNET.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, & SI, and PI)) {printf ("Create process failed (% d) N ", GetLastError ()); } Other {printf ("metaphor building success"); } Waiting Singing Object (pi.hProcess, INFINITE); CloseHandle (pi.hProcess); CloseHandle (pi.hThread); Getch (); } But each time with this error message 2 the process creation failed (i.e. the specified path can not be found) but i dotnet Exe to place only on c: \ DOTNET.exe. Anyone suggesting what is wrong with the above code.can ... Any help is greatly appreciated .. Thabs Advance I hav...

Specifying read-only session in ASP.NET MVC -

Is there a way to specify that a given controller or work uses session status in the read only manner is? In "old" ASP.NET, we used to do something like this: & lt;% @ Page EnableSessionState = "Read Only"% & gt; Is an asp.net mvc equivalent? I allow my application to give multiple requests simultaneously from the same client and completely shutting down the session - I have no choice. The same question was asked here: Approved answer is a custom root handler Is to create which ends binding for the session at the end. It does not really answer your question (which is to declare many actions to use only session access to read), but it seemed remarkably remarkable.

touch - Blackberry Storm Emulator - TouchGesture events not firing, how to get a Swipe to work? -

playing with a storm emulator and 4.7 JDE, for my life, I can not understand how the fire can fire Events in Emulator The bottom is a touch event code for the Sample App, EmbeddedApadMoz. It sounds quite straightforward, but touch Gesture.getEvent () == TouchGesture.SWIPE does not seem to really register. How can I register swipes in emulator? With my mouse, I try to left-click and drag, but it does not look like it. / ** * @see field # touchEvent (TouchEvent) * / Protected Boolean TouchAvent (TouchAvent Message) {Boolean = Distorted; If (_mapField.isClicked ()) {Touch Gesture Touch Gesture = Message.zstચર (); If (Touch gesture! = Null) {// If the user has a swipe signal then we will move the map accordingly I (if touchGesture.getEvent () == TouchGesture.SWIPE) {// Swipe the amount of swipe again So that we know how to move the map // away? Int magnitude = touchGesture.getSwipeMagnitude (); // Move the map in the direction of the swipe. Switches (Touch Zestary.JetsWeight Dir...

asp.net mvc - How to upload files larger than 16k to a WCF-service? -

एक लंबी कहानी कम करने के लिए: वेब अनुप्रयोग बनाना प्रत्येक उपयोगकर्ता प्रोफ़ाइल में बस एक प्रोफाइल छवि है, जो डेटाबेस में संग्रहीत है नीचे की परत एडीओनेट इकाई ढांचे का उपयोग करती है अनुप्रयोगों के नीचे डेटा एक्सेस परत पर डेटाबेस में छवियों को सम्मिलित करना ठीक काम करता है शीर्ष स्तर पर, एक एमवीसी आवेदन में, हम प्रोफ़ाइल छवि को प्रदर्शित करने के लिए WCF का उपयोग करते हैं। छवि प्रदर्शित करना ठीक काम करता है, चाहे आकार क्या होता है, जिसका मतलब है कि अपलोड करने वाली छवियां एकमात्र समस्या है। मेरे अपलोड चित्र-फ़ंक्शन में मैं 16k तक चित्र अपलोड कर सकता हूं। कुछ भी बड़ा नहीं है। मुझे सभी app.config और web.config-files में सभी maxBufferSize और maxReceivedMessageSize गुण मिले हैं समाधान में, और मूल्यों को 1 एमबी (1 048 576) में बदल दिया यह मुझे जो त्रुटि मिलती है: फ़ॉर्मेटर फेंक दिया संदेश को deserialize करने का प्रयास करते समय एक अपवाद: पैरामीटर को deserialize करने का प्रयास करते समय एक त्रुटि हुई थी। इनरएक्सेप्शन संदेश था 'प्रकार माइग्रोइज के ऑब्जे...

python namespace hierarchy above object -

For example, if this code is included in some modules then class C: Class C2: DRF g (self): @ print namespaceboughdeff (): pass then the print name page above will be defined so that this code is some such output [Some_module, C, C2, g] doing this There is no way of code, as presented, there is no output - the body of G (in which deco With the rator you want to print) just does not does not unless it is called live. I believe that you really do not intend to produce anything of yourself for "this code", but rather intend to add a call like CC 2 () [which will actually output]. There is really no very effective way to do this - you should start (well, the decorator ;-) at the module level (which you can call globals of f You can identify through the decorator's logic: its name is f.func_globals ['__name__'] and through its name you can call it sys.modules ), You should walk down to every possible series, as long as you have your calling...

xaml - How exactly do Attached Properties work in WPF? -

How do I'm a bit misleading how attached properties actually transmits its values ​​to the parent or child elements I TextElement.FontFamily that the property was assigned to value (a seemingly perfect reason to get the elements of the child's parent) to the downstream operations, baby grid. Column creates an original item to display that child in a special item (a seemingly upstream operation, for the child's parents). How to find attached property values ​​either to flow or down? It's wrong in your conception that there is a piece missing that will put all this in perspective, or & Lt; Column width = "*" /> & Lt; /Grid.ColumnDefinitions> & Lt; Button grid Column = "1" content = "my button" /> & Lt; / Grid & gt; & Lt; / StackPanel & gt; There are two concepts: Dependency Properties and Enclosed Dependency Properties , "Attached Properties" are dependency properties, and su...

PHP session lifetime problem -

I am using PHP5 here I have created a login system which checks the username and password against the records in the database Does. I want to use the session to store the logged value. For example, when I reach the area where I "login" the user: if ($ errors = 0) {$ _SESSION ['log'] = "1" ; } The problem is that I want to be active for 5 minutes, when I do a , for the $ _ session ['log'] ($ _SESSION ['Log'] == "1") Also, after this false refund, I would like to delete this session after the user closes the browser. Actually, I want a session configuration so that the user can safely leave his desk and when he refreshes after 10 minutes or after the browser closes again, the session is already deleted, And entry can be restricted Can anyone help? Thank you. Use Note that by default, this Is set to 0 , which means that the cookie is set as long as the user does not exit the browser. You can do it in the followin...

jquery - How do I remove letters and dashes and dollar signs in a string using a regular expression? -

I am trying to find all the letters and dash and dollar signals and remove them from a text box. function numbers (only) (if ($ ('. Sumit'). Val (). IndexOf ([A-Za-z- $])) {$ ('. Sumit' Replace .val (). ([A-Za-z- $], "");}} That's what I have and I'm pretty sure this is wrong. I am not very good with regular expressions, but I am trying to learn them. Does anyone want to help me and start with completing this function? So ... You have got the input. Then you got the function: numbers = function () {$ ('. Sumit '). Val (). Replace (/ [A-Za-z $ -] / G, ""); Warning ($ ('Sumit.') Val ().); return false; } I am alert to determine whether the replacement is working or not. It's not like this. Mark for all non-digits If you want to remove only letters, dashes, and $, But (for example leaving the decimal), your origin should do this amendment: $ ('. Sumit'). Val () .replace (/ [A-Za-z $ -]...

how can I parse xml data in php -

I am trying to figure out how it will work for testing purposes , I have created two websites. I'm calling a RAST service from each other I pull XML data with file_get_contents If I resonate it, then I would use a string data Can see But how can I use simpelxml to remove data from nodes? If I use simplexml_load_file ($ url), I get some error on which the XML declaration is starting from the document? I have it in testfile $ xml & lt; / h3 & gt; & lt; br & gt;"; ? & Gt; This was XML I sent to. I send it from a class file which I add to my PHP file above if I'm sure the web service has been called, maybe what to do with the announcement error ? header ('content-type: text / xml'); Echo "& lt;? Xml version = \" 1.0 \ "? & Gt; \ n"; Echo "& lt; reaction & gt; \ n"; Echo "\ t $ status_code & lt; / status & gt; \ n"; Echo "t \ t Geen gt; \ n"; Ec...

Splitting an Access database into a front and back-end -

OK, so I split my access database, and now I have backend: If I started a new brand of brand, a brand new query, and within a db_be.mdb, a brand form for a different purpose would be connected to it in the "Front End" DB as I would like it to be in the backend What was saved or what do I have to import it? If I have to import the above, then how do I make the table in the back and just connected to the front end ... "link table"? At this point, if I make an MDE, then still the total three (back end, what is front end, and finally an MDE) will be ?? Generally, only tables in BE require full position in the EE / BE database, thanks people And everything in the EF You create a table in BE, then open your EF and link the table. You can use Link Manager (Tools / Database Utilities / Linked Table Manager) or directly (Get File / External Data / Link Tables), then you can create your Form / Query in EF. When you make MDE, it will be a third, separate f...

java - Best Security Framework to secure and authenticate an iPhone app which uses REST? -

I created an iPhone App Transferring data via ... Question (s): (1) What is the best way to secure the login / authentication of this iPhone app? (2) Is there an open source or business framework used to achieve this type of functionality? So far I have come to Oath, SAML and Rest Identity Services (3) Does this framework require SSL? (4) Does this validate the customer (not just the user)? (5) Am I going wrong about this? Should I just use an encrypted token which is necessary for each single call and install SSL? If someone understands my plight and can help, I would appreciate it ... I know that it can be done in any way because on an iPhone app because of Bank of America and Amazon There is such a login feature and security. Happy coding, Mike In early June, I used jogsi for server, othe (via) and java fx client Did on The code is experimental, but it can be useful to you - see - especially the comment # 2. I use XML, however, since Oath works...

linux - What's the best way to check if C code has deprecated POSIX calls? -

I'm working on some older code. I came to know that some POSICs calls are now outdated and marked degraded in manual pages. What is the best way to check whether your code is still excluded in POSICs call? I'm thinking about this: The special GCC Alert option. Call any type of Lint device to detect them. ( Things that you like can be disliked (-countiful flag). / P> This type of problem is routinely combined with the C and C ++ codebase. In addition to this, and perhaps more importantly, the static analysis tool is very much widespread issues and bugs You can never have too much static code analysis, using many tools benefits.

change default character set of PHP functions like "htmlspecialchars" -

I am using PHP 5.2.6 and my app's character set is UTF-8. Now, how should I change the default character set of PHP? Not so that specifies the output of the mime time and character set. But for all the PHP functions that will be changed such as HTML, specialist, htmlentities, etc. I know, there is a parameter in those tasks that take the character set of the input string. But I do not want to specify for all the functions I use. function myHtmlize ($ str) {return htmlspecialchars ($ str, ENT_COMPAT, 'UTF-8'); } Me too, do not like this solution. I really want to tell PHP, that by default 'UTF-8' should be taken as a letter set. No 'iso-8859-1' Is this possible? Like this one? * For all given below * LC_ALL, see LC_COLLATE for strings comparison, strcoll () * See LC_CTYPE for character classification and conversion, for example strtoupper () * for locCale LC_MONETARY () * LC_NUMERIC separator for decimal (see also localeconv ()) * ...

sql server - SQL Rotating numbers -

I want to make a rotation argument in SQL as if it is believed that 3 numbers are 1,2,3, the first week 1,2 will be selected next 3,1 next 2,3 and so on ..... If 4 numbers are 1,2,3,4 then 1,2 next 3,4 next 1,2 so many .. In this way ... I want to generate numbers in the SQL server. Please help me You do this: declared @cnt int, @ Select ofs int @cnt = count (*) Set TheTable from @ofs = (((@week - 1) * 2)% @cnt) + 1 Select * TheTable where between @ofs and @ofs + 1 union Choose the number of *, from TheTable where choose the number between @ofs - @cnt and @ofs - @cnt + 1

Managed File Transfer - any viable open source options out there? -

I am currently looking at the option to replace our existing BSSP and unsupported MFT souls, the usual Ipswitch, XV and Sterling type Along with the solution, I was wondering if anyone knows any serious open source offerings currently available?

bash - How can I programmatically verify if a CYGWIN app is installed in a SH script? -

Here's the situation: I am writing a sh deployment script which is the command install in an RSYNC signboard. After this, I want to send an e-mail to the development team that it has been deployed with some details. I will use "EXIM" to send mail from CYGWIN. This is the thing that, EXIM is optional only when installing CIGVIN and if I can not install it then I would like to skip my SH script. Thank you in advance! # bash script (should also work with sh) echo "this is not Is "

excel - How do I install Spreadsheet::WriteExcel on Windows with ActiveState Perl? -

I have installed Perl version 5.6.1. But it does not support so I installed 5.10.0. Now I am writing a program that writes data in Excel using Perl. For this, I have to use it, but when I was installed, it was not installed. So now I have to install the second version of Pearl or only? If the spreadsheet :: WriteExcel is enough, what do I have to do? There will be a way to bring either your OS / Distribution combination to either precompiled or source packages for example , With Windows on ActiveState Perl, you can C: \ & gt; You can use. PPM Installed Spreadsheet :: LikhaxXcel You can also find useful too.

iphone - Disabling Keyboard -

रिटर्न कीबोर्ड दबाकर कुंजीपटल छुपाने के लिए कुछ चीजें हैं जिन्हें आपको याद रखना चाहिए नंबर # 1 भाग डेवलपर्स को सेट करना भूल जाते हैं कि टेक्स्टफ़िल्ड का प्रतिनिधि है। यदि आप इंटरफ़ेस बिल्डर का उपयोग कर रहे हैं, तो आपको याद रखना चाहिए कि आपको फ़ाइल मालिक के लिए textField यदि आप इंटरफ़ेस बिल्डर का उपयोग नहीं कर रहे हैं, तो सुनिश्चित करें कि आप टेक्स्टफ़ील्ड के प्रतिनिधि स्वयं को सेट करते हैं मैं रिटर्न टाईप भी इसमें शामिल हूं। उदाहरण के लिए यदि TextField को gameField कहा जाता है: gameField.delegate = self; GameField.returnType = यूआइटरनकेडीन; आपको अपने ViewController के लिए UITextFieldDelegate भी कार्यान्वित करना होगा। @interface YourViewController: UIViewController & lt; UITextFieldDelegate & gt; अंत में आपको textFieldShouldReturn पद्धति का उपयोग करने की आवश्यकता है और [textField रेजिनफ़्रेंस रियरपॉन्डर] - (BOOL) textFieldShouldReturn: (UITextField *) टेक्स्टफिल्ड {[textField इस्तीफा फर्स्ट रेस्पॉन्डर]; हां वापसी; } आपके सभी टेक्स्टफिल्ड ...

user interface - VB.NET GUI choices -

Do you see me the GUI option for VB.NET for non-Windows? I need free but allow that off proprietary code with license thanks. By yourself: I definitely want to be an attractive Looking at the GUI and nothing else "windows" Generally speaking, this is bad Windows applications should look like a Windows app. Otherwise hell will break loose: However, consider WPF to achieve a rich UI framework.

html - Stop Visual Web Developer from putting "span lang="en-us" tags -

I understand how the VWD styles apply, depending on how you can modify the text formatting , And found that it keeps putting a span lang = "en-us" tag in front of things. Google's check did not generate any item for the VWD, so I thought if anyone knows to stop adding this tag then can I ask? Thank you! Google's results indicate similar problems in this 'family' products (frontpage, expression web) Do you try to resolve these products? Like the language specified in the HTML tags? & lt; Html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml: lang = "en" & gt; Source:

php - LAMP: Set Document Root for Specific Directory -

So I have to upload the CMS so that I'm making my company's server development area to show. But the software I created was created in the document root, and the company wants to upload me to a folder on the server to set the document route dynamically with PHP, or .htaccess in a single folder on a server Or is there any way to include something like that? I think that I can also create some global hostilities DOCUMENT_ROOT = dirname (Dynamite (__ file__))); And the context that is in the beginning of my path, but I am looking for a more elegant solution. You need to define your base based on which is available in your application. If the client is antis to look at their work, then ask them to register a subdomain to put it down.

c# - Convert or map a list of class to another list of class by using Lambda or LINQ? -

How to change the list of MyData in the second list of MyData2? For example: list & lt; MyData & gt; List1 = New list & lt; MyData & gt; (); // Somewhere 1 is a Populated List & lt; MyData2 & gt; List2; // Now I need list2 from list 2 to get List2 = ... how to use similar LINQ or Lambda? Here I tried it but I could not detect the code: list2 = (List of X 1 where list1.PropertyList = = tap new select MyData2 (null, x.PropertyB, x.PropertyC) Union (1 lists the list of top list. property list! = null new MyData2 (/ * * how to Propianist * / y.PropertyB, y. how to)) Kolist (each item in PropertyC); While Maidata 2 is a CTR (string, string, string). If there are two different types, you'll use the same list to map to the new list. list2 = list1.Select (x = & gt; Add new MyData2 () {// your variable mapping PropertyB = x.PropertyB, PropertyC = x.PropertyC}) Kolist (); edit : now that you've changed your question you are that y...

ruby on rails - Problems getting AJAX effect to work with RubyOnRails -

I want to delete a line from an HTML table generated by some rail code and I should "slide" the other rows "In the new situation." I am new in this way and I am sure that I have made a simple mistake. Here is a partial code to generate table row: & lt; tr id = "ride_ & lt;% = h ride.id%>" & gt; & lt; td> & lt;% = h ride Name% & gt; & lt; / td> & lt; td & gt; & lt; / td> & lt; td align = "right" & Gt; & lt;% = h Verti_restriction% & gt; & lt; / td> & lt; td & gt; & lt;% = link_to_remote 'remove' ,: url = & gt; {: action = & gt;: destroyed, ride_id = & Gt; Ride.id} ,: html = & gt; {: Onclick = & gt; "effect. SlideUp ('ride_' + Ride .id.to_s + '' ') "}%> & Lt; / Td> & Lt; / TR & gt; And here is the partial HTML generated: & lt; Tr id = "ride_130" & gt; ...

Javascript RegEx: Get all text matches surrounded by some other text? -

In Javascript / jquery, I want to get all the text that is seen between any other text. For example, if the HTML document was in: & lt; B class = "blah" & gt; Blast Some Lessons 1 & lt; / B & gt; & Lt; Div id = "foo" & gt; & Lt; B class = "blah" & gt; Blast: Some text 2 & lt; / B & gt; I want to get an array containing 'some text1' and 'some text2' because they are ' and lt; B class = "blah" in between & Gt; Blast: 'one' & lt; / B & gt; ' Since you mention jQuery, just select all the correct nodes and Check their text. If you want you can put a regx here, but it is not needed. & lt ;! DOCTYPE html public "- // W3C // DTD HTML 4.01 // EN http: //www.w3.org/TR/html4/strict.dtd"> & Lt; Html lang = "en" & gt; & Lt; Top & gt; & Lt; Title & gt; Trial & lt; / Title & gt; & Lt; Meta http-...

memory - Reading part of a file in C using fread() and fseek() -

I am trying to read a file in buffer size block in BLOCK_SIZE (current My code initially reads the whole file (usually 2-4) to find the number of blocks to read it (usually 2-4), then to the same 1000 unsigned letters , then Repeats through the loop to read the file (" + 17 + filename ", which is required for everyone in the program later However, for the first time only, when j = 1 , is this actually the data to the buff array. In other cases, when J! = 1 , Returns 0 . I think the problem is either fseek ( ) Using to read the file before or before the memory allocation problem. Any help can be found at 1000-1999 th The file should be appreciated for reading in the buf array. Attached Distributing the relevant part: unsigned char * buf; Source = fopen (locat, "r"); Temp = filesize / BLOCK_SIZE + 1; For (j = 1; j & lt; = temp; j ++) {if (j == 1) {buf = (unsigned char *) molk ((size (unsigned char)) * (BLOCK_SIZE + 17+ filename ))...

ruby on rails - ActiveRecord Join table for legacy Database -

My legacy database is that I am working with ActiveRecord to work with I went into a problem with joining tables I have the following: class TV show & lt; ActiveRecord :: Base set_table_name "tvshow" set_primary_key "idShow" and class episode & lt; ActiveRecord :: Base set_table_name "Episode" set_primary_key "idEpisode" end And then I have a table called TVSolinkPeks with 2 fields: idShow, idEpisode so I have 2 tables and connect them (Many for many relationships), although it uses non-standard foreign keys. My first thought was to create a model called TV Shops Epicink, but not the primary key. The idea was that since foreign keys are non-standard then I can use set_foreign_key and I have some control. After all I'm TeeShosho I want to say something like (Previous). Episode or episode.fund (: last) .tv_show How do I get there? I believe that you can be a little more beautiful than the answer to Alvaro. , Though its an...

javascript - Is it possible to send custom headers with an XHR ("Ajax" request)? -

I am working with an API that requires additional security information with an additional HTTP security, because Meta in the header - is it possible to set them in an XMLHttpRequest? Yes, current 6. December 2012

ruby on rails - Implicit user creation with Authlogic and Authlogic OAuth plugin -

I am trying to write a simple oyph consumer app in Rail. I am using Authlogic to handle authentication and I am using the Oath Scientific OAuth plugin to do ahath thing. The Oath Plugin provides some helpful helpers to submit the sign in button: oauth_login_button and oauth_register_button With Authlogic logics and requesting plugins, these two buttons in some way create sessions / users. What happens next is as follows: - If I use the oauth_login_button assistant, then the session fails to save the object because such a user is not locally - if I use the oauth_register_button assistant So, first, on any login, Rail complains that the token has already been taken ... This means that it can not make a second copy for the same user, which is correct. / P> The issue is that: I do not want to have both register and login button on my site. In the user's favor, what I want to achieve, is a button in the beginning, saying smth. Such as "Sign in with Twitter", on w...

jquery - The $ dollar sign -

मेरे पास ऐसा कुछ सरल है: $ (selector) .append ("somestuff "); लेकिन जब से मैं चयनकर्ता का पुन: उपयोग करने जा रहा हूं तो मैं इसे कैश करता हूं: var $ selector = $ (चयनकर्ता); इसलिए मैं इनके साथ समाप्त होता है: $ selector.append ("somestuff"); मेरा सवाल है, क्या मुझे ऐसा करना चाहिए, या मुझे करना चाहिए: var चयनकर्ता = $ (चयनकर्ता); selector.append ( "somestuff"); या तो एक की कोशिश कर रहा है, दोनों काम करता है कौन सा विधि सही है, और क्यों? $ (चयनकर्ता) में घोषित किया गया है क्योंकि $ में $ selector अनावश्यक है संपादित करें उत्तर के लिए धन्यवाद यह बहुत सरल और बहुत स्पष्ट लगता है फिर भी, इस बात पर असहमति दिखाई देती है कि मुझे चरम पर $ का उपयोग करना चाहिए या नहीं हर किसी के लिए एक जवाब देने के लिए वोट करना अच्छा होगा। :) मैंने इसे दोनों तरीकों से किया है आप जो कर रहे हैं वह नाम '$ चयनकर्ता' नाम से एक चर बना रहा है, इसलिए वे कार्यात्मक रूप से समतुल्य हैं इसके बारे में अच्छी बात यह है कि यह उन्हें jQuery के ऑब...

performance - JavaScript "classes" -

Is there a downside to using JavaScript "square" with this pattern? var FooClass = function () {var personal = "a private variable"; This.public = "a public variable"; Var personalization = function () {...}; This.publicfn = function () {...}; }; Var foo = new FooClass (); Foo.public = "bar"; Foo.publicfn (); What are you doing in your example "class" pattern people do not have JS Think in - Generally people are thinking of more "normal" class models of Java / C # / C ++ / etc., which can be fake with libraries. Instead your examples are really quite normal and good JS designs, but for perfection, I will discuss your personal differences between personal and public "members" var private = "a private variable"; This.public = "a public variable"; Accessing personal from any of your work will greatly speed up access to public because is replaced by private With a steady look...

Safe emailing of software -

Some people bought their application through PayPal (which is not DRM) I did not include updated functionality within (bad idea.) Now when an update has happened, I thought I could email all those old customers to install the updated version link. Unfortunately, this idea is open to attack (just copy and post link to the forum) so that it has been rejected. The app I bought with a secure link, which are not so open to attack, how can I email them all? Thanks, Isaac Maybe consider this: Upload an updated package to your website / FTP Protect it. Send a link to the login page for each customer There should be a parameter on the querystring in each link - a GUID probably, for one time use. Ask the user to enter their email address, and make sure that they match the GUID registered for that email address. Once downloaded, do not download more with that email address GUID; Write a small DB (i.e. sql) If the customer needs to download it more than once, then email them...

java - Pros and cons of using BlazeDS or web services as the remoting and messaging technology between Flex view layer and Spring business layer? -

In my company, we are going to use Flex 3 for the presentation layer of a new financial web application, and the business layer There is still debate about Spring but the best message / remoting technology is going on. Can you share your own experiences with the use of one or the other technique in terms of professionals and ideas? Use my experience, BlazeDS unless you need to use web services, Professionals: less server-intensive, less customer parsing time, small data package (this is binary), which means that you can use different types of techniques. This is a quick call overall. Members can subscribe along with published / subscription. Cons: Non-Flex is not compatible with the end of the front (although it is open source, so in principle, it can be.) Webservices Installed, very easy to read and translate cross-platform issues. Cons: More literally, if you use internal translate of XML objects of XML, then the client has to do some intense parsing. If you use obje...

Free Plug-in to show caller-functions in vb.net? -

Many times I look at the codes written by others, and while browsing on the function I have to see where this function Is called from. Even when I debug my code, I get a useful feature: P This feature in C ++ is the default in Visual Studio (it's called browse-something) , But I have not got any such thing for VB.NET so far, Right-click on the name of the function and use "Find References"

sql - mysql_num_rows error -

$ msgs = mysql_num_rows (mysql_query (" SELECT * संदेशों से जहां प्राप्तकर्ता = $ userID और पढ़ें = 0 ")); एखो $ msgs; उपरोक्त कोड काम करता है अगर मैं "और पढ़ें = 0" निकाल देता हूं। लेकिन अगर मुझे नहीं मिलता: चेतावनी: mysql_num_rows (): आपूर्ति की गई तर्क एक वैध MySQL परिणाम संसाधन नहीं है left_menu.php में लाइन 16 पर । मेरे पास तालिका में एक क्षेत्र है (`आईडी` इंट (10) अहस्ताक्षरित नहीं नल एयूटीओएनसीएआरएमेंट,` प्रेषक` को नहीं भेजा गया है, तो समस्या क्या है? पढ़ एक आरक्षित कीवर्ड है, इसलिए यह एक MySQL वाक्यविन्यास त्रुटि उत्पन्न करता है। हालांकि, MySQL प्रांप्ट पर, यह काम करता है: SELECT * संदेश से WHERE प्राप्तकर्ता = 1 और `read` = 0; आपको इसे अपनी PHP क्वेरी में बैकक्वाट करना होगा।

ide - How to change background color of 'code definition' window in Visual Studio 2008? -

सवाल के लिए शीर्षक देखें "ओपन टूल्स-> ऑप्शन-> फ़ॉन्ट्स और कलर। टेक्स्ट एडिटर का पृष्ठभूमि रंग और सभी टेक्स्ट टूल विंडो बदलें।" हालांकि वहां एक बग है: "मैंने वीएस 2008 में कोड परिभाषा विंडो के लिए पृष्ठभूमि का रंग बदल दिया है। हालांकि, जब मैं वी.एस. को बंद करता हूं और इसे फिर से खोलता हूं, तो पृष्ठभूमि का रंग डिफ़ॉल्ट रंग में लौटाता है।" माइक्रोसॉफ्ट: "इस बग की रिपोर्ट करने के लिए धन्यवाद। हमें बीटा 1 के लिए इसे ठीक करने में समय नहीं मिला, लेकिन आपको इसे वीएस 2010 के अगले रिलीज के लिए तय किया जाना चाहिए।" त्रुटि रिपोर्ट और एक पैच से लिंक जो समस्या को ठीक करेगा।

debugging - How do you log to Firebug from an extension? -

I am writing an extension for Firefox, and I have to log some data into the FireBox console, under the scope of my addon Within, "console" is undefined, and "window.content.console" is also undefined. So how do I access the console? Since you are not writing javascript that executes in a window, console is not defined. So you first need to refer to the firebug extension: Firebug.Console.log (str);

jquery - How can I make this javascript more efficient? -

I am getting a piece of plain HTML from AJAX request. & lt; H1 & gt; Title & lt; / H1> & Lt; Div & gt; Content & lt; / Div & gt; This is the simplest form for each title in a and lt; H1 & gt; is tagged, and a containing the content and lt; Div & gt; tag I have a well-formatted container in the html page, which needs to be populated with the returned HTML snippet. This container is: & lt; Div id = "container" & gt; & Lt; Div class = "header" & gt; & Lt; / Div & gt; & Lt; Div class = "content" & gt; & Lt; / Div & gt; & Lt; / Div & gt; I use the following JavaScript function to parse html and put it in the container . Function Load Communication (ID, Data) {var Container = $ ('#' + ID); Var title = ''; Var content = ''; $ (Data). Filter ('H1: First'). Each (function () {title = $ (this) .html (); content = $ (thi...

c# - How to use WebResponse to Download .wmv file -

I am using the following code to capture a wmv file through a WebResponse. I am using a thread to call this function: Cast object on static zero GetPage (object data) {// ThreadInfo ThreadInfo ti = (ThreadInfo) data ; // Request WebResponse wr = WebRequest.Create (ti.url) .GetResponse (); // Display value for content-length header console. WrightLine (ti.url + ":" + wr.Headers ["content-length"]); String to twenty-two = @ "C: \ Users \ Kevin \ download \ temfile" + wr.ResponseUri.PathAndQuery; StreamWriter streamWriter = new streamer (toBeSaved); MemoryStream M = new memorystream (); Stream Received Stream = wr.GetResponseStream (); (StreamReader sr = new streamminder (getstream)) using {while (sr.Peek ()> = 0) {m.WriteByte (byte) sr.Read ()); } StreamWriter.Write (sr.ReadToEnd ()); Sr.Close (); Wr.Close (); } StreamWriter.Flush (); StreamWriter.Close (); // streamReader.Close (); // Parents know that the process is done ti.are.Set (); Wr.Close (...

database - Is there a library which handles the parsing of BIND zone files in Python? -

This is related to BIND, but in this situation I am trying to see if any zone is a Collecting data in a database with files, lists, or some other manageable data structure, with the ultimate goal. I am using BIND 8.4.7 and Python 2.4. I may be may be able to understand the management to use the subsequent Python version, if necessary, but at this time the BIND version is non-negotiable. The ISST can meet your needs, it is at the top of the dnspython, which will be an optional API .

iPhone app stop rotating after few touches or sometimes stop rotating at all, other times works just fine. Any idea where to look for the problem? -

The iPhone app is moving after a few hours or prevents it from rotating sometimes, else works fine any time Where is the idea looking for the problem? My app is designed to support auto-rotate and works fine even before I add some code that loads JSOn data in the second thread. Are you trying to rotate through another thread? If this is the case then you should make those calls on the main thread. UIKit thread is not secure, nothing on the main thread has not been guaranteed. To select what you need to do, use the selective paramount NSOBEZ method to call.

python - Error importing external library within Django template tag library -

So I'm trying to write a Django reusable app to display your Twitter feed on your page Provides a method. I know well that this 20 times already exists. It is an academic exercise :) The directory structure is very simple: myproject | __ __init__.py | __ manage.py | __ settings.py | __ myapp | __ __init__.py | ___ admin.py | __ conf | __ __init__.py | __ appsettings.py | __ feedparser.py | __Model_You | __Templates | __ __init__.py | __ templatetags | __ __init__.py | __ twitterfeed.py | __ViewJava | __Templates | __ base.html | ___ urls.py On running the newgen shell, the functions defined in twitterfeed.py work perfectly. I also believe that I have a template tag properly enrolled and registered. As you can see, I use the excellent my problem is not just within the UFP, but the template tag library is said to be in the inability of UFP while importing. When I get the {% load twitterfeed%} in base.py, I get the following error: 'twitterfeed' is not a val...

productivity - Should a programmer try to list their "Next Actions"? -

David Allen's "getting things" recommends keeping a "next action" list to organize your work, where "next action" is the next physical action that you will make to progress towards any purpose. In programming, to determine what to do next, it is often difficult to do this (seems like a problem of exhaustion). Most of the tasks are examining the program to determine how and how to modify the code to get some purpose. Body type is easy to write code. Once you know what to do, why can you try it in a few minutes, why stop it to describe it? Is the next action list a useful way to organize programming work? If so, how would you define your next action? If not, then whatever you want to do, how do you organize it? There is a related question. Once you know what to do, why try it in a few minutes Why can you stop to describe it? Sometimes whatsoever thinks a few minutes may be a few days, if not, "only a small thing here and there" wh...

c++ - Direct3D9 Rendering a D3DFMT_A8 texture -

I have a texture using the D3DFMT_A8 format. I want to present it as if the color is white (i.e., RGB The components are all 255) and use textured data for alpha mixing. I would like to do this without writing a pixel shader (without making any changes with existing shader, and working with a fixed-fiber pipeline). I can combine alpha to work like any other texture, although the RGB components are all black while I am considered white in color ... Looks like color / alpha operations D3DFMT_A8 as the color component of texture RGB (0,0,0). So you have to select the color component from the alpha / vector color and alpha components: Then you can deploy the color texture: _d3d9Device.SetTextureStageState (1, D3DTSS_COLOROP, D3DTOP_MODULATE) _d3d9Device .Setlet Stagegett (1, D3D TTSCLORAR1, D3DTARTERTNT) _D 3D 9 devices. ResistanceStastState (1, D3 DTSSCLORAGR2, D3DTATtecher) Of course, alpha blending must be enabled: _d3d9Device .SetRenderState (D3DRS_ALPHATES...

python - How can I execute CGI files from PHP? -

I'm trying to create a web app that will manage the mercurial repository for me. I want it so much that when I Tell it to load the repository X: Connect to a MySQL server and make sure X is present. Check whether the user is allowed to use or not the repository. If the above is correct, then get the location of x from a mysql server. To run an hgweb cgi script (dragon) that contains paths of repository. Here's the problem, I want to: take the hgweb script, modify it, and run it. But I do not want to: take the hgweb script, modify it, type it in a file and redirect it there. I am using apache to run the httpd process. The correct answer has been posted to Ryan Ballantine (I picked it up). The backtick operator is the way to execute a shell script. The simplest solution is to modify the hgweb script so that it does not include "include" the path to the repository. Instead, give it as a command line argument. This means that you do not have to worry a...

javascript - jQuery can't parse JSON built with Ruby-JSON -

I am trying to set up an Ajax callback using jQuery, and it's not working right now. My Ruby Code looks like this: Return {: one = & gt; Some_html ,: 2 = & gt; More_html} .to_json When the customer goes to the client, say "parse error". If I make it something very simple, such as: return {: one = & gt; 'Some',: 2 = & gt; 'anything else'}. To_json Then it works fine. I think I am wondering how it is that a library whose only work is going to be JSON, can make an invalid JSON? Or is it something else? Is it something HHL & amp; More_html contains characters in it that are interfering with JSON's parsing of JSON? Have you looked at the AJAX response and made sure it's a valid JSON?