Posts

Showing posts from February, 2014

java - httpOnly Session Cookie + Servlet 3.0 (e.g. Glassfish v3) -

By default, the glassfish v3 session does not set the same flag only on cookies (when normally the GetSession () ) is built together. I know, a method is javax.servlet.SessionCookieConfig.setHttpOnly () , but I'm not sure if this is the best way to do this, and if So, where is the best place to place that place? BTW, of course, can be done in the servlet itself ( not such as init ()): java.lang.IllegalStateException : PWC1426: The only session to the servlet context / ... is unable to configure the session tracking cookie property, since this servlet theme has already been started Generally , I have a configuration option such as in Web.xml This is supported through a servlet 3.0 web.xml (see ): & lt; Web-App & gt; & Lt; Session-config & gt; & Lt; Cookie-config & gt; & Lt ;! - Specifies that any session tracking cookies created by this web application will be marked as HTTP - & gt; & Lt; Http-only & gt; True &

windows - Batch file recursively find files and rar them -

I have a generator directory that hosts many sub directories, and there are .mpg movies in each sub directory. One or more in the directory. MPG movies can be. I would like to automate the process given below, which I am doing manually. Step One If the directory exceeds the .mpg file, separates the directory for each and transfers each file to its directory, according to the file's name The directory naming. Step 2 I mapped each video file in my directory according to one file, so that it splits the film into 50 MB parts, test the archive , Remove the source, and wait for the winrar to wait if the second resin is being executed. I am doing this so that I can do the job manually. Step 3 After placing all the rows in all directories, I start creating a checksum for every directory, so leaving checksum. Sfv in every directory Step Four I copy the original folder and its sub directories on my external drive. I was hoping someone could help me in creating a scrip

php - Amazon Machine Image(AMI) for PHP5 -

I want to move my application to EC2. I would like to know the AMI image which includes Linux (preferably Ubuntu), PHP5, memcatch, eacetylet or exchatch. Please advise. Regards, Mughal. It would be best to create your own AMI, you can use Ubuntu AMI's community testing . This process is launched, installs package (bundle / upload) and registers. Ensure that you use EBS or S3 to continue your data. Cheers, Rodney

python - PIL's Image.show() brings up *two* different viewers -

While tuning with images in the dragon shell, I see the image. I use the show (), where the image is an example of the image some time ago nothing happened, but after defining the miracle of the mirage named " For the past few days, Show () will also take both the imagemagic display and Mirage. It is not clear whether the show () is to be run, it gets information about it. The documentation was not useful just how to behave and bring up only what xv thinks? Well, for one thing, im.show is the only purpose for debugging, to make it work However, you can always see the source (open "PDO pil", FILE section tells where a module is located): In Windows, PIL will use "/ wait file name" In Macs, this "Open-A / Applications / Preview.ap" and on Linux, either 'Display' Uses if legs Or otherwise 'xd-open'.

networking - in c # i need to write a program to measure bandwidth usage per day, week, month etc -

How do I do this? API (Microsoft and non-Microsoft are available) to achieve this? assuming that you are using IIS, you can use the log to process and then Can store the rest of any type of DB. It has an API that can be accessed via C #, you need to reference it in Visual Studio. There are examples in the documentation.

iphone - How do I change the UIKeyboard when using the UISearchBar? -

I want to set the keyboard type of UISearchBar for UIKeyboardAppearanceAlert, but I do not seem to access UISearchBar's UIKeyboard can . You UISearchBar in UISearchBar UIT extField * textField = (UITextField *) [[Searchbar SubViews] ObjectAutindex: 0]; TextField.keyboardAppearance = UIKeyboardAppearanceAlert;

ruby on rails - "getaddrinfo: Temporary failure in name resolution" in RoR application -

I am trying to retrieve emails in my Rail applications using Gmail from POP3. I get an error - "getaddrinfo: temporary failure in the name resolution" when I try to retrieve the email The strange thing is, it works when I try at home, but Not at my university I am feeling that there is something with its internet connection. Please help! I had the same problem that started this error with blue in an ROR application That was connected to an API that is running on a local virtual machine using a warwat that is in the form of a development environment. The only thing to fix the problem was to just restart my virtual machine. Just a stray down & amp; Up command, then racket and back in the game.

php - Coonecting to a TCP server from a Web Server -

Is there a way I can connect to a TCP server using a web server For example, connect to a TCP server via a PHP page)? Any resource to read on ??? I found on devshed.

asp.net - Disabling Export to MS Excel option on right click in browser using Javascript -

There is a javascript to disable "Export to Microsoft Excel Option" on the right click in the browser, even though it's web.config It can be done using, but it needs to use JS. TIA Bibhu I will have a security risk to allow such control over the client. They are from the menu add-ons, so they are giving power over privatization and possibly security add-ons. So, as far as I can tell, it can not be done with server side.

html - jQuery script to move an attribute of matched elements to their children -

मेरे पास एन्कर्स का एक सेट है & lt; a class = "lb" href = "#" & gt; पाठ & lt; / a & gt; & Lt; a वर्ग = "lb" href = "#" शैली = "चौड़ाई: 200px" & gt; टेक्स्ट & lt; / a & gt; & Lt; a वर्ग = "lb" href = "#" शैली = "रंग: रीन; चौड़ाई: 200px" & gt; टेक्स्ट & lt; / a & gt; को निम्न में परिवर्तित करने की आवश्यकता है: & lt; एक वर्ग = "lb" href = "#" & gt; & lt; span & gt; टेक्स्ट & lt ; / span & gt; & lt; / a & gt; & Lt; a वर्ग = "lb" href = "#" & gt; & lt; स्पैन शैली = "चौड़ाई: 200px" & gt; टेक्स्ट & lt; / span & gt; & lt; / a & gt; & Lt; एक वर्ग = "एलबी" href = "#" शैली = "रंग: हरा" & gt; & lt; span शैली = "चौड़ाई: 200px" & gt; टेक्स्ट & lt; / span & gt; & lt; / a & gt;

c - cos result incorrect -

I import "math.h". I can use the cos function, but when I execute cos (0.321139585333178) result 0.948876 if If I use the calculator in Mac or use the normal calculator, then result 0.999984292347418 Can someone help me solve that problem? = 0.99984292 = 0.948876326 To change from radius to degree, multiply by 180 / π. To convert degrees from radians, multiply by π / 180.

liferay - Custom Authentication Web Service -

I want to use authentication web services that are exposed by my legacy clients. But I am using those libraries database Can anyone help in writing any custom presentation service or hook / plugin to reuse their own implementation for authentication? I want to use authentication web services that comes out of my legacy client. You need to implement the Lifier's Comm.Lifureer. Portal.Sequality.th The etiquetter class that will call your web services, to use your own custom authentic This portal-ext.properties: auth.pipeline.pre = [your classpath]. To add folliowing, it can be plugged into Liferay, but I can not copy those user information into a lifetime database I believe That is, if you do not want to store your user data in Liferay, you can use the auth.pipeline.enable.liferay.check = portal-ext.properties file incorrectly. Good luck! ray html>

