Posts

Showing posts from May, 2014

xcode - Calling an external Class Method is causing Crash objective-c -

I have two squares using Box 2D, cocos 2D. Construct.mm and Level1.mm are all included in the construction box. 2D Physics is the information on how to create different objects in the engine engine - plotting objects in level 1 I have in the implementation of the implementation: Construct.mm - Some zero (infant) method (level 1 * level 1 = [[Level1 alloc] init]; [level 1 mapping ];} - (zero) SomeCertrectMath: (Logic) ments {// create rect} I have a level1 implementation: Level1.mm - (zero ) Mapping {Construction * Constr; if (Constr == null) Constr = [[Alloc building] init]; [some Knwrekt Rektmthः (argument)) MMS []; } Now, I know that the level1 * level1 allocation is working fine. It jumps - (zero) mapping {}. Build my problem * Creating constr objects and if it is in the beginning without (constr == zero) statement simulator will die directly, before posting any error report. If I put (constr == zero) and then try calling [constr something CreateRectMethod: a...

c# - Why do I need to perform a deep clone to get this code to work? -

The following code works, however, it works because I am finally creating deep clones of suppliers. If I do not do a deep clone, then we know that the supplier items have changed and the attempt to amend the supplier table has failed. This only occurs when the following line runs: foreach (Suppliers Suppliers in Exceptions) . Strangely, this also happens when delete () is executed. Why does this happen I have posted the following working code for your inspection. As I say, if you try to loop without deep cloning then it does not work ... any thoughts? Public Zero Deleted Slippers (ILIIT & Lt; Supplier & Suppliers; Suppliers, IT 32 Parent ID) {// If a supplier has been removed from the format, then we have to remove from the database. . // Get a Supplier from the database list & lt; Supplier & gt; DbSuppliers = Supplier. FindAllByParentID (parentID); // Return any such supplier who are in the database which are no longer on this form. Inumable & lt; Supplier ...

ruby - Test for warnings using RSpec -

Is it possible to check Ruby's warnings by using RSPC? class MyClass def Start Warning "Something Wrong" End End "Warning" MyClass.new.should Warning ("Something Wrong") End warning to kernel Is defined, which is included in each item if you were not getting warnings during initialization, then you can specify a warning like this: obj = SomeClass.new obj. Should_receive (: warning) .with ("some messages") obj .method_that_warns It is more complicated to clarify the warning taken in the initialize method. If this should be done, you can swap and inspect it in a duplicate IO object for $ stderr . Just make sure to restore it after an example class MyClass def start alert "something is wrong" end myClass do @orig_stderr = $ stderr $ stderr = StringIO.new by terminating it The first description "Warns at Initialization" What to Do "MyClass.new $ stderr.rewind $ stderr.string.chomp.should e...

Bluetooth stack switcher/manager -

I am searching for software that is at least switch between the Bluetooth stack between the Broadcom (Widem) stack Enabled Microsoft Stack, ideally between any installed stack Ideally, this could be a package that installs many drivers and allows them to switch between them, but I do not expect that something like that exists Wondering if any Bluetooth Stack Switcher is not making, many Bluetooth software projects work only under some stacks. I failed this in Google, but I believe that because of a lot of people, it is asking how to switch them on the stack for a specific application and what are the difficulties I find because of these posts . Any help or information about this type of software will be highly appreciated. Check this tool -

javascript - First time user of Galleria and i just can't get it to work? -

Galleria and I can not get the first time user to work it? Is it just giving me a list of images? I have tried that which is said in the usual question but nothing is working? Can someone please help me? I'm not a Galleria, but the following code jQuery (" # Gallery "). Galleria ({ id = "gallery" is referring to an element. I think the other div "& Gt;

How can I turn an image over in Matlab? -

I'm trying to turn an image into Matlab (I mean, if the picture It looks right then it should look to the left). How can I do this? Thank you! Flip the picture before displaying imshow (fliplr ( Image))

geolocation - Reading Geotag data from image in php -

Do anyone know that there is no way to read geotag data from photos in PHP? Thanks As everyone else said, exif_read_data (); Will do To move forward and get all the data, use these arguments: exif_read_data ($ img, 0, true); // where $ img is the path to your image This function can read the header only with the fights and JPEG and I am pretty sure that only JPEG can be geotagged. I have written a simple PHP script for use in the command line and posted it like this one. Run the script like this: php exif.php This resonates an array. See coordinates here: [GPS] => Array [GPSLatitudeRef] = & gt; N [GPSLatitude] = & gt; Array [0] = & gt; 30/1 [1] = & gt; 1589/100 [2] = & gt; 0/1 [GPSLongitudeRef] = & gt; W [GPS links] = & gt; Array [0] = & gt; 87/1 [1] = & gt; 360 9/100 [2] = & gt; 0/1 [GPS ultrittraph] => [GPSAltitude] = & gt; 1828 9/454 [GPStreamStamp] = & gt; Array [0] = & gt; 20/1 [1] = & gt; 22/1 [...

How do I convert this javascript into JSON -

How can I structured my data, such as saying, is a question that is associated with 5 options, and The vote of each option is associated with it? If you think of it as a tree, the question is, the root, which has 5 leaves, is the option, and every option has only one leaf, the vote. var myJSONObject = {"bindings": [{"ircEvent": "PRIVMSG", "Method": "New URI", "Reggae": "^ http: //.*"} , {"IrcEvent": "PRIVMSG", "Method": "DeleteERI", "Reggae": "^ Delete. *"}, {"IrcEvent": "PRIVMSG", "Law": This is the reason why I want to do that I want to structure my javascript according to a tree accordingly. The piece of code above is from JSON.org, I think I want 3 ircEvents of "binding" like structure, I do not know how to make it from backward (thanks to Javascript) Thanks see the update below If you already hav...

asp.net - HTTP-Push (Comet/Reverse Ajax)using Silverlight to Javascript bridge? -

क्या कॉमट-स्टाइल जावास्क्रिप्ट प्राप्त करने के लिए फ़ंक्शन RegisterScriptableObject के संयोजन में उपयोग करना एक अच्छा विचार है कार्यक्षमता? () मैंने मंचों में चर्चा की इस दृष्टिकोण को कभी नहीं देखा है, या एक नि: शुल्क समाधान के रूप में सिफारिश की है। इसके बजाय केवल भुगतान विकल्प जैसे कि और के बारे में सुना। क्या Silverlight को लागू करना है? क्या यह होना चाहिए? आपके पास कुछ गंभीर स्केलेबिलिटी समस्याएं हैं, और यह लागू करने के लिए शाही दर्द है। देखें: यदि आप Silverlight में एक Bayeux कार्यान्वयन चाहते हैं, तो आप WebSync चाहते हैं। (अस्वीकरण: मैं फ्रोजन माउंटेन सॉफ्टवेयर के लिए काम करता हूं)

check email existence using Delphi with Indy or any other components/tools for Delphi -

I need to check email accounts if I do not need to use Delphi and Indie (if If possible) I have a Windows database for the ERP system and I need to make sure that the customer enter the valid email in the system so that I can send the quotes to my customer which they request We do. I tried to test on Yahoo and Google on the order of sending mail and RCPT but did not get the success. Protect the mail server against spammers and others with malicious intentions, they can easily Are not going to leave This is normal for configuring the mail server for the black hole message sent to non-existent recipients. They do not respond to the sender, "Sorry, that user does not exist, please try again." Therefore, if you want to verify that the e-mail address is a person or not, I believe that the only way to ensure that e-mail is to request a response, Sending mail

java - How to parse string with special characters from database using php? -

I had a MySQL database that contained the names of the roads. It is an entry that gives me problems by asking me the database Is: Osmeà ± a Avenue . I've stored the DB using Java, and then I saw the data using phpMyadmin, I saw 4f736d65c3b161204176656e7565 instead of Osmeà ± a Avenue . When I query for the name, I put them in an XML file, which I use for my application. When I query for Osmeà ± a Avenue , my program is freeze. I came to know that in the XML file, ± is replaced by a ¿½, which causes the freeze first, for the first time, I Osmeà ± a Avenue Why saw a bunch of numbers in phpMyAdmin view? And what can I do to get the correct string with special characters from the database using PHP? Thanks in advance! Edit: XML file is used to attract routes through open layers. Format. KML ;. 4f736d65c3b161204176656e7565 A sequence of bytes ( 4f , 73 , ..) which represents Osme \ xc3 \ xb1a avenue , which represents Osmeà ± a Avenue of UTF-8 is. Just unders...

java - How to Make a Classloader evaluate the classpath before initlializing static objects? -

I have an application that I am developing which uses both jar libraries and basic system libraries. The problem is the default classloader that is attempted to load the static class before being called the main. Since the classpath does not yet include the original libraries for the need for static classes, java.lang.NoClassDefFoundError is thrown in the first evaluation static context. This is how my accessible library loading method looks like: Private static zero load_library () {{string osname = getOSName ( } {Try} if (osname == faucet) {new runtime exception ("the system you are running is not supported"); } URL U = NetBliss class.GetRSOSOS (OSNN); URL class loader urlClassLoader = (URL class loader) Classloader .getSystemClassLoader (); Class urlClass = URLClassLoader.class; Method method = urlClass.getDeclaredMethod ("addURL", new class [] {URL.class}); Method.setAccessible (true); Method.invoke (urlClassLoader, new object [] (U)); } Hold (Illegal...

java - Created method, having trouble returning a variable in it -

In this method, an XML file is read and some information about it is put in a list. Everything is working for all codes / other methods, I am having trouble returning the "list" variable. package ca3; Import java.io.file; Import java.util.ArrayList; Import java.util.LinkedList; Import java.util.list; Import org.w3c.dom.Document; Import org.w3c.dom. *; Import javax.xml.parsers.DocumentBuilderFactory; Import javax.xml.parsers.DocumentBuilder; Import org.xml.sax.SAXException; Import org.xml.sax.SAXParseException; Public class xmlReader {public string filename; Public xmlReader (string file log) {fileName = fileLoca; } Public list list; Public list return list (string file n) {Mp3 list woww = null; String fName; String lName; Mp3Lister qwewq; Try {DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance (); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder (); Document doctor = docbuilder.parse (new file (fileN)); // normalize the text ...

Python, why can't i override Popen.stdout -

Why is it possible to override sys.stdout but not the subproduction. Popen.stdout, if it is possible to override my own class, please let me know how ... I am working on some GUI projects, and I am in "real_time" I want to print some other program's output on text_view when everything does not happen When I override sys.stdout, I like something like this: Class MyStdOut: def __init __ (self): self.text = "" def write (self, string): self.text + = string here are some programs' pyscr Ipt.py ' import is OS DIF main (): i in range (10): print i OS system (' SO 0.1 ') ## This is to make some delays, I have 3 Also have loops if __name__ == '__main__': main () and here is the main program: as sub def (main) Import subprocals: popen = sub.Popen ('./pyscript.py', stdout = sub.PIPE) Line in Popen.stdout: Print 'Line:', line print 'Main done' if __name__ == ' __main__ ': main () However, thi...

assembly - NASM segmentation fault problem -

Greetings, I'm writing on the NASM under Linux, and I have the following problem: I have to write a simple program in which the user must enter the string, pass it to work, which gives its shape: The code is: % include "macros.inc" section .data prompt1 db "Enter the string:", 0 prompt1len equ $ -prompt1 prompt2 db "is the string size : "Global _start _start .text 20 section resb 0 prompt2len equ $ -prompt2 section .bss string: str_output prompt1len, prompt1 str_input str Ing mov EBX, string phone function str_output prompt2len, prompt2 output eax exit 0 function: xor eax, eax et ** cmp byte [ebx], 0 hours ** je end ink eax Inc. ebx jmp et end dec eax retired And here is the macro file: macro exit 1 mov eax, 1 mov ebx,% 1 integer 80h% endmacro% macro int_input 1 mov eax, 3 mov EBX, 0 mov ECX% 1 mov EDX, 1 integer 80h and eax, 0Fh mov% 1, eax% endmacro% macro str_input 1 mov eax, 3 mov EBX, 1 mov ECX,% 1 mov EDX, 20 round 80h% Endmacro% m ACRO ...

c# - The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid -

Image
मैं एक समाधान में दो परियोजनाओं है। PizzaSoftware.Data PizzaSoftware.UI डाटा परियोजना में, मैं अपने इकाई की रूपरेखा मॉडल जो मेरे डेटाबेस से कनेक्ट करता है। मेरा यूआई परियोजना डाटा के लिए एक परियोजना संदर्भ में है और : यहाँ वह वैसा दिखने की तरह है मैंने UserControls फ़ोल्डर में उपयोगकर्ता नियंत्रण बनाया है। सिस्टम का उपयोग कर; System.Collections.Generic का उपयोग कर; System.ComponentModel का उपयोग कर; System.Drawing का उपयोग कर; System.Data का उपयोग कर; System.Linq का उपयोग कर; System.Text का उपयोग कर; System.Windows.Forms का उपयोग कर; PizzaSoftware.Data का उपयोग कर; नाम स्थान PizzaSoftware.UI.UserControls {सार्वजनिक आंशिक वर्ग AutoCompleteTextBox: UserControl {AutoCompleteStringCollection completeCollection = नए AutoCompleteStringCollection (); सार्वजनिक स्वत: पूर्ण पाठ बॉक्स () {आरंभिकसमूह (); } निजी शून्य ऑटोकंपलीटेक्स्टबॉक्सी_लोड (ऑब्जेक्ट प्रेषक, इवेंटएरग्स ई) {ग्राहक रिपोजिटरी रेपो = नया ग्राहक रिपोजिटरी (); Var ग्राहक = रेपो। खोजें सभी ग्राहक ()। ToList (); वि...

Sharepoint desinger 2007 with sharepoint 2007 serverssss -

To download the SharePoint 2007 designer from my local machine, I want to connect it to the SharePoint 2007 server which is on another machine. Can anyone help me how to get started with it, I am new to sharing the point. Why do I need it? In 2007, share point created the site. I am taking this project, but I do not know where to start from Help will be appreciated. Thanks, Try these: 1 Open SharePoint Designer Click Windows Start - & gt; Program - & gt; Microsoft Office - & gt; Microsoft Office SharePoint Designer . 2 Click the file in the menu near the top of the SharePoint Designer screen and open the site . 3. Enter the URL of your SharePoint site in the Site Name field near the bottom of the Open Site dialogue box. Click on the Open button. 4. Select your editing option Depending on the configuration of your SharePoint site, you can choose to edit the live site or edit the local copy and then publish that copy on the server next to the op...

Example google app engine (python, Django) websites with open source -

I am learning to create a website using Google App Engine with Python and Django. Does anyone have an open source sample website which I can see? Thanks, A good variety of example projects:

php - When Should The Session Variable Be Cleared? -

The device for my application states that two users will be able to work on the same record of the web app at the same time Without clubbing the data of (unless, of course, they do not modify the same area, then this will be the last one to save the win.) This is a medical system, and it is estimated that the billing people have a record While working on the second section of a tech record Programming has been updated. Therefore, when a user saves a form, then the system should change the value in the database that the user has actually changed. Because I'm using KPHP, I'm trying to do this in favor of PHP things instead of talking to JavaScript before sending form data about it. My first thought was to examine the values ​​immediately before saving the database and only changing the values ​​that are not identical. However, if User A has saved the form, then user B has opened it, and then user saves the form B, then changes in User A will overwrite the old data in the ...

PHP block in HTML code -

Trying to use a PHP function within my HTML code but as a comment It keeps on treating this block! (Green in color source and if there is no output), though I have used the same function in another function and it worked fine even within the HTML ... function x () {$ X = 'hello'; Echo ('& lt; marquee direction = "left" scrollamount = "3" behavior = "scroll" style = "width: 300px; height: 15px; font-size: 11px;" & gt;'); Echo $ x; Echo '& lt; / Marquee & gt; '; } & Lt ;? Php echo x (); ? & Gt; Using HTML file I have a template that I found online ... any suggestions for what I should check? Thanks! What will be the job here: & lt; Php function x () {$ x = 'hello'; Echo ('& lt; marquee direction = "left" scrollamount = "3" behavior = "scroll" style = "width: 300px; height: 15px; font-size: 11px;" & gt;'); Echo $ x; ...

python - Unscriptable Int Error for String Slice -

I am writing a webcrawer and I have The link to the pdf files is full, which I downloaded, saved, and then analyzed later I was using beautiful soup and I used to get all the links of soup. They are usually beautiful soup tag objects, but I have changed them into wires. The string is actually a bunch of hard work which is buried in the middle of the hard text. I want to take out that garbage and just want to leave the link. Then I will turn these into a list and download the dragon later. (My plan is to keep a list of PDF link names to keep track of what has been downloaded, and then file names according to those links or according to a portion of it). But the .pdfs variables come in the name-length, such as: I_am_the_first_file.pdf and _ I_am_the_seond_file.pdf And as they are present in the table, they have a bunch of junk text: a href =: // blah /blah/blah/I_am_the_first_file.pdf [ Plus other annotation content a href =: // blah / blah / blah / and_i_am_the_seond_...

algorithm - Huffman trees for non-binary alphabets? -

What is the generalization of Huffman coding trees for situations, where the resulting alphabet is not binary? For example, if I want to shorten some text by typing it into Ternary, then I can also create a prefix-free coding system as a writing for each character I. Will the direct simplification of Huffman construction (using the Kashmir tree instead of a binary tree) still work correctly and efficiently? Or does this construction bring about the highly disabled academy plan? Algorithm still works and it is still simple ???? In fact, there is a brief reference to Wikipedia's original Huffman paper citing as a source. This has happened to me, however, as Huffman is a little less because it allocates an integer number of bits for each symbol (as opposed to example), triangle Huffman at least The more should be sub-totals because it assigns an integer number of trits is not particularly a show-stop for 3, but it indicates that N-ary huffman further behind other coding...

map - K-means algorithm variation with equal cluster size -

I find the fastest algorithm for the group based on distance in groups of sizes evenly on points on a map I am here. Looks straight and promising, but does not produce evenly shaped groups. Is there any difference in this algorithm or is there a different one which allows the same number of members for all groups? See also: Can be: Emonic centrosides sort the centrosides by descending in the shape of their linked groups in an array. For k -1 through i = 1, the data points in the cluster i are any other centroid j ( I & lt; j â ?? ¤ k ) j for closed and centroid recompute I (but do not compress the cluster again) unless the cluster size is n / k . The complexity phase of this post process is ( k one class n LG n ).

php - UNIX_TIMESTAMP(timestamp) use -

I am trying to get the unix_timestamp value for a specific timestamp column. But I'm confused $ timecheck = mysql_query ("selection by UNIX_TIMESTAMP (datetime) machine where m_id = $ m_id"); If (mysql_num_rows ($ timeshack)> gt; {while ($ timefetch = mysql_fetch_object ($ timeshack)) {echo $ timefetch-> Datetime; Print_r ($ timefetch [0] - & gt; datetime); If (($ timetate-> datetime-time ()) 6000) {echo "1"; } And {echo "0"; }} Timestamp value is a stdClass object that can not be used to compare it please anybody please help me with the code given below Use the alias for the column name in your SQL query: SELECT UNIX_TIMESTAMP (datetime) Machine from as datetime where m_id = $ m_id

oracle - Posting a table via hidden input runs into varchar2 and htp.p size limit -

I have tables that can be sorted and filtered on the browser, via jquery plugins. There is also a download button that copies the modified content of the table with the hidden input and presents it in the Oracle, which then prints the value of the input using an HP header with an Excel header. It works fine for tables of a certain size, I am asked to open the file in Excel I On the big table though I get this Mod_plsql: /pls/braganza/play.download_filtered HTTP -400 Price is very long Length is 531 9 6. The upper limit is 32512 Any way to dismiss this limitation? Actually, buffer your input fields in many areas. Pseudo code: Assign table to hidden input If [hidden input]. Length & lt; 32k Submit Hidden in the input # 1 = [hidden input]. Substrings (1, 32a) hidden Input # 2 = [hidden input]. Substrings (32K + 1, 64A) Hidden input # 3 = [hidden input]. Substrings (64k + 1, 96a) Submit This is an identical / identical method in APEX for large (32k +)...

haskell - Lists of data types: "could not deduce (a ~ SomeType) from the context (SomeTypeclass a)" -

I have the following problem with Haskell type systems: I am trying to declare a data type and returning the list of elements in this list. Type from the function Unfortunately, even the least test case like type the data sample = type sample type example example samples where show x = "(sample type)" stList: : (A) = & gt; [A] stList = [[SampleTypeConstructor]] Main = do {putStrLn (show stList)} Both failed with the following error message from ghc-7.0.2 and ghc-7.1.20110327 : tcase.hs: 7: 12: could not be extracted from a reference (a ~ sample type) (Show one) bound by type signature for stList :: Show a = & gt ; [A] at tce.hs: 7: 1-34 'A' is a hard type variable bound by type sign for stList :: Show a => In Expression: (Sample Type Constructor) expression: [(Sample Type Constructor) in an equation for `Stist ': stList = [[Sample Type Constructor]] offensive line stList :: (a) => [ONE] . You are declaring that StList is a multicolore...

c++ primer 4th edition - String question -

I am reading page 86 in this book about strings and litls and I do not understand that this string Why do the following say about S1 and S2? string S1 ("hello,"); String S2 ("World \ n"); String S3 = S1 + S2; .. It says that punctuation marks are contained in the s1 and s2 I punctuation? What punctuation Also on page 87. string s1 = "hello"; // No punctuation marks again? Can anyone explain? I actually went and saw the author on the book in question "," and "\ n" to " Punctuation "is being considered. Next verse on page 86: wire s1 and s2 include straight punctuation. We can mix the string objects and string literals and get the following results. Are: String S1 ("Hello"); String S2 ("World"); String s3 = s1 + "," + s2 + "\ n"; - donation

c# - How to do pagination in an NHibernate SQL query with DISTINCT -

I have a big and complex SQL query with a different section run in NHibernate (this is a search query with a wide variety) meets criteria). But I'm having trouble using PageGrid with it under SQL Server 2008. My question is: How can I do this from NHibernate and not my manual solution (mentioned below)? The code I am using is: var searchQuery = BuildQuery; .settimeout (240) .setcarscertelts (page index * pages) .custom results (pagesyes); Var resultRows = searchQuery.List & lt; Object [] & gt; (); The result of my SQL query (without the buildin of the Distinction) looks like this (highly simplified): id, name, sort column 1a 1/1/2000 1AA 1/1/2000 2 AB 3/1/2000 2 AB 3/1/2000 3 AC 10/1/2000 3 AC 10/1/2000 .... I can not avoid duplicate rows due to how the query works, so I have to stay separate in the SQL query to remove them. To mark the page, NHibernate generates such a query (this example is 100 pages per page result from another page): SELECT TOP ...

ruby on rails - SQLite3:CantOpenException (uanble to open database file) -

I have FreeBSD setup with Apache 2 and passenger to test things by using a new test_app of standard rail When I try to access the site through Apache, I get an error in the above title in product.log, if I run a Rail Server from test_app directory then it works fine. I can not even access a database to look at just one controller and app in just one home controller and index view. Any help is appreciated. In Apache, it is running in production mode versus development mode while running. You probably have incorrect information in your database. IML, or the Rack DB has not been run: Create yet Check your config / database.yml and make sure that the settings under production are correct, and if so Run rake db: make and rake db: migrate

Spurious recv() EAGAIN on OSX? -

Edit: The problem has been solved, I previously said fcntl (sock, F_SETFL, FDCLOEXEC) on server socket . It is mapped in some way to a mask that has O_Nblock, because FD_CLOEXEC is for F_SETFD, not F_SETFL and client sockets are inherited too. Hello, I'm developing a networking application on Mac OS X 10.4 Something strange is happening here: sometimes - a very regular and dependable - one on the blocked TCP socket RQV () gives Operation-1, which is set to ENNN. It is very strange because, as mentioned, there is a blocked socket, nor have I fixed any time-duration - which can also cause an EAGAN return due to the Docks State. I use Walkcock () to verify that there is no timeout if I slipped into sleep () and call again (again), then I get the data right from the next data. Has anyone ever encountered OSX on first or any other system first? This application is very simple; it is single-threaded, does not take advantage of singles, no asynchronous I / O is not running. ...

Rails/Rspec Views: The right way to test partials -

I have a 3 partial rail that lists all categories as a navigation menu - this is the highest, But all my template pages ... we say that about 75% I'm just trying to test in partial (RSPC), and I have realized a few things: At the moment, I say to All in the real scene The difficulty is that, because it touches the data, my mock / stub is ignored in the visual device, and as a result the test fails. I'm making an alternate guess that the application controller, and then partially pass it as a local variable. Nevertheless, about 25% of my page will not use the variable and I am thinking that there is another great way to do things. In essence, I want to see the glasses test db, but I'm not sure that my partially a global variable, the best way to do it, is the best way to do it ... And I'm not declaring variables in all (and only) controllers who need it. Any suggestions would be appreciated ... Why to all categories Do not make subsidiary? # categories...

Cannot update Date field - MySQL PHP -

There is a date field in my webpage that uses the JavaScript calendar format of the date field on the web page MM / DD / YYYY When the user enters all the information and submits the hit, all the fields except the fields corresponding to the date are updated. Here are the details: HTML: & lt; Tr & gt; & Lt; Td> & Lt; Label & gt; & Lt; Font color = "red" & gt; * & Lt; / Font & gt; Date: & lt; / Label & gt; & Lt; / Td> & Lt; Td> & Lt; Input name = "date" value = "choose date" id = "popupdate picker" & gt; & Lt; / Td> & Lt; / TR & gt; PHP code: MySQL: USER_DATE: DATETIME datatype When a new record is entered, USER_DATE shows 0000-00-00 00:00:00 as the value also when the date fields on the UI side Get population Can someone guide me in the form of trouble here. uses MM / DD / YYYY mitochoom Which is not a datetime format. Try it ......

gnu make - : error : in makefiles -

I am trying to compile a large number of files using the Make utility. I get the following error several times in the middle of the run & lt; Command-Line>: Error: Macro name must be identifier Since I'm using the -j option shows output log from random thread. So the actual file where this error has to face is very difficult to determine. Apart from this, no other errors are pop up, can anyone tell me that what is actually trying to indicate this error? This is not an error message created , but with a preprocessor (which is build ). As other people have said that the build without -j option (either starting with, or make -j ) fails A clear view of where the error arises.

Treat file as memory block in C -

Is there any way to read the file as a block of memory in C? Can one file be used faster ...? The file is assumed to be a memory (and the OS give the file for you) is called '' ''. On POSIX (like Linux ), the function does this. Windows , functions and friends do this, how it works in Microsoft, why to use it, and excellent description of their platform The description is.

templates - Xcode 4 - brackets { } code syntax -

क्या इसे बदलने का एक आसान तरीका है: - (शून्य) दृश्यडिडलोड {} - क्या उपरोक्त व्यवहार को बदलने के लिए "चेकबॉक्स" है? टेम्पलेट फ़ाइलों को संशोधित किए बिना? नहीं। दुर्भाग्य से आपको करना होगा।

javascript - Detecting when an iframe gets or loses focus -

What is the correct way to detect when there is an iframe or loses focus (i.e. the keyboard event will not be found) ? The following is not working in Fx4: var iframe = / * my iframe * /; Iframe.addEventListener ("Focus", function ()) / / is never called * false,); You can choose "document.activeElement" to determine if it matches an iframe Polling is not ideal, but it works: function check focus () {if (document.activeElement == document.getElementsByTagName ("iframe") [ 0]) {console.log ('Iframe Focus'); } Else {console.log ('iframe not centered'); }} Window.setInterval (Check Focus, 1000);

android application uninstall protection -

Just wanted to know that there is no way to prevent an application from being uninstalled. I know that this is possible if I add an application as a device administrator but it is not enough is there a way to send a message to the security code before I start without any installation Can I send it Any idea highly appreciated You can create two applications first you will apply and listen for the intentions to delete the other person and If your first application has been removed, Tragar will have an action, but this is just a basic security because the user can first remove the other application.

oop - How long will an instance of a PHP class last? -

How long does the example of a class object in the PHP, whether it is limited to running scripts Will stand for? If this is the last for a session, regardless of whether the PHP script starts the session? There is a simple question but it makes a big difference to me because it will mean that user data will be turned on in the server and the session will not require storage. Therefore, some of my designs influence fundamental elements. Thanks Colin Actually related to OOP but generally PHP practices All PHP data is not going anywhere, and PHP script itself is also going on PHP script executing atom is a desktop application Not like that, which is continuously running in your browser, and not even with the constant connection with your desktop application. This command line is more like utility - it works out and exits. This is the reason why using external storage, such as a file or a database, is required but it is obvious that you can save only the stars, not the...

s#arp architecture - Nhibernate Transaction problem - IsolationLevel.Serializable -

I have a job that takes a long time. So I want to execute the same work to speed up the tasks of many programs / threads / computers. Each task requires unique ID, which is kept in a DB. So I thought these IDs could be obtained in such a way: NHibernate session Present. External transactions (Isolation. List = NHibernate session CurrentCreatorItia & lt; Contextual ID & gt; (.) Setfistsilit (0) .set max result (500) .lust & lt; contextual ID & gt; (); foreign currency RelevantIdsRepository.Delete (x);} NHibernate session.Constitution transactions.Common (); Unfortunately, it throws an exception after some time if multiple processes Access to the database (not the nr batch size of deleted objects) Why is it? Should the level of separation of DB be correct? Thank you. All the best, Christian This does not apply to you like work. All processes read the same ID Getting long after they disappear from the database. Transactions, they once levels are visible ...

How to check all checkboxes at some specific event in android? -

I am creating an app on which my checkboxes are required to be checked once I check the main checkbox I am I'm using a normal checkbox widget which I hope will work as my main checkbox and I'm also using multiple options (simple_list_item_multiple_choice). I got stuck in this part: (Please help !!!!) Thank you, Verrundroid. The following link is helpful for you

mysql - Check given date less than current_date -

I have an expiration date, I want to see if the end date is less than the present or not. And if the expiration date is before: 27-03-2011 I want to do some work if termination is over: there is no need to do anything on 27-04-2011. I want to check one month after the end date and report the details for one month field type expdate date Ex: 2012-01-20 Please use the MySQL date and time formats, They have the YYYY-MM-DD form (ISO date format). All MySQL dates and time functions work using this format. MySQL also has date and time arithmetic. You can write expressions like "now () - interval 5 days", which is explained here root @ localhost [(none)]> gt; Now select (), now () - interval 5 days \ g ****** ********************************************************************************* ************** (now: 03-28 13:49:24 now () - interval 5 days: 49:24 1 line set (0.00 seconds) To list all items older than 5 days, / P> Select from made some selec...

php - How to merge my arrays for DB insertion? -

मेरे पास 2 एसोसिएटिव एरे हैं। Array ([title1] = & gt; test1 [ शीर्षक 2] = & gt; टेस्ट 2 [शीर्षक 3] = & gt; टेस्ट 3) और अर्रे ([image1] = & gt; images1.jpeg [image2] = & Gt; images2.jpg [image3] = & gt; images3.png) मैं डेटाबेस शीर्षक (छवि शीर्षक और छवि नाम) में प्रत्येक शीर्षक और छवि नाम सम्मिलित करना चाहता हूं। यह कैसे संभव है? वैसे भी उन्हें विलय करने के बाद और सम्मिलन करने के बाद? $ finalArray = array (); // अनुचित "आउटबाउंड" से बचने के लिए न्यूनतम उपयोग करें $ लंबाईऑफ़एरे = मिनट (गिनती ($ array1), गिनती ($ array2)); $ I ++) {array_push ($ अंतिम एरे, सरणी ('शीर्षक' = & gt; $ array1 ['शीर्षक' + $ i], 'छवि' = & gt; $ array2 [i = 1; i & lt; = $ lengthOfArray; $ i ++) [ 'छवि' + $ i])); } इसके साथ, आपके अंतिम एआरआर में आपको प्रत्येक डाटाबेस प्रविष्टि के लिए एक छवि शीर्षक के ट्यूप्ले होंगे।

how to add the image as part of RSS feeds -

I've added the title, title link and description in the RSS feed. But unable to add image as part of RSS feed. How can I include the image inside the tag and display it in RSS feed Regards, Gower Wrap your details and insert an image as an HTML tag. There are examples in TechCrunch with their feeds that you can work with: For example, the first item using the following details tags about UK entrepreneurs from their current feed: & lt; Description & gt; & Lt ;! [CDATA [& lt; Img src = "http://eu.techcrunch.com/wp-content/uploads/startupbritain.jpg" alt = "" / & gt; This morning in London, UK & lt; A href = "http://www.whitehouse.gov/issues/startup-america" ​​& gt; Startup America & lt; / A & gt; Projection, title - what do you think? - & lt; A href = "http://www.startupbritain.org/" & gt; Startup UK & lt; / A & gt; This equality on one side, this initiative has been put to...

google app engine - Run custom Python script before appcfg.py update runs -

Is it possible to run some python scripts every time I run the deployment process on appcfg.py? I need to copy some files from external source in my app folder before uploading to GAE Thanks! I summarized the sources of appcfg.py , script which Keeps the application on Google App Engine, but I can not find a location where a pre-deployment hook can be defined. I believe that you must modify appcfg.py You should create a simple deployment script and call your order from the script. For example, you can create a simple Makefile with the only goal you want: Deploy: your -Copy-command / path / to / GA-DevKit / APCFGPAP update create command to copy external files and call Google App Engine Deployment Tool The order to do will be executed.

php - Fatal error: Class 'Memcache' not found -

यह मेरे सिस्टम में हुआ परिणाम है। php -m | Grep -i memcache memcache फिर भी मुझे त्रुटि मिलती है "घातक त्रुटि: क्लास 'मेम्केस' नहीं मिला ..." अपाचे पर एक सिम्फनी ऐप चलाते समय। कृपया अपने php.ini फ़ाइल में अपाचे मॉड्यूल memcache.so को स्थापित करने की आवश्यकता है: विस्तार === Memcache.so

mysql in list only validates first id in list. maybe a blob issue -

I work with a system that uses values ​​separated by commas as one-two-multiple links Does. It is stored as a blob. I try to use MySQL IN (LIST), but only ends with the rows where the UID is the first in the list or only one in the list. mytable uid categories 1 24,25,26 2 25 3 22,23,25 4 25,27 runs SQL: SELECT * from mytable Where 25 categories (categories) results: uid categories 2 25 4 25, 27 missing (should be selected, but not) UID categories 1 24, 25, 26 3 22, 23, 25 Any idea why to start with string 25 and Not only are 25? I think this is a string problem instead of INSTALL UPDATE - based on the answer given below: When IN ( LIST) On a blob, blob turns into an int and comma and "points" are lost. In use FIND_IN_SET (needle, hexstack) which will also work on a blab with a comma-separated value. I think you should SELECT * mytable WHERE FIND_IN_SET Searching (25, category)

A question about security of Facebook registration -

I use Facebook registration to allow people to use my Facebook credentials / login to my site I am planning. The description can be seen here: The documentation says that when a user logs in to Facebook, then Facebook will set an online event and I will use this incident Users can login to their site. My question is, if I have removed the incident, then tell the user to log in to my website, would any user enter into any user by cheating on my javascript call? Is not it easy to do? What is the best practice to do in this case? Or is this thing naturally safe? (Or should any other service be used for login / registration instead of the Facebook registration plugin)? This event is very scary, but after finding that ping, actually someone can log on to For, you should use JS SDK FB.login () which calls Facebook to validate the current user's cookies, which then gives you their UID and AccessToken.

php - What to consider while build a web app as big, traffic intestive, successful as Facebook? -

I have an idea that I need to create a web application that can be successful in Facebook I know that the foundation is very important for such an idea and I would love to do this with some people like, with a team - think about creating it during construction. Any suggestions by considering the database for coding will be highly welcome. Thank you in advance. Just create it and be prepared to redesign it later. If you are trying to write infinitely for a few days, then this will not be as big as Facebook. Their v1.0, popular with Facebook launches , will certainly not have increased to 500 million users, and if they try to do so, then it is delayed for months And yet they are not well small (because they will not know how long the obstacles were known until they actually had a huge user's space)

css - @font-face works bad in windows (with firefox chrome ie) works fine in Ubuntu -

Here's my problem: Whether fadesa appears in the windows with the face of the font, I do not know why it looks ok in Ubuntu You can see it What's the problem? Code css here @ font-face {font-family: Fida Sons; Src: url ('../ font / FEDRAS01.eot'); / * IE 6 + * / src: for url ('../ font / FEDSAB01.ttf'); } @ Font-faces {font-family: fedra suns; Src: url ('../fonts/FEDRASAM.eot'); Src: url ('../ font / FEDRASAM.ttf'); font-weight: bold; } TTF and ETFont are not enough for successfully embedding fonts on the web. Read here: and here: Then you use @ font-face kit

opengl - Drawing lines with GLSL -

Is it possible to draw a line with GLSL using GL_TRIANGLES? Why am I asking that I am trying to draw a line with adobes molehill and it only pulls the triangle? Cheers If you set rendering on the edge, in the same situation Make a triangle with points 1 and 3. It's not efficient, but it works.

How can I use the new GWT MVP framework? -

I need a tutorial for the new GWT MVP framework that has been presented. Google gives a little bit of information for me Eventbus What is meant by clientfiling - and how do I use it - the following? location These are the categories that have been navigated to your program, About information encodes. You can create a place , which means "I'm on the home screen" and second, which means "I am editing with user id 52384. I think it's better for them The name will be PlaceTag s, because they are not really a place - they just indicate where your program is located. URL is placed at the locations located in PlaceHistoryMapper , In which you can say, "Hey, Home to Home Be sure to create a EditUserPlace (maybe you created with a field set to 52384), screen space and # editor: 52384. Actions These start and stop your code. Each activity has a start method that is called a proper, you can determine that "when app...

javascript - Settimeout function in Firefox does not seem to work -

क्या निम्न कार्य करने का कोई तरीका है? फ़ंक्शन टाइमरएवेंट () {TIMER_OBJ = सेटटाइमआउट ('अजेक्ससेशनचेक ();', '& lt;% = टाइमर% & gt;'); } मैं इस फ़ंक्शन को ओलोड ईवेंट में बुला रहा हूं लेकिन जब फ़ायरफ़ॉक्स में समय बीत गया है तो वह Ajaxsessioncheck फ़ंक्शन कॉल नहीं कर रहा है। आईई और क्रोम में यह ठीक काम करता है। उर समय के लिए सभी के लिए धन्यवाद .. मैंने कोड को पूर्ण टाइमर के रूप में बदल दिया है, अब मुझे एक अलग समस्या है। Ajaxsessioncheck () फ़ंक्शन में मैं जेएसपी पेज को कॉल कर सकता हूं क्योंकि मुझे फ़ायरफ़ॉक्स में प्रतिक्रिया नहीं मिली है। आपने '& lt;% = टाइमर% & gt;' निर्दिष्ट किया है एक स्ट्रिंग के रूप में (एकल उद्धरणों द्वारा चिह्नित), जहां यह एक पूर्णांक होना चाहिए, जैसे: & lt;% = टाइमर% & gt; आपको पहले तर्क भी निर्दिष्ट करना चाहिए स्ट्रिंग के बजाय फ़ंक्शन संदर्भ के रूप में, इसलिए आपका अंतिम आउटपुट होगा: setTimeout (Ajaxsessioncheck, & lt;% = टाइमर% & gt;);

iphone - Using a Generic In-app Purchase -

I'm finished working on an iOS app that allows users to browse, purchase and download items from a large multimedia library. Allows a railroad app to have hundreds of buyer items in the online hosted library, and it will be very much expanded in the future. First of all, I intended to have an underlying in-app purchase item (on iTunes Connect) library for each item. However, I decided that it would be a pain to create all these hundreds of in-app purchase items. Besides, I want to be able to make additional changes in buyer eligible items through my CMS without making any changes to iTunesConnect. Instead, the app user has now created an account with the Rail app. When they buy an item, they first buy a normal in-app purchase item. Once the transaction is completed, the app connects to my rail app, records purchases, and downloads the purchased content. One thing that bothers me about this approach is that the user successfully failed to connect with the in-app purchase A...

How do i link manufacturer with categories in magento -

I would like to link the creators of categories and products to my megengrove website. My goal is to get a drop down like & lt; & Lt; Categories & gt; & Gt; (after selecting the list of available categories, the user creator, I want to load the manufacturers), select & lt; & Lt; Select creator & gt; & Gt; I can create a custom module to bring value, but do not know how to link categories and manufacturers? Anyone can help me on this. Thank you very much. Check the following articles. Layered Navigation When a customer is browsing through your site, as soon as possible or you could not sell. And when faced with a range of 60 products spread across many pages, most customers will throw in towels. Give them the option of filtering those things, though what they like, whether the price of the product, the manufacturer or any other aspect of the products, and what you want your customers to do and increase the conversion.

sockets - SSL Client on Android -

I am currently writing a client part of a server using Android (2.2) and SSL. I managed to exchange messages between servers and a normal client, but Android is not very happy about self-signed certifications. I searched Staxahovarflow and Googled A are many and many people have similar problems. The answer I have received so far was either not working or had no meaning. Most code samples are for HTTPS, but I can not use it because I want to communicate through the socket (SSLSocket is my best guess). I have tried many different codes, but now I am at zero again. So far I have felt that I have to make a certificate (I think I am right) and a custom TrustManager. Obviously, I can not find any working code, so I ask here, because there really are some helpful helpers. I am looking for a detailed description of what should be thanks in advance I've done it with the porting of the native Android browser I just made the changed SSL reference. I promised that I would also ...

magento custom content in footer area -

Magenta is a way to insert a static content in the footer area, which appears to be different in each page . You need a footer link: On the admin menu Links are available - & gt; CMS - & gt; Static block Here you select footer link and add / modify your required link or modify text The code is available at the time of the code in the Copyright area code app / design / frontend / default / theme / template / page / html / footer.phtml .

asp.net - Set a property of a user control from repeater databound data -

I have a user control inside a repeater which is being forced by a sqldatasource I get the following error: Databesing ways As eval (), XPath (), and bind () can be used only in the context of a database control. Edit: Never Eggs on My Face I am getting this database error because I was compelling it somewhere in the attempt to redress my actual problem since last Friday, but I forgot about it. What is my actual problem: User control is being compromised before the multiplier is set, it appears that they are never set. When I see that the property hits before being put on the property, for example, if I do not want to be & lt;% # EVAL ("Address_ID")% & gt; Before the user control I will see the displayed ID, but then the user control will display an empty despatlet, because it is passing the ID of 0. & lt; asp: SqlDataSource ID = "sqlFacilityAddresses" runat = "server" Detasorsmod = "dataset" Cynkammand type = "Sngrh...

javascript - Errors with Prototype.js on Internet Explorer -

Image
When I try to access a website using Prototype on Internet Explorer, I get the following errors: Check it out:

c# - Selecting multiple XML node attributes with LINQ.. why is everything after the first attribute null? -

मेरे पास निम्न नमूना XML है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & LT; queryableData & gt; & Lt; तालिका प्रदर्शननाम = "जहाजों" dbName = "उद्धरण" & gt; & Lt; विदेशी कुंजी स्तंभ = "ग्राहक आईडी" संदर्भ = "ग्राहक पंजीकरण" / & gt; & Lt; विदेशी कि कॉलम = "कोटस्टैटस आईडी" संदर्भ = "कोटस्टैटस" / & gt; & LT; क्षेत्रों & gt; & Lt; फ़ील्ड प्रदर्शननाम = "उद्धरण शुल्क" dbColumn = "उद्धरण चिह्न" प्रकार = "संख्या" / & gt; & Lt; फ़ील्ड displayName = "कुल वजन" dbColumn = "TotalWeight" प्रकार = "संख्या" / & gt; & Lt; / क्षेत्रों & gt; & Lt; / तालिका & gt; & Lt; / queryableData & gt; और मैं क्षेत्र नोड की सामग्री के साथ एक अनाम वस्तु बनाने की कोशिश कर रहा हूं यहां मेरा LINQ कोड है: XElement रूट = XElement.Load ("queryable.xml"); मान, ...

fragment shader - GLSL Normalize Mouse Input -

I'm new to this shader world and just want to try something out. I want to do the following: In a specific radius around the mouse, the texture in the background should rotate 10 degrees. Mouse coordinates are full values, so to work with them I have to make them normal, so I can describe the exact location in the texture. But in some way it does not work right Rotation works but I get the color information slightly offset. I think the problem is normal (mouse) but I do not know how to do this right here's the shader: Uniform sampling 2D Texx; Uniform VC2 mouse; Zero main () {vec2 pos = vec2 (gl_FragCoord.x, gl_FragCoord.y); If (distance (pause, mouse) I am using cylinders to do this. mShader.uniform ("mouse", vec2f (m.x, 682-m.y)); Thanks. Change the full mouse into coordinate [0,1] in the range (required for texture sample) , You do not need the normalized function, you need a simple scale: vec2 mouse_norm = vec2 (mx / screen.width, 1.0...

javascript - Problems dynamically adding to form (trying to use onChange and appendTo) -

So I want to expand my form in different ways depending on the selection of a drop down box. I have got my javascript job so that when I change my selection it will do some work. But I'm trying to use the appendTo () method as I did before; To add an input, to apply a single device and to work for some input it is not working, so post;) So were you hoping that people would better me Can you understand the way? Here is my current code (Courtesy of Mark): var selectmenu = document.getElementById ("type"); Selectmenu.onchange = function () {var selectoption = parseInt (this option [this.selectedIndex] .value); Switch (option selected) {Case 1: $ ('' ) AppendTo ('# temp'); break; Case 2: $ ('& lt; Input type = "article" value = "2" />) AppendTo ('# temp'); break; Case 3: $ ('& lt; Input type = "article" value = "3" />) AppendTo ('# temp'); break; }}; Note: Updated sin...

design patterns - How to handle click event in javascript? -

Today is my first day on my new job (a front end lead on a large website). I have a job to implement that button, which triggers the event when I click on it. I did not have any clue, so after a little goggle, I came up with it: & Lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; Function popup (); {Alert ("Hello World") ==> Warning ("Hello World"); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Input type = "button" value = "click me!" Onclick = "popup ()" & gt; & Lt; / Input & gt; & Lt; Br> & Lt; / Br & gt; & Lt; / Html & gt; & Lt; / Body & gt; The problem is, when I click on my button, nothing happens. Edit updated on Michelle's comments This should work & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; ...

c# - How to create a parallel prefetch for a foreach -

C #, TPL, parallel extensions, many new ways to perform asynchronous operations Async CTP, Reactive Extensions What I was surprised The following will be the simplest way to parallel the benefits and processing of the following: foreach (string url in url) {var file = FetchFile (url); ProcessFile (file); } Is proviso that when files can be fetched at any time ProcessFile can only file handle at a time and gradually be called. Precisely what is a pipelined way FetchFile and ProcessFile The easiest way to achieve this? Here RX way it will replace the steam flowing streams extend Yuri: Public stable IObservable & lt; Stream & gt; RequestToStream (this IObservable & LT; string & gt; source, TimeSpan timeout) {observable .FromAsyncPattern & lt return WC in source.Select (WebRequest.Create) from s; WebResponse & gt; (Wc.BeginGetResponse, wc.EndGetResponse) () .Timeout (timeout Observable.Empty & LT; WebResponse & gt; ()) .Catch (Obser...