django join querysets from multiple tables -

If I have questions on several tables such as: d = Relations.objects.filter (follow = request.user) .filter (date_follow__lt = last_checked) R = Reply.objects.filter (REPLY_TO = request.user) .filter (date_reply__lt = last_checked) article = New.objects.filter (created_by = request.user) votes = Votekobjectskfilter (vote = article) .filter (date__lt = last_checked) and I do not mean I have all the listings you want to display the results sorted by date all of them ( Answer, all votes, etc.) Either way, I want to be involved in all these results in a single query. Is it possible? In addition to Sebastian Offer No. 2: In the Jengo some built-in functionality that you "abuse it " can do; The administrator is already a user's actions and reference objects connected through a common foreign key relationship is a model, I think you can just sub-class of this model and use it for their purposes: Import to import Django.contrib.admin.models, import additional im

javascript - How could I iterate the values in ArrayList in java from java script? -

I have stored an object in an arrelist, and I have fixed it in the request. Now I want to withdraw values ​​from my java script to the authoralist. To keep elements of list in an array, you can use.

xml - Property transfers in soapui -

I am trying to write parallel test in sublimation and need to move properties between test steps Currently I have 3 test steps: Execute a legacy request Execute a new request XML spreads one Two responses in the Groove script I have lots of options about selecting values ​​with xpaths Logs have been found, but nothing about passing the full response. My question is how can I complete the source and target boxes in the property transfer editor? Add a "property" test phase. Add properties for each response. Define a "property transfer" after each request Set the source for the response to the test phase Set the target for the property defined in step 3 Access them in groovy like this: def props = testRunner.testCase.getTestStepByName ("attribute") def response1 = proposoft property value ("feedback 1 ") Diff Reaction 2 = Prop. DataProperty Value ("response2") printlen response 1 / println response2

Java ME get yesterday's date -

I need to get yesterday's date from Java's midlet. I know Java is an add method in the calendar object but Java does not have it in my calendar. Is there an easy way to get back tomorrow's date? Thanks How about some < Code> Calendar C = Calendar. Est Instance (); C.setTimeInMillis (c.getTimeInMillis () - MILLISECONDS_OF_ONE_DAY); ??

php - Script looking for string in file breaks -

O people, I'm running a script that looks for a specific word in a PDF file. Well, actually I'm reading PDF file as a txt file and I'm looking for the word there. The script processes 20k files but, unexpectedly, after hitting the file the script is broken, which is longer than 50 MB. It stops. What could be the reason? Here is an excerpt of the script: // If file exists then go ahead (file_exists ($ sourcePath)) {resonant "file exists \ n"; If (files ($ sourcePath) gt; 0) {resonant "files are greater than 0 \ n"; $ PdfFile = fopen ($ sourcePath, "rb"); $ Data = Fred ($ pdfFile, filesize ($ sourcePath)); Fclose ($ pdfFile); // Find the string if (Stripos ($ data, $ exploration)) {resonance "success. Encrypt found \ r \ n"; Fwrite ($ errorFileHandler, "success encrypt code found \ r \ n"); } And {.....} ... ... What could be the problem? O people, I thought it. There was not enough memory set for PHP error lo

php - A couple problems re: CodeIgniter emailer -

There are some problems with the Email System for CodeIgniter: First of all, the email I send (registration, confirmation) being caught in standard spam filters in Gmail and other mail clients Are there. How do I get around this? How do companies like Facebook constantly receive their email? Second, the mailer is working locally, but once we deploy it, it does not run anymore (does not send email), but all the other forms are still Go fine Does anyone go into a problem like this? Thanks for all help! I can not really answer your first question - this code is not specific to the ignitioner It's important to make sure that your email does not look like spam. In short - there is no way to guarantee , your e-mail will not end in spam filter. For the second question, I hope that your production server should be configured correctly for the email, you probably need to send the email properly. I agree that instead of using standard PHP mail, I would suggest setting

c# - Threadpool design question -

I have a design question I want to know some feedback about whether the Threadpool client is suitable for the program. I am running as a customer service processing database record. Each of these records includes connection information in external FTP sites [basically this is a line of files of the transfer], many of them are for the same host, just different files run, therefore, I am grouping together. I want to be able to create a new host per host. When the transfer is complete, then I do not care, they need to do all the work (or try to do), and they are assigned, and then it ends when the process ends, in the process They clean all the resources. > I hope more than 10-25 connections will be established. After the transfer queue is empty, the program will only wait until the queue has a record. Is Thunderpool a good candidate for this or should I use a different approach? Edit: For the most part, this is the only important custom application to run on the server.

How to stop listening on an HTTP::Daemon port in Perl -

I have a basic perl HTTP server using. When I stop and start the script, That's still listening on the port and I'm getting an error message that my HTTP :: Daemon example is undefined. If I try to start a script about a minute about closing the script, then it works fine and can tie the port again. Is there any way to stop listening to the port, when the program ends rather than ending, to wait for the time limit? Use HTTP :: daemon; Use HTTP :: status; My $ d = New HTTP :: Demon (LocalEditor = & gt; 'localhost', localport => 8000); While (my $ c = $ d-> accept) {while (my $ r = $ c-> get_request) {$ c-> send_error (RC_FORBIDDEN)} $ c-> Close; Undef ($ c); } Edit: According to DVK's response, I $ d-> off () But I am getting the same error even while trying to restart my script. END {$ d-> close (); } $ SIG {'INT'} = 'CLEANUP'; $ SIG {__WARN__} = 'CLEANUP'; $ SIG {__ DIE__} = 'CLEANUP'; Su

return not breaking loop (c#) -

I am trying to determine if a user is a member of a group or not. However, the following are not being done for some reasons ... public boolean memberoff (string sObjectName, string sGroup, bool bIsGroup) {DirectoryEntry dEntry = CreateDirectoryEntry (); DirectorySearcher dSearcher = New Directory Finder (DNTRI); If (BISGroup) DSteure Filter = "(Dictisionname =" + S + Objectname + ")"; Other dSearcher.Filter = "(and (sAMAccountName =" + sObjectName + ") (objectClass = user))"; Search result sResult = dSearcher.FindOne (); If (sResult! = Null) {foreach (sResult.Properties in the object oGroup ["MemberOf"]) {if (oGroup.ToString () == sGroup) is true; And this. Memberoff (Ogroup.Tostring (), S Group, Truth); } } return false; } Another change: Either it does not work, it really looks like a dumb question ... but if "to be true" loop Do not break; It is strange that you are calling back this.MemberOf But ar

c# - why do we need SvcUtil.exe to create /generate proxy class -

greetings !! I am new to the WCF and there is some doubt. I am able to create a WCF service and I am able to consume that service in customer service using "Adding Service Reference". Now my question is that we need SvcUtil.exe to create / generate proxy class Why and after that the customer has been consumed, the same thing can easily be done using 'Add Refresh' what is the exact purpose. Not you - I'm pretty sure they are equal, obviously, take the physician from the command line While 'Add Web Reference' only works in Visual Studio, but they do almost the same thing. We do not add Web Context to Web Context because it creates a vast fleet of files, a version becomes Control Nightmare.

Learn C++ after learning C# -

I am currently developing a library at C # and recently purchased a great book to help me But the code snippets are in C ++. Do anyone have a link to the site / PDF which will give me a crash course in C ++? (Mainly syntax because of professional / opposition etc.) because I am developing in C #, but things like ->, ::, and ** ** give me fever, obviously languages ​​are not 100% compatible, But if I know what C ++ is doing with a 'theoretical' approach, then I can scream at it again in C #. I have to find Google answers but all sites "should use C ++ or C #?" It seems, which is not good for me. Thanks in advance. < It may be a lot easier for you but it is a good place for those who ever started Having not seen the code before.

vb.net - List all triggers in a database -

Is it possible to list all triggers in all the tables on the database? I can list procedures stored by all users with the following: Private sub archive (Server) Server = Server as new server (Server name) Dim MyDB Dim = theserver.Databases ("mydatabase") Dim dt as DataTable = myDB.EnumObjects (DatabaseObjectTypes.StoredProcedure) End Sub But nothing is clear in the SMO for the trigger ( I actually only customized the trigger within the selected database, any such name. I am trying to create a list of what is not called DEL_tablename, INS_tablename, UPD_tablename). Each database object contains a trigger property, which you can repeat to find all triggers Are there. Once you have a reference to this trigger, check to see IsSystemObject property whether it is user-defined triggers or not. foreach (Database DDTTrigger oTrigger oDatabase.Triggers) {If (! OTrigger.IsSystemObject) {// do something}} Have fun Please.

java - Get status of servlet request before the response is returned -

Good evening, I am in the process of writing a Java servlet (Straits 2, Tomcat, JSP Etc.) which is capable of doing some pretty complex simulations. It may take up to 2 minutes to complete and a graph of the result will return. It is trivial to calculate the percentage of simulation because the process works by repeating the nuances of the same time. I have to know whether anyone has ever estimated to use any client-side technology to complete any percentage of the whole process during simulation to get the number of complete cycles at different points related to servlet processing questions. This can then be displayed in the client browser as a bar. Any ideas, advice, resources will be highly appreciated. Thank you, Alex In your database, There is a table to maintain a list of simulations with the progress of their server-counting. In your web-application, use AJAX to query the server every few seconds (what I want based on loads 1-20) and update a graphical progr

How are timed html forms, like the kind you encounter when doing online tests, properly coded using PHP, MySQL, HTML, CSS and JavaScript? -

In other words, will technology take care of time tracking? Would it be Javascript? I am not aware that such things have to be kept with PHP. Here I need to complete: I reload many web pages because it is too much an online exam where each page load displays a new question However, the complete form that constitutes an exam is a deadline when the time is over, then in the question the user has not completed the test, he / she can not partially submit the full test and neither Minister on the same day (or however the calendar or date. Between 12/24 hours)), the user can try to finish the whole test again within could return the next day and the time allotted. I know that I've added a lot of details and I only used to show this reference, nevertheless, the main difficulty for me is how the expiration facility will be completed. This, anyway, within a series of pages that create a form that represents an online test, I want to track the time that begins with the first questio

c++ - Drawing filled circles as one vertex array using OpenGL? -

A method of attracting multiple circles using a vertix array is a way of creating a circle with a triangle is? I basically want to draw hundreds of circles away from each other, which needs to be drawn, but I feel that every circle is unable to call the top issue. If possible, I want to call 1 for all the boards thanks Take a look at the installation, For your convenience which is esp: (Note: This extension requires at least GeForce 8 series. As EXT, it should be supported by ATI / Intel Additionally, I Do not know the requirements there - maybe hardware that supports at least OpenGL 2.0 and GL_EXT_gpu_shader4 )

Is LINQ to SQL deprecated? -

In late 2008 there was a debate about the future of SQL from LINQ. There are several suggestions that investing in NAT 4.0 in Microsoft's NTI Framework was an indication that SQL had no future for SQL. I thought I waited before my decision because people were not in agreement. Fast-Forward 18 months and I will provide solutions to vendors who rely on LINQ to SQL and I have given it personally, try one and really enjoy working with it. He Came. I thought it was here to stay. But in a new book (C # 4.0 how-to-be Ben Watson) and in Chapter 21 (LINQ), he suggests that "it is more or less ejected by Microsoft" and Suggestions from the LINQ to use the unit framework. My question to you is whether SQL has been officially disliked from LINQ and / or if officially authoritative institutions (Microsoft, Scott Gujarat, etc.) use LINQ to SQL instead of SQL Suggest to do All "Linq-to-SQL dead" people: Scott Guthrie clearly mentions in takedown Europe Have done

Function to swap pointers in Objective-C -

controller2; Controller 2 = Controller 1; Controller 1 = swap; } It seems that this does not work because I'm not running references. how to do this? You want to change the pointers in the points you want to change: - (zero) Swap Controller: (MyViewController **) with Controller 1: (MyViewController **) Controller 2 {MyViewController * swap = * controller2; * Controller 2 = * Controller 1; * Controller 1 = swap; }

wpf - DataStateBehavior for Enum instead of bool? String? -

Is there an easy way to force VisualStates of enum values ​​in WPF? Kinda is like DataStateBehavior, but for an Enum? The best way is to just move forward and apply a behavior that does the same - Public class EnumStateBehavior: Behavior & lt; Framework Element & gt; {PUBLIC INFORMATION PROPERTY {Received {Return (Object) Gateville (Anemproperty Property); } Set {Set Value (EnumPropertyProperty, Value); }} // EnumProperty uses dependency properties in the form of a backing store, this animation, style, binding, etc. ... public static Read Only DependencyProperty EnumPropertyProperty = DependencyProperty.Register ("EnumProperty", typeof ( Object), typeof (EnumStateBehavior), new UIPropertyMetadata (zero, EnumPropertyChanged)); Static void EnumPropertyChanged (Object Sender, DependencyPropertyChangedEventArgs e) {if (e.NewValue == Faucet) Return; EnumStateBehavior eb = EnumStateBehavior as the sender; VisualStateManager.GoToElementState (eb.AssociatedObjec

algorithm - How to find the maximum contiguous SUM in an array (which contains positive and negative numbers)? -

I want to type a function ContigSum (i, j) Does a [j] via element a [i] , where i and a [] . Can you please tell me time efficient solutions to find the more infected SUM in the array? Well explained about the topic. I get Python code (i.e., executable pseudocode), they form a little gem for the alveolar algae: Max_ending_here = maximum (0, max_ command_ here + x) max_so_far = maximum (max_as_far, max_ command) return max_so_far

licensing - Question regarding the ExtJS License -

Assuming that I will create a CMS that uses EXJGs I refrain from licensing fees I want to, so I open CMS on Gitub. Now we think that I should make my friend Dave a website which uses my CMS. I spend three hundred hours designing the logo and layout. Can I charge for this, and should I be bound to open source Dave's website or is it enough to open CMS? I find this LPGL license a little misleading. Hello to Dave for me. Before ext 2.1, the ExtJS code is under LGPL. It currently uses that means that if you distribute , "whole work, as a whole" should be licensed under GPLv3. The entire work may include direct code associated with the execution. But "different and independent works, which are not in detail the nature of the work they covered" (which probably includes the server code) should not be GPLv3. So in the way I explain it, only the code (like Client JS you can develop), which extend tightly, they have to be released. IANAL. Even if yo

logging - C++ Logger-Should I use an ordinary xml parser? -

I am working on a logging system for my 2D engine, and I am confused about it that I How to create / edit the file, and how should I output that file. I have learned that XML is like a data display, such as HTML I have read that I can use XML for HTML converter. The method I have thought of is one in HTML Writing the character in the file The clarity on these matters is that what I ask you, overflow stack. To create an XML (or HTML) file, no special library is required Normal string containment usually Good, you may have to encode some special characters (like & gt; in & amp; gt; . ). But as Owen says, a log for plain text log files is more common. A proper compromise text file has a comma-separated value, it gives you a little bit of structure without being too high. For example, Windows Web Server (IIS) uses it to format by default, and if you have some fields that have outputs for each line such as a timestamp or source filename and line number, then reducin

Need help to begin with Eclipse RCP -

Image
O people, I'm just getting started in Eclipse RCP, I find it hard to understand the concepts. Actually, I am trying to make a button, someone has given a good suggestion about how to start with RCP. Both are up-to-date and completely complete, and Its code has been updated to E4, which includes its E4 CSS spy and other Eclipse e4 tools. You can also read about it.

java - Android app works on emulator but not on phone ("Can't dispatch DDM chunk XXXX: no handler defined") -

I have made a very simple application to start playing with Android development. It works fine on emulator, but when I try to install it on my HTC Hero (v1.5), I get the following error: Sorry! The application simple dial (process com.foo.simpledial) has stopped unexpectedly, please try again. (Force Close Button) and Eclipse Console , I get the following message: [2010-06-14 23:10:52 - Simple Dial on device 'HT9BSHF00222' Simple dial.app uploading [2010-06-14 23:10:53 - Simple dial] Installing simple dial up ... [2010-06-14 23 : 10: 56 - Simple Dial] Success! [2010-06-14 23:10:56 - Simple Dial] The activity to start com.alanvaghti.simpledial.DialActivity on Device [2010-06-14 23:10:57 - Simple Dial] Activity Manager: DDM Part 46454154 Can not dispatch: Define a handler [2010-06-14 23:10:57 - Simple Dial] Activity Manager: DDM Chuck 4D 505251 Can not Rematch: No Handler Defined [2010-06-14 23:10: 57 - Simple Dial] Activity Manager: Start: Intent {action = androi

xml - How to style HTML compatible tags in XSL definition using extenal CSS? -

I'm following W3Schools to learn the XSLT. In-in-one style is done here. How do I add an external (CSS) style sheet for the HTML analog tag style? As long as XSLT produces normal HTML in the browser, this should do the trick: HTML: & lt; Html & gt; & Lt; Body & gt; & Lt; H2 & gt; My CD Collection & lt; / H2 & gt; & Lt; Table class = "mytable" & gt; & Lt; TR & gt; & Lt; Th & gt; Title & lt; / Th & gt; ... & lt; / Table & gt; CSS: . Mytable {limit: 1px solid # 000; }. Mytable tr {background-color: # 9acd32; }. Mytable th {Styles} Edit: It seems that you need to declare them in a different way, this Look at the link, it has a very good explanation: Hope that helps :)

php - Login to icq account to receive messages from contact #12345678 -

What's the way php-script is running, which does the following: - Enter the icq-account - Received Existing contacts are all messages (if any) from # 12345678 and - write those messages in an array such as $ Messages = array (); Edit I like to answer: "Blaee" is a good, active community, it is often updated because ICQ changes its internal changes Let's see: The first result of that: This class can be used to communicate with other ICQ consumers. This can: Non-interception with an ICQ server Authenticate as a given user < Li> Get offline message Send and receive messages (...) I would say that code Looking for you.

jQuery check doctype -

यदि सिद्धांत है;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 संक्रमणकालीन / एन "& gt; धन्यवाद। ठीक है, मैं आईई, क्रोम, फ़ायरफ़ॉक्स और ओपेरा में इसका परीक्षण करने के बाद वापस आ गया हूं। IE आपको कोड के निम्नलिखित भाग के साथ पूर्ण doctype देगा: var doctype = document.documentElement.previousSibling.nodeValue; // - & gt; DOCTYPE HTML PUBLIC "- // W3C // DTD एक्सएचटीएमएल 1.0 ट्रांसक्रिप्शन // एन" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" < P> दुर्भाग्य से, यह शायद गलत है, क्योंकि क्रोम, फ़ायरफ़ॉक्स और ओपेरा null के लिए नोड वेला लौटाते हैं। चूंकि उनमें से कोई भी बाहरी एचटीएमएल का समर्थन नहीं करता है, मैं पूरी तरह से काम करने का एक तरीका नहीं सोच सकता, लेकिन आप अलग-अलग हिस्सों को प्राप्त कर सकते हैं: var doctype = document documentElement.previousSibling; Console.log (doctype.systemId) // - & gt; Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd console.log (doctype.publicId) // - & gt; - // W3C

c# - Linq PredicateBuilder with conditional AND, OR and NOT filters -

We have a project for SQL from SQL, for which I have to re-add some search pages to select the client Whether they wish to search and or or . However I know about resuming LINQ queries and I like this work very well. I'm effectively a class with my predecessors, e.g.: Internal steady expression & lt; Funk & lt; Job, bool & gt; & Gt; Description (string word) {return p = & gt; P.Description.Contains (words); } I'm doing this to search (briefly dropped some code): Public expression & lt; Funk & lt; Jobs, bool & gt; & Gt; ToLinqExpression () {var predicates = new list & lt; Expression & lt; Func & lt; Jobs, bool & gt; & Gt; & Gt; (); // build-up here predicts that if (SearchType == SearchType.And) {query = Predicatebuilder.True & lt; Job & gt; (); } And {query = PredicateBuilder.False & lt; Jobs & gt; (); } Foreach (predicates in var predicate) {if (SearchType == SearchType.And) {query =

How to create a rails staging environment in engineyard? -

This summary is not available. Please click here to view the post.

html - Simulate Browser Resources Expansion Behavior With Python -

I'm exploring a way to emulate the browser resource extension behavior. I try to find the flow as follows: Access an initial URL (such as) Receive html response pars (like index.htm Find Flash Embedded Video / Audio Images I do not expect to follow the link (href) < Li> Only page resources that will be automatically received by a browser when the page is first used Do you have a suggestion to undo this simulation? Thank you You may want to see that you're using Python Allows to write tests in

java - org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002 -

I'm getting org.hibernate.MappingException: no bid mapping JDBC Type: 2002 When I try to get a geometry field type to a JPA nativeQuery. I am using Oracle and org.hibernatespatial.oracle.OracleSpatial10gDialect . As the geometry field is mapped: @Column (name = "geometry") @Type (type = "org.hibernatespatial.GeometryUserType") Private Geometry geometry; // ... list & lt; Object & gt; ListFeatures = New Linkedist & lt; Object & gt; (); Query Query = entityManager.createNativeQuery ("Select" + Slot + ", the feature of geometry from edtem_features, edtem_dades where grandfather" + "feature." + Tematic.getIdGeomField () + '= Grandfather. "+ Tematic.getIdDataField ( ) + "and Dada.capesid =" + tematic.getCapa (). GetId () + "and feature.geometriesid =" + tematic.getGeometria (). GetId ()); listFeatures.addAll (query.getResultList ()); this spring + struts2 & my hibernate

hibernate - Strange JPA one-to-many behavior when trying to set the "many" on the "one" entity -

I mapped two entities using JPA (especially Hibernate). Those entities have one-to-many relationships (I have simplified the presentation): @Entity Public Sector A {@ManyToOne Public B getB () {Return b; }} @Entity Public Class B {@OneToMany (mapped = "B") public set & lt; A & gt; GetAs () {Return as; }} Now, I am trying to make a connection between two instances of these institutions by using one set of relationships / non-owner-side setter (i.e. the table referred to Being): em.getTransaction (). Start (); AA = new A (); BB = new B (); Set up & lt; A & gt; Like = new hashset & lt; A & gt; (); As.add (a); (As) b.setAs; Em.persist (a); Em.persist (b); Committed to em.getTransaction (). But then, the relation is not sustainable for the DB (the row created for the ATT A is not referred to the row created for the unit B). Why is it like this? I try to work it out. In addition, if I remove "mapped" property with @OneToMany comme

math - c# calculation help (TExtractor callid) -

When it comes to mathematics, I am very useless and I have a problem with which I need help. There is nothing to do with the work of the school, it is actually about Alcatel and the ticket controller. I have two values ​​which should be calculated in the AC # application according to the formula specified in their document: < P> "global collide is equal: collide 1 into 2 power 32 plus collide 2" As I said I am not big with mathematics, so that the statement does not say anything to me, how can anyone Calculate I know for this, I appreciate it! Thank you Firstly, you will need a 64 bit value to store it. Assuming your call id values ​​(32 bit) ints, you have to do something like this. int callId1, callId2; ... long global collide = ((long) callId1 <32 <+++> callId2; & lt; & Lt; is a bit shift operator - transferring 32 bits is equal to 2 ^ 32.

asp.net - How do I put my return data from an asmx into JSON? -

I want to return an array of javascript objects from my asp.net asmx file. i.e. variable = [[* value1 *: 'value1', * value2 *: 'value2', ...,}, {. . }]; I think there is a problem reaching it. I had put it in the code but I am hacking it away so that it would probably be more harm than good in this reply. Actually I'm using a web service to type people because people type the name. I use a regular text file or something else, but it is a large database that always changes - and do not worry that I have indexed the names, so searching can be a little snappy - but I really like to be with this method and just get Javascript back to JSR Thanks in advance for the help. Edit: I am using the $ .jax () function from jQuery - I have worked on it but it seems that I was not doing it in bad practice and using actual JSON Was not doing Before that I will take a string back and put it in html to use the set variable - lots of intersection. I just thought that

ternary operator - python: iif or (x ? a : b) -

संभव डुप्लिकेट: यदि पायथन सी / सी ++ से वाक्यविन्यास (x? A: b) का समर्थन करेगा, तो मैं लिखूंगा: प्रिंट का भुगतान किया गया है? ("भुगतान:" + str (भुगतान) + "€"): "भुगतान नहीं किया गया" मुझे वास्तव में एक जांचना नहीं चाहिए और यहां दो स्वतंत्र प्रिंट (क्योंकि यह केवल ऊपर एक उदाहरण है, मेरे कोड में, यह बहुत जटिल लग रहा है और वास्तव में लगभग एक ही कोड दो बार होना बेवकूफी होगा।) हालांकि, पायथन इस ऑपरेटर या किसी अन्य ऑपरेटर का समर्थन नहीं करता ( AFAIK)। ऐसा करने के लिए सबसे आसान / साफ / सबसे आम तरीका क्या है? मैंने थोड़ा और खोज की है, जो विज़ुअल बेसिक से प्रेरित है। मुझे आश्चर्य है कि क्या मुझे सचमुच उस कोड को जोड़ना होगा और यदि / क्यों मानक पुस्तकालय में ऐसा कोई बुनियादी फ़ंक्शन नहीं है। प्रिंट ("भुगतान किया गया:" + str (भुगतान) + "€") अगर अन्य भुगतान "भुगतान नहीं किया"

caching - Mobile Safari application cache bugs? -

I am using a Mobile Safari cache MANIFEST file to store a Multi Page Data Entry application that can be used as an iPod touch (Version 3.1.3) The application in offline mode writes through the ORM in the client-side database, it all works well. However, I sometimes go through very difficult to reproduce the problem, so that the Safari forgets that the pages are cached. When this happens, the "Page can not open" alert appears, which is what happens when you try to go to a non-cached website with Wi-Fi. The only way to fix this is to connect to wireless signal and go to the site when it is online, which set the cache directly when you are in the office, but working in the field is not very easy. I am not trying to give any context beyond the cached resources, and I have verified that the application is cached during the entire site, while disconnected, Sometimes successfully for the days of the end I think there is a bug in the OS that messes with the validity of the ca

concurrency - A shared List/Map among several threads in F#? -

I do a program to handle multiple blocked I / O operations by increasing an agent / mailbox processor during every operation. I am here. I have got a cloud in those matches, which I have cached in memory in those matches which I want to share among these agents. However, I have received a callback to the file system system whenever I make changes to the file so that I can update the cache. How do I make the cash without risking, read and write multi-threaded? It seems to me that the map is already based on the points on the objects, so it will solve my problem, because I am just converting the signals into new things because they load, or Is this a broken understanding? Thank you I think the map is already in the objects But if it is based on pointers, will it automatically solve my problem because I am simply turning the indicators into new things because they load, or is it a broken understanding? I think your understanding is correct. You can make a single volatil

iphone - Adding Navigation Bar items to secondary view in IB -

I work on an application that presents a UINavigationController-based interface with root view and secondary view. On the root view, I have configured two toolbar buttons left and right buttons. In this way I would like to configure the navigation bar item on the secondary scene. I know that this can be done with some coding (and so I have done ...), but my question is, what is possible in the interface builder? I simulated navigation bar, but this does not work (items have been rejected only). The problem I had solved was that the view controller for the second view was different from the view, from the outlets Connected I hope this helps someone.

html - How do I select a class element based on its id in jQuery? -

I have several dynamically generated buttons with a class named ".button" An unknown ID value used to inadvertently identify is given. In jQuery I have to choose one and the values ​​must be alerted. & lt; Div class = "button" id = "3" & gt; & Lt; / Div & gt; The id value is dynamically generated, so I do not know it. I am new to jQuery but basically looking for something like this: $ (".button"). Attr ("id"). Val (); How many buttons do I target a button? Thanks! EDIT: I want to select the user I click. In this case the button has a comment button. One is for each "post" and I will change the ID to start with a letter, because I am not using HTML5, whops :) $ (" .button "). Click (function () {alert ($ (this) .attr ("id"));});

windows - What do the & and | operators do in a batch file? -

I'm debugging a batch file left behind an old employee and I've come above the line: @nemac -f Mesophile / E2> And 1. What does it do? I know what does @nmake -f messphile / e and I know that tee% LOGFILEPATH% does, but let me know 2 & Gt; & Amp; 1; Can not get anything from the instrument. Thanks 2> & Amp; 1 redirects the standard error to the standard out. | Pipe output from nmake to tee .

javascript - click a button automatically using greasemonkey -

वेब पृष्ठ में एक बटन है & lt; इनपुट वर्ग = "बटन "प्रकार =" सबमिट करें "मान =" नया "& gt; मुझे एक ग्रीसम्बीकी स्क्रिप्ट की आवश्यकता है जो पृष्ठ को पूरी तरह लोड होने से पहले स्वतः बटन पर क्लिक करना होगा और अगले पृष्ठ पर जाना होगा। धन्यवाद। मुझे एक ग्रेसिंबेकी स्क्रिप्ट की आवश्यकता है जो इससे पहले भी पेज पूरी तरह से भार स्वचालित रूप से बटन पर क्लिक करें और अगले पृष्ठ पर ले जाना चाहिए। Greasemonkey के साथ, आप वर्तमान में केवल उपयोगकर्ता लोड कर सकते हैं जो DOM पर तैयार है, जो पेज लोड पूर्ण होने से पहले ही है। Google Chrome पर उपयोग किए जाने वाले प्रयोक्ता लिपियों के साथ वे जल्दी ही चल सकते हैं, और अंततः आप DOM तैयार होने से पहले उपयोगकर्ताओं को चलाने में सक्षम होंगे। कोड का चयन करने के लिए और उस बटन पर क्लिक करें: document.evaluate ("// input [@ value = 'new' और @ type = 'submit' और इसमें (@ वर्ग, 'बटन')]", दस्तावेज़, रिक्त, 9 , नल) .singleNodeValue.click (); को चाल करना चाहिए

php - Display Time in PST -

What is the easiest way to display the current time using PHP using PST (West Coast) time? OK, can be the easiest: date_default_timezone_set ( 'America / Los_Angeles'); Echo date ('Y-M-D'); Take a look to find suitable for your needs.

c# - How do I perform this XPath query with Linq? -

In the following code I am using xpath to use all matching nodes to use xpath, and I'm adding StringBuilder values. stringbuilder sb = New stringbilder (); Foreach (The XmlNode node in the Data.SelectNodes ("ID / item [@ id = 200] / dat [1] / line [position ()> 1] / data [1] / text ()")) {sb. Append (node.Value); } Return sb.ToString (); How can I do the same thing except Linq instead of XML? Assume that in the new version, this is Data is a XElement object. The query syntax will look something like this. From the items in the data var nodes. Elements ("Items"), where the items. Attribute ("id"). Value == "200" let's dat = item.Element ("DAT"). From the line in Dat.Elements ("line"). Skip (1) data = line. Select the element ("data") data; Var sb = new stringbilder (); Foreach (nodes in nodes) sb.Append (node.Value); ... it will be free of potentially frustrated exceptions and will get

c# - Mono: non-standard public method in Object class -

Does anyone know that the "ob__days" public method What is the Net Object Class in Mono Implementation? thanks, Michael this one pinned Gives the address of the object gone. This is internal to mono, so you really should not rely on it. We reserve the right to remove it and alter it in will.

.net - Is there a faster way to remove un-referenced controls from a Form's designer file? -

I started looking into the design file of my form and I saw that I had removed the old controls still It is happening immediately but is not actually used on the form. Is this an easy way to clean these controls from the designer file that is not being used? Right now I have printed a list of all the private areas under the designer file, which refers to the control of the form. I am trying to determine whether the control is actually used or not, and then I am aware that the form is not on. The outline of the document is useful for knowing the controls on the form, but it is still a difficult process. Is anyone's better way? swan 'best option is the best option, however, most of these can not be used So, you might be better to exclude the entire announcement block for control in the .designer.cs file, and then using the compiler errors that are in your control, use it once (or more) ) Do not compile once again, it prevents you from disappearing, And uses the compil

visual studio 2008 - .net c# datagridview populating with non database data/setup -

I have never used the DataGrid footage in any other scenario, where it is populating with a database so that suddenly My mind is empty ... I have 10 tubes, each of which has 8 vertical posts, so I have 10 to 8 grids. In each of those slots there is an image in a folder (or not). How do I get a grid to reflect this information, draw a grid, check the folder and if the image is present then it should be given white and the colors are not red? Sorry, if something looks weird, thanks, it is assumed that there are 10 columns in the DataGrade View 1 and you are called a method imageexists Accept texts, they should do the following: dataGridView1.AllowUserToAddRows = false; DataGridView1.ReadOnly = True; {DataGridViewRow row = New DataGridViewRow () for (line number index = 0; line indices & lt; 8; line indices ++); Row.CreateCells (dataGridView1); DataGridView1.Rows.Add (line); (If !!) is the imageexists (line index, cell index)) line (for int cellindex = 0; cellindex

ruby on rails - Calculate difference in days ActiveSupport:TimeWithZone in the most "rubyish" style? -

I am feeling that someone is answering any other question which gives me the answer but I am with no luck This simple issue is not doing the search. I have an active record with Deteipple property I give it as an ActiveSupport: TimeWeath Zone I know I can not compare the time on that date. Because there is no area in it, so I have to use time. Makes sense. Am I thinking that the style is the "cleaner" way of reducing it to 86400 and dividing it? What do I do here: ((time.son.new - myActiveRecord.visit_date) / 86400) .to_i Works, but I think I'm missing something. Should I compare, casting or alter casting, or is it really the typical way to do this in the railways? P> One thing you do to make it more readable Can: ((Time.zone.now - myActiveRecord.visit_date) / 1.day) .to_i Edit: Actually you can get rid of a set of brackets: (Time.zone.now - myActiveRecord.visit_date) .to_i / 1. day

asp.net - how to open HTML page stored on client machine from aspx page -

I am developing the asp.net application in which I am opening the HTML page that is stored on the client machine on that page I link which will open the ASPX page on the server, on that ASPX page I have a button that will open another HTML page stored on the client machine. Since I'm new to web development, I should advise some solutions for this ASAP. thanks .... Add edit: On the server without uploading the HMTL file to the client machine and It is possible to navigate between HTML pages on ASPX pages. Can I use some javascript code on the aspx page to open the HTML page stored at my local level ... Try it & lt; A href = & quot; File: /// c: \ whatever.txt & quot;> click to open & lt; / A>

Log off from Remote Desktop Session does not closing Session, showing the login screen again on Windows XP 32 Bit - SP2 -

We wrote a custom live as per the requirement in Windows XP 32 bit (SP2) An interesting practice is observed that Customized Live internally calls Windows Defining Live (msgina.dll) and shows an additional window according to our requirements. I was able to get the remote machine in XP machine from my machine. After replacing Windows Live with customized live, I tried to log off from the XP machine (I'm using a remote desktop connection to log in), the log off was successfully completed (after saving your settings , After closing the network connection etc.) and on the log-in screen that we log on, this window is not expected compared to other odi flavors. After switching off the machine with other operating systems such as Windows XP 64bit / Windows 2003 32/64 bit, Windows Live stops with custom live remote desktop session. I tried to install Novell live on Windows XP 32bit, but I have not found any problems with it. I have tried to upgrade XP SP2 to SP3, but I am faci

.net - MVC2 or WCF for an XML/JSON REST API? -

I've spent a long time learning how to adapt WCF to authentication on a resistan service and so on. Can; I created some custom service hosts, then added the ability to use the IoC container to actually create service frequency, etc. We have iPhone / iPad App plus some other gadget-type stuff (technical term!) That now use these (XML, JSON for browser-based platform I-platform) And with whom we can easily add new actions, it is very happy. I used all the Fabulous DataContract serializers (and now use them in separate cases to read / write objects outside WCF) and after that fast learning phase, but now we have all those I am very happy. Now we have many new web projects for which I jumped on the possibility of using MVC- and it was appropriately affected; Model binding, in particular, is really ass mess. Now I am seeing similar cheerful APIs for these web projects (these are all similar sites but on the basis of custom longon there will be minor changes in different bran

JSON Syntax, what is this? -

I understand the concept of JSON, but after starting the use of eBay API, I got an indication that I Did not see it before, and wondered if someone could explain what is happening with it? ["FindItemsByKeywordsResponse": [{"ack": ["success"], "version": ["1.5 0"], "timestamp": ["2010-06-16T08: "[Pg. Number:" ["0"], "pages on entries": ["10: 42: 21.468 Z"], "search result": [{"country": "0"}], "endorsement output": ["10 "]", "Total Pages": ["0"], "Total Entries": ["0"]}]}] } @ country "is the thing? I saw that when I refer to it in Chrome, it throws an error: But JSON Lint in Firefox does not report that it is valid as I Hope this was a ... This is the name of a property, it's a @ character. Use to access properties with properties that you can not use in dot n

php - Pass a query in URL using jquery -

I want to pass in a $ _GET [']] php file, when a word is clicked in a div , Then the data must be displayed from DB. This displays the data without the query. The process.php contains the SQL statement to query the DB and display values. Gene If you are serious, Read

jquery - JQTouch transition problem -

I have a problem with the toolbar below jqtouch, a static bottom toolbar which has been implemented with the iScroll plugin for jqtouch . When I want to switch between a page with a "right" slide transition effect, I also want to exclude bottombar using the transition effect. The reason for this is because it looks strange when the toolbar slides right below. EDIT: Example The iPhone webbrover will be copied You always see the navigation below and it does not increase with the website. I want this effect in jqtouch. Resolve with a new update in jqtouch.

c++ - Socket send recv functions -

I created the socket using the following lines of code: now I will change the value of this socket M_Socket ++; Still sending socket function succeeds without throwing SOCKET_ERROR. I hope it has to throw the error. Am I doing something wrong? struct sockaddr_in ServerSock; // Socket Address Structure To bind port number char * localIP; Socket socketer; // sockaddr structure to set up ServerSock.sin_family = AF_INET; ServerSock.sin_addr.s_addr = INADDR_ANY; ServerSock.sin_port = htons (pLantronics-> m_wRIPortNo); // If you want to create a socket for listening to wPortNumber ((Source Sorvar = Socket (AFNAT, SOCAKRR, 0)) == INVALID_SOCKET) {return incorrect; } // to bind the socket with wPortNumber if (bind (sourceworwer, (sokadar *) and server server, size (server server)) = 0) {return incorrect; } // to listen for connections on wPortNumber (Listen (sockers, somexone)! = 0) wrong (return); } // Getting the IP address of sockaddr_in insock unit that connects the struc

php - Force result for empty() test on an object -

उदाहरण के लिए सरल वर्ग: class Foo {protected $ _bar; सार्वजनिक फ़ंक्शन सेटबार ($ मान) {$ this- & gt; _bar = $ value; }} और यहां सवाल है: $ obj = new Foo (); Var_dump (खाली ($ obj)); // सच $ obj- & gt; सेटबार ('फ़ूबार'); Var_dump (खाली ($ obj)); // झूठी क्या यह वर्ग के व्यवहार को empty () फ़ंक्शन के साथ परीक्षण के साथ बदलना संभव है, जब वह ऑब्जेक्ट को true देता है डेटा से भरा नहीं है? मुझे जादू फ़ंक्शन __ isset ($ name) के बारे में पता है लेकिन इसे केवल तब ही कहा जाता है जब हम विशिष्ट फ़ील्ड की तरह परीक्षण करते हैं: < कोड> रिक्त ($ obj- & gt; someField); लेकिन जब परीक्षण पूरे ऑब्जेक्ट नहीं होता है। यह किस तरह का है संभव है। ओपोड कॉल i_zend_is_true : यदि (! Isset ||! I_zend_is_true (* मान)) {ZVAL_BOOL (& amp; EX_T (opline- & gt; result.var) .tmp_var, 1); } और {ZVAL_BOOL (& amp; EX_T (opline->; result.var) .tmp_var, 0); } ऑब्जेक्ट्स के लिए यह परिभाषा होती है (ट्रंक के रूप में): केस IS_OBJECT: अगर (आईएस_जे

Navigating from VB.NET code to C# code problem -

There is a problem with the following situation: Say you have a VS2008 solution , A console (console) application written in Vb.net, and a class library written in C #. The application references the classroom library project. This is, of course, compliance and works well though, when you define the right-click function (in the vb.net application code) in the prototype / object type class library, and "Definition" Go to "Choose, the object browser opens to provide you with a list of available methods, class class library consists of poorly executed. However, if you try to do this, both applications and CL are in C #, it works just fine and you navigate through the appropriate functions / class smoothly. GOOD A known issue? Solvable? Did you try to add a project reference instead of the DLL reference? A project reference should be taken to the actual relevant code in the second assembly.

mvp design pattern - question -

When I have a button that changes something in my scene (like some text appears when I Suppressing), do I write my entire code with my thoughts in the file or should I be involved in handling this button's event in the presenter? This is a problem for me, because I do not know if the presenter handles all the events from the scene or is this only, which model changes something? In advance thanks The presenter only governs the events that change the model. However, each programmer decides what the model should be kept, and which is completely related to the scene. Imagine the work, where you need to create 2 buttons, the first button loads the data from the database and displays it, and the second button changes the color of the page at some random value. There are 2 ways to apply this: The model will have loaded data loaded data and color color . The presenter will manage both buttons in this way. It can be decided that the color presentation is part of the p

java - ActionListener Event Handling -

There is a code for a checkbox that agrees with the terms of service and accepts and rejects the button. I need help to deal with the exception that If the user has not been selected as a checkbox, then when he accepts the user, An error message occurs, which is not selected by the checkbox How would I like to handle the error using these 2 arguments? import javax.swing. *; Import javax.swing.JOptionPane; Import java.awt. *; Import java.awt.event. *; Import java.lang.Math. *; Import java.lang.Integer *; Import java.lang.Object. *; Import java.util. *; Import java.util.Random; Import java.io * *; Import java.text *; Import java.text.DecimalFormat. *; Public Class JFrameWithPanel JFrame applies ActionListener, ItemListener {int packageIndex; Double price; Double [] prices = {49.9 9, 39.99, 34.99, 99.99}; Decimalfilm currency = new profit ("$ 0.00"); Zellabell Price Labels = New JLabel ("Total Value:" + Value); Pocket button = new pocket ("check price

objective c - Drawing individual pixels with iphone sdk -

I want to know how to play powder toy style on iPhone. My problem is how to draw the pixels on the screen. What I have read, is better for OpenGL games because it is fast / hardware fast, but there is no way to draw pixels directly on the screen. Apparently there is a way to pull pixel in the off-screen frame buffer, but how can I pass it to OpenGL? Do I use texture? (It's assuming I do not have any previous knowledge of iPhone graphics programming). Thank you! Usually in OpenGL, you attract archaic and polygons if you want to draw a bitmap You have to apply texture to your polygon. See the Cocos 2D-iPhone engine for 2G games based on OpenGL. If you still need to draw a pixel, this is a method of cocos2d to attract the line: zero ccDrawLine (CGPInt origin, CGPoint destination) { CGPoint shorts [2]; Corners [0] = original; Corner [1] = destination; // Default GL states: GL_Vertcher DD, GL_Votex_ARRA, GL_ORARAAA, GL_AQUIRE_COVERORD_ARRA // REQUIRED STATE: GL_VERTE

sql server - How to order by last name on a full name column? -

I have an SQL table with columns called an integer, in which for example, "John Smith". How can order data from the last name visible in the Puranam column? For a long name like "Lawrence John Fishburn", I want to order the data through the word "fishburn". In this way, names are stored in the order First name middle name Last name < / Ul> I am using Microsoft SQL Server 2005. I will do something like this: select from full name Table by reverse (substrate (reverse (fullnam), 0, fourteenx ('', reverse (fullname)))

php - Associating a Function to Fire on session_start()? -

I searched the web but could not solve the following challenge: I Also want to execute a function like when the session_start is called independent from page session_start , then it is implemented. The function I have to restore to constants is stored in get_defined_constants () by using $ _ session = so that they are again available on any PHP page. This seems very simple to me, but I'm pretty sure that the PHP session extension does not support the registration of events defined by the user. I was thinking that if anyone has insight on this issue, then I can either find out the solution or am trying. Ideally, I just want to register the ceremony on run-time like this: $ constants = get_defined_constants (); $ _SESSION ["constant"] = $ constant ["user"]; Function event_handler () {foreach ($ _SESSION ["constants"] as $ key = & gt; $ value) {define ($ key, $ value); }} Register_handler ("session_start", "event_han

.net - Gacutil.exe successfully adds assembly, but assembly not viewable in explorer. Why? -

I have GACUtil.exe to register a DLL (CatalogPromotion.dll) in GL from Visual Studio Command Prompt 2010 I'm playing. After running the utility, it says that the assembly has been successfully added to the cache , and running gacutil / l catalogspromotion dell shows that GAC is in the assembly, but I can not see the assembly when I navigate from the C: \ WINDOWS \ assembly in Windows Explorer Why can not I see in Windows assembly from windows explorer but i can see it using gatil.xe ? Background: Command Prompt for VS Tool I wrote here: C: \ _ Dev Project \ VS Projects \ bmccormack \ CatalogPromotion \ CatalogPromotionDll \ Bin \ Debug> gacutil / i CatalogPromotionDll.dll Microsoft (R) Net Global Assembly Cache Utility Version 4.0.30319.1 Copyright (c) Microsoft Corporation All Rights Reserved. The assembly was successfully added to the cache C: \ _ Dev Projects \ VS Projects \ bmccormack \ CatalogPromotion \ CatalogPromotionDll \ bin \ Debug> gacutil / l

iphone - iOS - Rotating view reveals background -

I have created a scene that I want to be able to rotate. Two thoughts: containerView and a .backgroundColor red and BackgroundImage as a subview. Here is my code for the rotation: - (minus) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation period: (NSTimeInterval) span {[self adjustViewsForOrientation: toInterfaceOrientation]; } - (bool) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation {return YES; } - (zero) adjustViewsForOrientation: (UIInterfaceOrientation) Orientation {if (Orientation == UIInterfaceOrientationLandscapeLeft = Orientation == UIInterfaceOrientationLandscapeRight) {backgroundImage.image = [UIImage imageNamed: @ "landscape.jpg"]; background image. Frame = CGRactam (0, 0, 1024, 704); Container Viv.Frame = CGRactam (0, 0, 1024, 704); Self.title = @ "" scenario "; } Else if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortrait

ruby on rails - Problem building relationships between models -

So far, I am using the act_as_taggable_on plugin for tagging announcements. This plugin creates the following tables: Tagging: related to the table of tags and declarations (for tag items, there is a field labeled tagGable_ID, which I call "declanation_id" I change the name I explain below). Tags: Tag IDs and names are. On the second day, I came to know that I have a certain tag, but Announcement.tagged_with (tag_name) is doing, and I do not want to search by name, but for ID. So, because of the functionality of that plugin I'm not using almost anything, I decided to make a model for tagguns and tag tables to complete it: Announcement.tags . The relationships of the models are displayed in the following form: edit: class tagging & lt; ActiveRecord :: Base is_to: Announcement ist_to: tag end class tag & lt; ActiveRecord :: Base has has_many: tagging has_many: Announcements, via = & gt; : Tagging & Class Announcement & lt; Activ