Posts

Showing posts from September, 2014

objective c - [__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance -

I am trying to parse a Jason file in the table view and I am getting this error [__NSCFDictionary objectAtIndex:]: unrecognized happening selector sent to instance and App crashing please help me, I'm new to iOS development my code @implementation ViewController - (id) initWithNibName:. (NSString *) nibNameOrNil Bundle: (NSBundle *) NibBundleOrNil {self = [super initWithNibName: nibNameOrNil Bundle: nibBundleOrNil]; If (self) {// custom initialization} back itself; } - (zero) viewDidload {self.title = @ "Feeds"; [Super viewedload]; [UIApplication ShareApp] .networkActivityIndicatorVisible = YES; NSURL * url = [NSURL URLWithString: @ "http://little-people.blogspot.com/feeds/posts/default? alt = json"]; NSURLRequest * Request = [NSURL request request with url: url]; [[NSUr Connection Elok] Init VectorQuest: Request Rep: Self]; } - (zero) connection: (NSURLConnection *) connection didReceiveResponse: (NSURLResponse *) response {data = [[NSMutableData all...

loops - How to write a Perl script to check x number of columns to print a value in another line for each returned value -

I have the data in the CSV file (IP address), which will be 9 -2 9 columns. If there are no values ​​in the other columns, by default, it should only print in 9 columns. There is an output file that will print the value of a set of values ​​and the value of the column 9 (and 13 if a value exists) has been added to create an alias value with a constant value. My question is, how will you do it efficiently? I have this code that works: my $ alias0 = "component algebra = ['computer system: $ column [9]']; \ n"; My $ alias1 = "component alleys = ['computer system: $ column [9]', 'computer system: $ column [10]']; \ n"; My $ alias2 = "component_alize = ['computer system: $ column [9]', 'computer system: $ column [10]', 'computer system: $ column [11]']; \ n"; Print bark "computer system; \ n"; If (($ column [11]! = '') & Amp; amp; ($ column [10]! = '')) {Print barkowk $ alias 2...

bash - How can I get a cleaner file information with print command? -

I have the command to dump all Java and XML files: Find -name '*. * '-print -ls I get the following output: ./ auth-jaas / pom.xml 562949954141667 2 ------- ---- 1 John 1282 February 14 2011 ./auth-jaas/pom.xml Is there a way to get something smaller this way: 1282 February 14, 2011. /auth-jaas/pom.xml I'm only interested in file size and timestamp. Instead of using du : $ du --time file 4 2013-03-20 19:49 with file find : $ Find -name 'file' -exec du --time {} +

How to insert current time in MySQL using Java -

I need to enter the current date and time (milliseconds) in MySQL. I have done the following: long = System.currentTimeMillis (); Java.sql.Timestamp timestamp = new java.sql.Timestamp (time); System.out.println ("Time in millisecond:" + timestamp); And I found time in milliseconds (eg 2013-03-21 00: 08: 33.523). However, I need to put this information into the MySQL database, I tried the following using the created condition prepStmt.setTimestamp (2, timestamp) ; But the time is inserted without milliseconds (e.g., 2013-03-21 00:08:33). How can I incorporate time with milliseconds? Edit: is the type of code in the database, DATETIME .

c - Redirect STDIN to socket and socket to STDOUT -

I am trying to develop a simple command line client on the server. After connecting to the server and setting up everything properly, I want to redirect the STDIN to the server and the same socket on the STDOUT I want to get the same behavior as the nc device. The easiest solution will be selected () and to read () / to write () From STDIN to the data socket and pass STDOUT from the socket. Does Socket anyway STDIN / STDOUT? Any other easy way to add to is dup2 () I thought about using the system call though, I'm not sure how it works. Thank you. On linux you can move data between file descriptor at the kernel level by splice ( 2) . However, you have to use (2) (or equivalent) to handle two directions in parallel, or optionally use two threads.

bash - How can I pass each filename to my function? -

I am trying to write a simple function which will allow me to unset the interactive files with the git. Here's what I've done so far: reset_or_keep () {echo "receive $ 1"} interactive_reset () {local mods = mods = 'git status - republican | Sed -e "s / ^ [A-Z] [\ t] * // g" | However, I get this error: xargs: reset_or_keep: such a file or directory P> I think that reset_or_keep is called once for every entry in the git position - Republican The easiest way to xargs to #! / Bin / sh reset_core () {resonant "get $ 1"} handle_files () {time of the file's name read; Do reset_or_keep "$ filename" done} git status --porcelain | Sed -e "s / ^ [\ t] * [A-Z] [\ t] * // g" | Handle_files (Note that I had to make a small change in my sed expression to handle the output format from my git status ) Keep in mind that as a -0 flag without xargs , this program will not work properly with file...

c++ - How do I import a set of libraries in a .pkg file into Xcode 4.6? -

I am currently taking some different online programming courses, one of which is the programming abstraction Stanford course. They have a set of default libraries, which are used for class. You can download that package here: I have to find out how this package of libraries can be obtained in the exode so that I can use those programs I can write what I say. How can I go about doing this, when I make a new project, then I can create a library that is ready to go above the standard C ++ libraries. Thanks a bunch advance! Edit: I did install the .pkg file, but I do not know where it is installed. How do I use the library installed from within Xcode? Bad luck from this page: You must install XCode 3.0 to use the CS106 Libraries ForexPCG libraries. XCode 4 has a very different UI and has functionality compared to XCode 3. So it will not be right to study XCode 3. But if you are going to study C ++ using those tutorials, then you probably want to install XCode 3 and want...

permutation - Perl pattern matching with optional tokens -

I have such a string: $ word = "[A] ( Good [bad] word [for fun] "; Where: Everything inside [] is optional More The value of the inside (.. | ..) or mandatory value is Therefore, the possible results from the above string will be: A good for fun A bad word for word fun is a good word a bad Did someone remove me from all possible outcomes Can help finding Rika (like the example given above) and helps find a way to store them in an array? Thanks! Use strict; continuous use (OPT = & gt; 0, or = & gt; 1, fixed = & Quot; My $ word = "[A] (good | bad) word [for fun]"; my @ talkence; # input parse my @v = grep {$ _} split / (\ [| \ ] | \ (| \ || \)) /, $ word; While ($ $ token = shift @ v) {if ($ token eck '' '] {push @ talkens, [op, change @ v]; shift @v; #]} alsf ($ token eq' (') { My @ list; make {push (@list, [fixed, change @ v]);} as long as (change @week ')'); # '|,)' push @ tokens, [or, \ @...

PHPword insert table in template -

$ PHPWord = नया PHPWord (); $ अनुभाग = $ PHPWord- & gt; CreateSection (); $ Table = $ section- & gt; एडटेबल (); $ I = 1; $ Document = $ PHPWord- & gt; लोडटैम्प्लेट ('/ var / sitelims / वेब / अपलोड / एलएमएससिलबस / एलएमएसएसिलबस.docx'); $ दस्तावेज़- & gt; सेट वैल ('मान 1', $ course_number); $ दस्तावेज़- & gt; सेट वैल ('मान 2', $ course_name); $ दस्तावेज़- & gt; सेट वैल ('मान 3', $ course_en_name); $ दस्तावेज़- & gt; सेट वैल ('मान 4', $ कोर्स_समुरी); $ दस्तावेज़- & gt; सेट वैल ('मान 5', $ course_purposes); $ दस्तावेज़- & gt; सेट वैल ('मान 6', $ course_content); $ दस्तावेज़- & gt; सेट वैल ('मान 7', $ course_exam); $ दस्तावेज़- & gt; सेट वैल ('मान 8', $ course_description); $ दस्तावेज़- & gt; सेट वैल ('मान 9', $ syllabus_person); $ दस्तावेज़- & gt; सेट वैल ('मान 10', $ syllabus_academy_opinion); विदेशी मुद्रा ($ syllabus_experiment $ a के रूप में) {...

How do I detect in rails if I am running a rake command? -

In the train, you want your environment to do different things at startup, if you are running rack work or No. For example, in the case of my use, many hundred MB cache loading in memory were loaded when the app was launched. We definitely do not want to do it on the rake command. --- Update --- The following is the reliable solution and works with Herokee. is_rake = (ENV ['RACK_ENV'] empty ??} ENV ['RAILS_ENV']. Empty? || ("# {ENV.inspect}" = ~ / worker / i ) .blank?) to find out if your environment is in a rake command then a lot It's easy, but, it took me a while to understand it. I hope someone will help in this! in # environment.rb, I have the following_is_rake =! ("# {ENV.inspect}" = ~ / rake / i) .blank? Say "what is the rake? # {Is_rake}"

How does one use namespaces in iOS objective-c code? -

I'm writing an iOS app, "Best Korea" My organization name is "Srsly.co" and I'm going to write again the usable "news" libraries which I will use in my application have a .h will be your app-wide constraint in the file, and the library code will have its contents as well as the header files. I can also test for each of these projects. Is this the standard way of working? In Ruby, Python, Java etc, I was setting the namespace with these lines: cum. Straightforward To bistcorea Straightforward Bistcorea Test. Gelatine NewsLab to Straightforward NewsLab As far as I can see, objective-pattern is to choose two or three upper-case letters for each developer and with each class, the name is prefixed with them. So in my case, I am thinking that I choose BK for the News Lip code in the form of the appname classname prefix and NL ? Am I thinking about it correctly? Edit: I'm considering not using names at all in my application ...

ubuntu - How can I extract the tables, text and the pictures in ODT(OpenDocumentText) format using Python? -

How can I output tables, text and images in an ODT (OpenDocumentText) file to output them to another ODT file Can i Python on Python? I have never used it, but it comes with documentation and code examples. , And it can read and write the ODT files.

iphone - MPMoviePlayerViewController Support landscape iOS 4.3 to 6.1 -

I have a question orientation about and, Support my application to run portrait mode video but when When I start any video it will only run in landscape mode then after the video has completed it automatically comes the portrait mode. I'm using ** MyMovieViewController.h of code below # import & lt; Media Player / Media Player H & gt; @ Interface Mimevie Week Controller: MP MPV Player Wii Controller @ and ** MimeViewController. M ** @ Implementation MimeViCiCentron - (ID) Init Wathanbinem: (NSSTING *) Nominee Ornel Bundle: (NSBindle *) Nebbundle Online {SEL = [Super Init Wide NewsName: NIBNAM Bundle: NIBBandalOnline]; If (self) {// custom initialization} back itself; } - (zero) viewDidoadload [[Super Viewedload]; // Setup an additional after loading the view} - (BOOL) must be atoroteret {not return; } - (NSUntengar) Supported Interface Orientation {return UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskLandscapeLeft; } - (UIInterfaceOrientat...

ios - including common header files in .pch file -

I'm just thinking, is it usually good to include header files used in .pch file Is practice? Most files required below the headers like #import & lt; UIKit / UIKit.h & gt; #import & lt; Foundation / Foundation. H & gt; So each file should be instead, is it a good practice to add those PP files? .pch file #ifdef __OBJC__ #import & lt; UIKit / UIKit.h & gt; #import & lt; Foundation / Foundation. H & gt; # Import & Lieutenant; Mostly u sd h & gt; #endif I got some damage to it, 1) Dependency is hidden I 2) Source files can not be copied directly. If you give some information on this, then it will be great. Thanks Yes you can do this. Even this time reduces compilation. Remove In general, the newly-generated iOS projects that come with this functionality, called Preekanpld header or prefix header, and a file Whose extension is .pp. You will compile all the headers you want and the encoded it before it becomes ...

javascript - Stored value generating [object HTMLInputElement] -

I have an indexed DB and it is used for the login function. When users log in, I am trying to populate a form with user information. However, users are populated with the form [object HTMLInputElement] instead of information This is where I take the user (DB key) to access the object (user) Edit This is my site where it's running: My site editor is updating it as I save, so I can change the site script as trying new things. This is where I take the user (DB key) to use the object (user) function login check (user, pass) {db. Transaction ("user"). ObjectStore ("Users"). Receive (user) .onsuccess = function (event) {var loggedUser = event.target.result; If (! LoggedUser) {Warning ('Sorry, user name does not exist, please try again.'); } And if (pass! == loggedUser.pw) {Warning ('wrong log combination, please try again.'); } Other {Log In (LogueAaster);}}} Function Login (Logueurs) {var u = loggedUser; Alert ('Welcome' + U.F.N +...

android - Two Edittext validations -

I have two editors on one screen, with a maximum length of 11 n other 12. Now I want to follow the beliefs on these two editorial topics. 1. Only the value of 1 editor should be passed on the next screen. It is mandatory .. The value of only one should be passed on the next screen. 2. If a user starts entering any of the edits, they should be forced to enter 11 or 12 digits in the respective related edits. This verification has to be done by clicking the button on the screen. Any thoughts? You should use the EditText onChangeListener to reuse the letters Each time the user enters any text, each time the onChangeListener is triggered for your editing text widget, calculates the number of characters and enables or disables that button Which runs on the next screen based on the calculation of the character.

runtime - Delphi TChromium CEF3 run-time created browser loads pages incorrectly -

I am using TChromium for authorization. I have the variable Chromium 1: T chromium; . I have to hide the form and destroy the chromium and show it on the form show. (Since chromium sometime exception picks "module Iaksakson exception" in libcef.dll and crash my app, will not I think that the destruction of chromium when used). I have: Process TAuthForm.FormShow (Sender: Tubect); Start Chromium1: = TChromium.Create (self); Chromium 1. Diagram: = alClient; Chromium 1. Onsialogog: = Chromium 1 JSDILOG; Chromium 1. First Popp: = Chromium 1 First Popp; Chromium 1. Default url: = 'about: empty'; Chromium 1. Parents: Self; Chromium1.Load (AUTH_URL); End; Process TAuthForm.FormHide (From: TObject); Start Chromium 1. Free; End; The problem is that when TAuthForm.FormShow The first call is correctly load the page, but when I made my hides and browser again This page displays incorrectly, then no longer here to explain how http://google.com/ : Google (function (...

swing - Java : Frame responds on pop-up action. how? -

There is a JTable and Save button in my frame. I enter the data in JTable and save it in the database. In my current program: When I click on the "Save" button, it checks the data and pushes it into the database. I'm worried: When a button with two buttons (OK and canal) (if you want to secure the record?) Will be clicked on the button, after which the right button is clicked, JTable The data will be pushed to DATBASE. The button will be clicked, one frame with two buttons (OK and Canceled) will trigger (whether you want to secure the record?) Then, if the OK button is clicked, then the data in JTable will be used on DATBASE Will be pushed. Use, then there you can

qt - How to show icons use QSqlRelationalTableModel and QTableView in every row -

Now, I am trying to use QSqlRelationalTableModel and QTableView to show my data in the database, "fileType", To show an icon in the first column, such as "Doc, Texty, XE, SLN" according to the suitability. dirModel = new QSqlRelationalTableModel (this); DirModel-> Settable ("ecm_doc"); DirModel-> SetFilter (QString ("creatoruserid = '% 1' and parent = '% 2'"). Arg (userid) .arg (parentid); DirModel-> Selection (); DirView = New QTableView (this); DirView-> Set ITEM Deliaget (new diralit (this)); DirView-> SetModel (dirModel); DirView-> SetSelectionMode (QAbstractItemView :: SingleSelection); Show icon (); Zero DirTree :: showIcon () {int rowCount = dirModel- & gt; Punctiquity (); (For line row = 0; row & lt; rowCount; row ++) {// here is a test: i QModelIndex index = dimodel-> gt; Index (line, 1); QIcon Folder Icon (style () - & gt; Standard Pricessemap (QStyle :: SP_DirClosedIcon); DirModel-...

scheme - How transform-painter works in the picture language in SICP -

Image
I'm having trouble understanding how change-painter process works: (define - painter painter original corner 1 corner 2) (lambda (frame) (let's (frame-conform-map frame) (Give ((new-origin (M original))) () The composer (make-frame New-Oral (sub-works (m-corner 1) new-root (sub-vector (m-corner 2) new-root))))))) Specifically why the logic frame by the new root Vector subtraction of slogan mapping is necessary I have thought that the mapping of the new corners, i.e (m corner 1) and (m corner 2) , forms of new edges of the transformed frame Can work in I have done some calculations and I want to know where I am mixed. For example flip-vert is taking, (define - flip-bizarre painter) (conversion-painter painter (make-wacker 0.0.0); new Original (Make) -act 1.0 1.0); New end of edge 1 (Make-Vect 0.0 0.0)); Let flip-veer form a frame with the following dimensions as the argument, origin = (0, 0 ), Edge 1 = (4, 0), edge 2 = (0, 4) Thus the mapping form...

Wordpress Email Form -

WordPress email form Hi all I am using this type I am an email form in many sites and it has always worked. I have tried to use it in a WordPress site but it will not be Is there any obvious reason why the approach will not work in any WordPress site? I need an email form that does not reload the contact page because the form is below html & lt; Form action = "#" id = "contact_form"> & Lt; Input type = "text" id = "name" placeholder = "name:" & gt; & Lt; Input type = "text" id = "email" placeholder = "email:" & gt; & Lt; Textarea id = "message" rows = "8" cols = "40" placeholder = "message:" & gt; & Lt; / Textarea & gt; & Lt; Input type = "submit" id = "submit" /> & Lt; Div id = "status" & gt; & Lt; P & gt; & Lt; / P & gt; & Lt; / Div & gt; ...

did not switch on or die command in php -

I have written this code. But they did not work well. This is some of these errors: WARNING: mysqli_connect () [function.mysqli-connect]: php_network_getaddresses: getaddrinfo Fail: Such a host is not known in C: \ wamp \ www. .. and some time it appears T_EXIT error My problem is in "or die" command that it can not be connected to the database, then it is " Or die "; The program ends but it was not how can I fix it? $ dbc = mysqli_connect ('localhost', 'user', 'pass', 'table') or die ('error connecting to mysql server.'); My problem is in "or die" command that the database Can not connect to it then it should switch to "or die"; Answers come directly from $ link = mysqli_connect ('localhost', 'my_user', 'my_password', 'my_db'). ); If (! $ Link) {die ('Connect Error (' Mysqli_connect_errno (). ')' .mysqli_connect_error ()); }

Prolog binary tree node value count -

Can anyone help me in Prolog How can the plant be realized that all the node numbers of the binary tree count goes? For example: tree 1 (tree (1, tree (2, tree (3, zero, zero), tree (4, zero, zero)) , Tree (5, tree (6, zero, zero), tree (7, zero, zero)). will return 28. Can anybody help? Tail-recursive not short resuscitation. tree (zero, 0) tree (tree (X, T1, T2), S): - Perum (T1, S1), tree (T2, S2), SX + S1 + S 2.

c++ - Selecting a string corresponding to the nth number of elements in an array -

There is a very troubling problem here. In this challenge, my goal is to hold the names of 5 most active buyers in quantity To do is to return an array. Stock Symbols are holding those names, while the total purchased has worked successfully and the total is kept in the Bought array. I then tried to do the 5 greatest things at the top and returned my names to the total. I am a full newbie on C ++, so I know that this method of doing things is wrong. It is also not compiled, to throw away memory errors at all places (if the largest [0] & lt; totalBought [i]) starts on or around the line. If you Anyone knows better than I would be grateful for your input to successfully make this work, or if you know how to work in this way, it will be very useful. Many Thank you. string * analyzer :: topfivebuyyers () {i} // your code string String Styles Balls [] = {"P Bush", "Zero Soros", "Joe Nef", "Hagrevez Lansdown", "Sipple", ...

How to get the result of describeTable amazon dynamoDB method in Node.js? -

In my application I am using Node.js with Amazon Web Service dynamoDB.I already created a table and The item is inserted on that.Now I want to displayTable. How do I display the item count of my table using what I can try under the code, but it does not work. AWS = requires ('AWS-SDK'); AWS.config.update ({accessKeyId: '****', secretAccessKey: '****', area: 'us-east-1'}); Var svc = new AWS.DynamoDB (); ! Svc.client.describeTable ({TableName: "user"}, function (hey, result) {if (mistake) {console.log ('result' + [ITEMCOUNT] result); console.log ('success'); } Else {console.log ("fault is" + err);}}); The immediate answer to your question is that you will need to use the result. . The result of the jumpout Your callback function includes the IMAM account. However keep in mind that this count has not been updated in real time and can not show the status of recently inserted or removed in the table. If you want...

Installing Java 7 (Oracle) in Debian via apt-get -

ORKP Java 7 installs in Debian does not seem to work through install-repository apache-get is not identifiable apache-get install oracle-java7-installer Java7-installer . Some managed to get answers after google .. echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu exact head" | Tee -a /etc/apt/sources.list echo "deb-sorate http://ppa.launchpad.net/webupd8team/java/ubuntu exact head" | Tee -a /etc/apt/sources.listPT-KeyAd --KerserWorksHKP: // Keyser YouTube.com: 80 - RECV-keys EEA 14886 APT-Update Update # Java 7 APT-OK Install Oracle-Java 7- The installer # is the command for Java 8: apt-get install oracle-java8-installer

pessimistic locking - Lightswitch 2011 Concurrency Control -

मेरे पास दो प्रश्न हैं। क्या लाइटस्च 2011 समर्थन भी निराशावादी concurency नियंत्रण? यदि हां, तो कैसे? क्या बाहरी डेटा स्रोत से मेज पर आशावादी नियंत्रण का समर्थन स्तंभ है या केवल पंक्ति की स्थिति (मूल मानों का उपयोग करके) का उपयोग करें? Lightswitch 2011 केवल आशावादी संगामिति का समर्थन करता है। हववेर, मैं लाइटस्विच में निराशावादी संगामिति को सफलतापूर्वक एकीकृत कर रहा हूं। मैं एंटरप्राइज़ एप्लीकेशन आर्किटेक्चर (मार्टिन फोवलर) के पैटर्न के साथ मोटे-ग्रेंड लॉक का उपयोग इकाई फ़्रेमवर्क चुड़ैल के साथ में पहले से ही यूनिकऑफ़वर्क (ऑब्जेक्टटॉन्टेक्स) और रिपॉजिटरी (ऑब्जेक्टसेट) शामिल है। EF से ExecuteStoreCommand और ExecuteStoreQuery का उपयोग करके लॉक की प्राप्ति, रिलीज़ और चेकिंग रूट और बच्चों की संस्थाओं के लिए सीआरयूड संचालन के साथ कस्टम आरआईए सेवा लागू की गई थी। ROWVERSION के साथ आशावादी नियंत्रण कस्टम आरआईए सेवा के साथ संभव है जो ईएफ से मॉडल का उपयोग करता है।

ios5 - How i can change iphone view background ? -

I used this code, however, the scene background did not change. UIColor * background = [[UIColor alloc] initWithPatternImage: [UIImage imageNamed: @ "background.png"]]; [[See itself] setBackgroundColor: background]; [Background release]; Try: self.view BackgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @ "background.png"]]; This will save your memory to create background variables.

ios - UITableViewCell background image setting -

I try to add a background image to my UITableViewCell . This is the code that I am using: - (UITableViewCell *) TableView: (UITableView *) Table View CellForAind Pump: (NSIndexPath *) Index Path {Fixed NSString * CellIdentifier = @ "TableCell "; // Create a deck or type of suitable type table cell * cell = (tableclay *) [tableview decouwer reusable cell identifier: cell identifier]; Cell.backgroundView = [[UIImageView alloc] initWithImage: [[UIImage imageNamed: @ "cellbg.jpeg"] Strenuous image with left capwidth: 0.0 topcaphight: 5.0]]; Cell.selectedBackgroundView = [[UIImageView alloc] initWithImage: [[UIImage imageNamed: @ "cellbg.jpeg"] Stretchable Image with Left Cap Width: 0.0 Top Caphite: 5.0]]; If (cell == zero) {NSArray * nib = [[NSBundle mainBundle] loadNibNamed: @ "tableclay" owner: self choice: zero]; Cell = [nib object at index: 0]; } [Cell. Prepaid Leback Set Font: [UIFont fontWithName: @ "bold" size: 20]]; // Confi...

scala - Faster code for 'distinct' on lists -

This question refers to code generation with Isabel / HOL theorem project. I get one of the following: code DIF member [ A: HOL.Agbabel] (X0: List [A], Y: A): Boolean = (x, y) match {case (blue, y) => False case (x :: x, y) => HOLC [A] (X, Y) || Member [A] (Xs, Y)} DIF specific [A: HOL.Egele] (X: List [A]): ​​Boolean = X Match {Case Neal => True case x :: xs = & gt; ! (Member [A] (xs, x)) & amp; Amp; Specific [a] (xs)} This code has quadratic runtime. Is there a fast version available? At the beginning of my theory, I think about something like import code and code for import and code for "~~ / src / HOL / Library / Codechar" for the list. Better implementations for specific must be sorted in the O (n log n) list and iterate over the list once. But I think someone can do better? Anyway, there is a fast implementation for different and possibly available from main ? I do not know about any fast implementation in the Isabell 2013 li...

javascript - Efficiency of .off() / .on() jQuery event handler binding combo -

I have an object, and when that object is done immediately, this is a click event handler for & Lt; Body & gt; ; . (The process of enclosing that object with the definition) This object is instant when the URL changes (when the user navigates to another page). Thus, 'per page' is always a type, and as mentioned earlier, when it is changed, it is restored and the old object will no longer exist. The attached process looks like this: var doc = $ (document.body); Doc.off (click on '); Doc.on ('click', function () {do_stuff ();}); I am using this because I have seen that if only the event handler is attached, except for .off () , the handler is a simple Clicks on fire more often as I navigate through the site (because it was attached / registered with every acceleration of that object). Now, I can move this attachment process elsewhere, for example in the code section where it is immediately, so it will not depend on the object and will assure ...

zend framework2 - How to put special tags for each form element? -

मेरे पास फ़ील्ड के साथ फ़ॉर्म है: $ this - & gt; जोड़ (सरणी ('नाम' = & gt; 'प्रथम मैदान', 'गुण' = & gt; सरणी ('प्रकार' = & gt; 'पाठ', 'आईडी' = & gt; 'id_firstfield'), 'विकल्प' = & gt; सरणी ('लेबल' = & gt; 'प्रथम मैदान'),)); $ इस - & gt; सरणी ('नाम' = & gt; 'सेकंडफील्ड', 'विशेषताएँ' = & gt; सरणी ('प्रकार' = & gt; 'पाठ', 'आईडी' = & gt; 'id_secondfield'), 'विकल्प' = & gt; जोड़ें ('लेबल' = & gt; 'सेकंडफील्ड'),)); जब मैं इसका उपयोग करता हूं: $ echo-> gt; फ़ॉर्मक्ल्यूशन ($ फॉर्म); मेरे विचार में, मुझे मिलता है: [...] & lt; लेबल = "id_firstfield" & gt; पहले फ़ील्ड & lt; / label & gt; & Lt; input name = "firstfield" type = "text" id = "id_firstfield" मूल्य = "" & gt; & Lt; लेबल = ...

jquery - Making a scrollable table with fixed header and fixed sidebar -

I always have to show the header and sidebar index, but let's scroll through the contents easily x & amp; Y ... any solution to this problem? I have seen the DataTables jquery plugin (example :) but I was wondering if there were any options. You can decide one thing Header if horizontal scrolling Demo: Sidebar Vertical Scrolling Demo: Or Your [Strange] Case Demo: // Recommended No Source Code:

Redirecting main site to keyword-rich subfolder for SEO -

I am working on SEO for the website of local car dealer in European e-commerce country. Most users are searching for used cars: "Car Dealer Volkswagen Golf" and we keep a very good rank for this because our URL for cars is example.com/car-dealer/volskwagen/golf. Although there is no keyword in our domain and if you search for a car dealer you will never find us, though we are using this keyword on our main site very often (with actual keyword accent) , But users are searching without them - we are on the fourth page) so I can move the main site with 301 redirects to the keyword-rich subfolder. Area was thinking - & gt; For example example.com/car-dealer Do you think it may be worthy? I know that the value of the keywords in a domain is small and small, although there is a small competitor who has never done anything for SEO, he does not even have a description tag, he has a maximum of 5 Inbound link, but its domain name is "Cardinal XYZ" and it is on the f...

mysql - Selecting from a second bd_table based on array results PHP -

Please be patient with this question because I am quite new to PHP (except for contact form and login form etc). event_id, event_name, event_time, etc, etc. Then I have a table (event_followers) for the follower of the event: event_id | User_id event_id | User_id event_id | User_id Whatever event I need is to select all the events that are following a particular user and show it as an array and then any kind of incidents Can any array / result be done in any way to get specific information about it? I'm sorry, if this is the basic php, but as I said I am very new to this. Thanks Try this: $ query = mysqli_query ("SELECT * Event_followers.event_id = events.event_id WHERE event_followers.user_id = '. $ User_id ") on fol as events LEOTH event_followers from events; While ($ line = mysqli_fetch_assoc ($ query)) {print_r ($ line); } mysql * functions has been deprecated, so use of mysqli _ * or PDO But I am not good on that, so I wrote the co...

windows ce - Example of directshow transform filter for wince -

I wrote a DirectShow filter for win7 and I have a problem closing it in wince6. Is there any examples to transform to wince? I could not find any. You will find some Windows Mobile DirectoryShoters with the source:.

html - bootstrap modal bad positionned -

I am using a bootstrap model, when I put it inside a div which is a feature in a row , The model is not well conditioned example & lt; Div class = "content" id = "content" align = "center" & gt; & Lt; Div id = "div" class = "modal hide fade" tabindex = "- 1" role = "dialog" aria-labelbedby = "myModalLabel" aria-hidden = "true" & gt; & Lt; Div class = "modal-header" & gt; & Lt; Button type = "button" class = "off" data-rejected = "modal" Aria-hidden = "true" & gt; And;; & Lt; / Button & gt; & Lt; H3 id = "divTitle" & gt; & Lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div id = "divBody" class = "modal-body" & gt; & Lt; / Div & gt; & Lt; Div class = "modal-footer" & gt; & Lt; Input type = "button" class = ...

c++ - Evading including headers to the .h file -

I am told that I . To do CPP, they told me to create a prototype class: class abc; Instead of : include in "abc.h" but this is just a matter of ABC class Is not being used in the form of attribute or return value if it is a parameter, then I can use prototype ... why is it? Besides, why is it so bad to include so many headers in .h file? Thanks If this is a parameter, then I Can I use ... why is this? Whenever you do not need access to the internal structure of the declared class, you can use the next declaration, for example when you use an indicator, a reference, or a parameter As declared it passed. You can not use a forwarded declaration to call any member of the successor of a class or to reach its members, or to declare non-pointers / reference type members: This is because within the orbit The structure should go to the compiler Why is it so bad to include so many headers in .h file? This is not omnipresent "bad" in itself, b...

mysql - it is possible to reference one column as multiple foreign keys -

Image
I have some tables, and I want to refer to a column from the PDF table in several other tables. For example, if the PDF table select output looks like this: ITEM_TYPE ITEM_ID QUANTITY 1 23 3 2 12 1 It tells me: PDF has 3 car wheel products, and up to 1 car template header; I have written the code but do not work properly: create tab 'pdf_created` (`id` INT (10) unsigned NULL unique AUTO_INCREMENT,` pdf_id` INT (10) nOT NULL, `item_type` INT (3) unsigned nOT NULL,` item_id` INT (10) unsigned nOT NULL, `quantity` INT (3) not NULL, pRIMARY KEY (` Id`), key `FK_pdf_id` (` pdf_id`), Badha` FK_pdf_id` foreign key ( `pdf_id`) to Sndrb` pdf` (` id`), Kunji` FK_item_type` ( `item_type`), Badha` FK_item_type` foreign key (` item_type `) Referred` item` (`id`) to CASCADE on the update CASCADE, the key Let `FK_item_id` (` item_id`), Badha` FK_item_id` foreign key ( `item_id`) to Sndrb` product` (` Aidi`) update CADE on Daily Cascade CAS barrier `FK_item_id` foreign key (`...

iphone - video editing like Aviary image editing or Instagram app -

Image
I am developing an application that uploads the video with various effects as shown in the image. Now I want to edit the video in Aviary SDK or Instant Appeal as Image Editing. Is there any framework available for video editing in Objective-C? Do you mean the filter by editing? try . The best you can get for free.

c# - save the color of a text in a database and copy text with color into a richtextbox -

जब मैं इसे richtextbox में प्रतिलिपि करता हूं, तो मैं एक पाठ का प्रारूप बनाए रखना चाहता हूँ मैं यह करता हूँ? (जब आप माइक्रोसॉफ्ट वर्ड डॉक्यूमेंट में कोड कॉपी करते हैं, तो कोड का रंग दृश्य स्टूडियो में होगा (यहाँ दिखाओ)) और मैं पाठ को एक एसक्यूएल डाटाबेस में सहेजना चाहता हूं और उसे पुनः लोड करना चाहता हूं उसी प्रारूप (रंग, आदि) के साथ। मुझे पता है कि डेटाबेस में डेटा कैसे सहेज और पढ़ा जाए, लेकिन मैं प्रारूप को कैसे रंग (रंग) से बचा सकता हूं? आप फ्लो डॉक्यूमेंट को भी बचा सकते हैं जो RichTextBox.Document में स्ट्रिंग के रूप में hiden है सार्वजनिक स्थिर स्ट्रिंग ToStringExt (यह IDocumentPaginatorSource flowDocument) {XamlWriter return (FlowDocument); } फ्लो दस्तावेज़ के रूप में इसे वापस रूपांतरित करने के लिए आप इस एक्सटेंशन का उपयोग कर सकते हैं सार्वजनिक स्थिर बूल आईएसफ़्लो दस्तावेज़ (यह स्ट्रिंग xamlString) {यदि (xamlString.IsNullOrEmpty () ) नए तर्क को फेंक दें NullException (); यदि (xamlString.StartsWith ("& lt;") और amp; xamlString.EndsWith ("...

encoding - Why does Internet Explorer encode the URL differently when Control-clicking a link -

Image
I am facing a problem where Internet Explorer (10, but I think I have the old IEs The only problem is) encode is based on a URL differently if I normally click on a link or if I open a new tab by pressing it on. I have made small jsbins to test this problem, and when I click the Normally link in the Wahaheharak Show: This is what I get when control-click : Note that " A "???" is different encoded in the URL, in the first case "\ 305", and the second "\ 303 \ 205". How to regenerate You need a warehark or something similar, so some work is required. Go to this Jsbien: In Internet Explorer Start VirarSharck (or your tool of choice) and start capturing. Click the "testme" link (usually, not with control). Click on the link while holding control Compare URL in Wearhark Why this is happening, and more importantly, Is there any alternative solution or actual improvement? the This is an invalid URL can fo...

javascript - positioning jquery-ui-combify -

Image
मैं jquery.ui.combify का उपयोग कर रहा हूं। निम्नलिखित मेरा है HTML फ़ाइल: & lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; link rel = "स्टाइलशीट" href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/base/jquery-ui.css" प्रकार = "टेक्स्ट / सीएसएस" मीडिया = "सभी" / & gt; & Lt; स्क्रिप्ट src = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; script src = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; link rel = "stylesheet" प्रकार = "text / css" href = "jqgridcss / jquery.ui.combify.css" / & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" src = "jqgridjs / jquery.ui.combify.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; स्क्रिप्ट प्रक...

c++ - Convert a std::vector of a boost::variant type -

How do I apply the function below to convert the container to Value Can I? ? I want to claim that if all the members of value are of the same type, that is, the vector contains a mixture of strings and inti. The reason for this is that the return value of the function is either std :: vector & lt; Int & gt; or std :: vector & lt; Std :: string & gt; . typedef boost :: version & lt; Int, std :: string & gt; value; Typedef boost :: version & lt; Std :: vector & lt; Int & gt; Std :: vector & lt; Std :: string & gt; & Gt; Container; Container Value to Container (Constant Stroke :: Vector & lt; Value & gt; and Values) {Return Container (); } outline converter_visitor: public boost: static_visitor & lt; Container & gt; {Const. Std :: vector & lt; Value & gt; & Amp; _cont; Converter_visitor (Constant Stroke :: Vector & lt; Value & gt; & amp; r): _Cont (r) {} Template & lt; Class T ...

asp.net - MVC: Visual Studio Publish Web dialog cannot find my application's Views -

मैं ASP.NET MVC 4 अनुप्रयोग को Visual Studio 2010 का उपयोग कर प्रकाशित कर रहा हूं 64-bit विंडोज 7 व्यावसायिक मशीन पर IIS 7.5 चल रहा है। जब मैं प्रकाशित करें पर क्लिक करता हूं > विज़ार्ड पर मान दर्ज करने के बाद, यह एक भी त्रुटि रिपोर्ट करता है जो पढ़ता है: फाइल को कॉपी कर रहा है \ Shared \ Error.cshtml को obj \ Debug \ Package \ PackageTmp \ Views \ Shared \ Error.cshtml असफल रहा I फ़ाइल 'दृश्य' साझा नहीं कर सका 'error.cshtml' मैंने लक्ष्य फ़ोल्डर में देखा जहां विज़ार्ड आवश्यक फाइलों को फेंक देता है जो कि अनुप्रयोग को परिनियोजित करने के लिए आवश्यक होगा। यह पता चला है कि फ़ोल्डर के दृश्य फ़ोल्डर में केवल रूट दृश्य फ़ोल्डर का _ViewStart.cshtml था, लेकिन कोई अन्य दृश्य नहीं था। मेरे आवेदन में कम से कम 20 विचार हैं, शायद अधिक। मुझे एहसास हुआ कि यह मेरी गलती थी मेरे प्रोजेक्ट की स्थानीय प्रति दृश्य = साझा फ़ोल्डर में त्रुटि.cshtml फ़ाइल थी हालांकि, परियोजना फाइल की टीएफएस प्रतिलिपि नहीं हुई। जाहिर है, फाइल को कुछ स्तर पर परियोजना से बाहर रखा गया थ...

c - Still get 'curl/curl.h: No such file or directory' in spite of all looks proper -

मैं विंडोज़ curl 7.28.0 पर स्थापित किया है से curl-7.28.1-devel --mingw32.zip के माध्यम से minGW कंसोल को डिफ़ॉल्ट निर्देशिका जैसे: ./ config और amp; amp; बनाओ और amp; amp; स्थापित करें सभी आवश्यक शीर्ष लेख (उर्फ curl.h, types.h ... ) मैं C: \ MinGW \ msys \ 1.0 में देखता हूँ \ Local \ include \ curl libcurl.pc को सी में रखा गया है: \ MinGW \ msys \ 1.0 \ local \ lib \ pkgconfig \ libcurl.a , libcurl.dll.a और libcurl.la में रखा C: \ मेरा download_file.c फ़ाइल शामिल हैं: ... # शामिल करें & lt; curl / curl.h & gt; # शामिल करें & lt; curl / types.h & gt; # शामिल करें & lt; curl / easy.h & gt; ... मैं सी के माध्यम से सी कोड को संकलित करने का प्रयास करता हूं : $ Gcc -IC: /MinGW/msys/1.0/include/ -IC: /MinGW/msys/1.0/local/include/curl-IC: /MinGW/msys/1.0/local/lib/pkgconfig-o डाउनलोड_फाइल डाउनलोड_फ़ाइल C -llibcurl -lcurl पूर्ण पथ के साथ एक ही त्रुटि मिलती है: जीसीसी -आई / शामिल / -आई / स्थानीय / शामिल / कर्ल -आई /...

How to disable UITableView horizontal scroll in iOS 6? -

Open a view controller screen in landscape after rotating, UITableView how horizontal scroll UITableView horizontal scroll disable? I also tried to use the following code self.tableView.contentSize = CGSizeMake (self.tableView.frame.size.width, self.tableView.contentSize.height); similar paste the code - (minus) DidRotateFromInterfaceOrientation: (UIInterfaceOrientation) from Intrfesoriynteshn {self.tableViewProductChild.contentSize = CGSizeMake (self.tableViewProductChild.frame.size.width, self.tableViewProductChild.contentSize.height); } Thanks for your help.

sql - Report Schedule -

I need to create a report in SSR2008 R2, which shows a "calendar" of training sessions. Give me an example: I have a session that has a start date and end date, and its start time and end time. I wanted to create a table in which the columns were on the day of the month, and the lines were in my case, at 8 a.m., 9 o'clock ... Its purpose would be something like this: I have a desk where I can get all the initial time and expiry time period With session with initial date My concern came up again on the following aspects: Do you need a table with year, month, day? What about Ace Hour? Also I need some table? Or create tables directly in the report? I am out of ideas to solve this problem, and would like to know some opinions and if possible please report it in the services. First Editing: I have data sessions in this session: IdSession | Name session | Introduction Start time End time | 1 | Module 1 | 2013-01-01 | 2013-01-01 09:00:00 | 2013...

javascript - show above input.focus() -

When I input.focus (); Trying to input the input with the error cursor indicates on that input, but since I have a fixed header whose height is around 100px, the input field is not showing. Is there any way from where I could input those input fields like Input.focus (-100); ? I also have input.scrollTop (); , but it does not go anywhere near that input. Here are some ideas. var top = input.offset (). Top 100; // or input.position () Top + 100; $ (Document) .scrollTop (above);

c# - WPF TabControl tab changes not refreshed -

I have WPF TabControl with two TabItems . I am trying to change the event and execute some other code by clicking the selected tab on the code behind the code on the button . In this example: Private Wide Buttonic (Object Sender, Routing Avent, ARGS E) {ConvertDataTab Control. Select Index = 1; System.Threading.Thread.Sleep (2000); ...} I hope to refresh the UI and go from tab 0 to tab 1 and then only The sleep method must be executed, but UI is only refreshing after finishing the Button_Click execution. I tried to call InvalidVisual , but it does not work. What is Sleep The code runs on the UI thread by default, so the thread can not be executed on the UI thread (such as layout) until the thread is executed. There are several ways to issue control of the UI thread before the code is over, but I think the code can be used to run from the use of a task It's simple to do on a different thread. For example, Tasks. Factor Start New (() => {Thr...

sql - CREATE SCHEMA using a name stored -

I am trying to create a new schema on my postgres database which is stored in an existing table, my query is Looks like: Create smaima (selection name from table) but I'm getting a syntax error. What am I doing wrong? Is this a valid way to create a new schema? Which second solution exists for this problem? It is not possible, schema syntax requires a valid schema name (i.e. valid schema name string ). The exception to your case ***************************************** ERROR: Syntax error or "State: 42601 Character: 15

mysql - Retrieving more than one row of data using PHP -

I am trying to create a function that runs the query that returns all the data located in my MySQL database . My current code only gives a line of data (is 7) function_community_get () {$ this-> load-> Database (); $ Sql ​​= 'Select from Employee'; $ Query = $ this- & gt; Db- & gt; Query ($ sql); $ Data = $ query- & gt; Line (); $ This- & gt; Feedback ($ data, 200); } I thought it was "$ data = $ query-> line ();" Although I tried to change the "row" from "array" but it does not work, the text is designed to come out as plain text so that I can manipulate it using jQuery template. Thanks for your help in advance. You have to put the result in a loop at a time. Something on the lines of this function_smart_get () {$ this- & gt; Load-> Database (); $ Sql ​​= 'Select from Employee'; $ Query = $ this- & gt; Db- & gt; Query ($ sql); While ($ data = $ query- & gt; line ()) {$ this-...

c# - get the n latest changelists in a specific period -

I want to get the latest 20 changes in this period. How do I modify options? This is very important to me because I will collect some data from the data provided by Pratibal. Here is my code: string deppath1 = "// obms / ..."; P4 Commands CM1 = New P4 Commands (ps, "change", true, string.format ("{0}", path 1); Option opchanges = new options (); Opchanges.Add ("2012/04/01", "Now"); P4 commodity result result 1 = cm1. Rhone (options); If (results1! = Null) console Wrightite ("ggh"); Tagged Object List Listed 1 = New Tagged Item List (); Listfiledown1 = (results1.TaggedOutput); Foreign exchange (listed in the tagged object obz 1) {foreach (obj.Keys in string s) {string value = "n / a"; Obj.TryGetValue (S, Out Price); Console.WriteLine (s + "+ value"); Console.WriteLine ("********"); }} opchanges.Add ("- mn -u edk -s Submitted 2010-04/01 "," now "); n The number...

javascript - jQuery remove cloned element on click -

I have a script that removes duplicate forms when clicked. But when you hit, I just want to remove the form that was cloned. I believe I need to use the $ this , but it's not sure how? jQuery $ ("remove"). Click (function () {$ ('. Duplicate'). Remove ();}); HTML & lt; Div class = "duplicate" & gt; & Lt; P & gt; Form Duplicate & lt; / P & gt; & Lt; A href = "#" class = "add" & gt; Add guest & lt; / A & gt; | & Lt; A href = "#" class = "remove" & gt; Remove & lt; / A & gt; & Lt; / Div & gt; & Lt; Div class = "duplicate" & gt; & Lt; P & gt; Form Duplicate & lt; / P & gt; & Lt; A href = "#" class = "add" & gt; Add guest & lt; / A & gt; | & Lt; A href = "#" class = "remove" & gt; Remove & lt; / A & gt; & Lt; / Div & gt; H...

python - lxml adds urlencoding in xml? -

I will indicate that I am using Python 2.7.3 (x64) on Windows 7, in which LXGL 2.3 is. 6. I have a little bit weird problem, I'm hoping someone can help it. I have not found a solution online, maybe I am not looking for the right thing. Still, I have a problem where I am making the program with XML using LXML, then I am outputting it in a text file, problem LXML Carriage Returns to Text & amp; ; # 13; , almost URL encoding - but I am not using HTML, I am using XML. For example, I have a simple text file created in Notepad, such as: This is my text Then I create some XML and add this text to XML in the XML: from the lxml import attribute to the line in the text entry = "" fh = open ("mytext.txt", "rb") : Textstr + = line root = etree.Element ("root") a = etree.SubElement (root, "some_element") a.text = textstr print etree.tostring (root) The problem is that the print is produced here: Line breaks are ...

c++ - How to convert wstring to string as escapes -

I have a wstring, what is the best way to save it, such as \ u043d \ u043e \ U043c \ U0430 ? Below does one work but does not look best: string output; For (wchar_t chr: wtst) {four codes [7]; Sprintf (code, "\\ u% 0.4x", chr); Output + = code; } A less compact but faster version that a) Allocated prematurely and b) std :: wstring wstr (L "\ x043d \ x043e \ x043c \ x0430") ; Std :: string sstr; // reserve memory 1 hit to avoid copying for longer string; static size_t const nchars_per_code = 6; Sstr.reserve (wstr.size () * nchars_per_code); Four code [nchars_per_code]; Code [0] = '\\'; Code [1] = 'U'; Static Four Constants * Constant Hexelt = "0123456789abcdef"; Std :: wstring :: const_iterator i = wstr.begin (); Std :: wstring :: const_iterator e = wstr.end (); For (; i! = E; ++I) {unsigned wc = * i; Code [2] = (Hexlat [(wc> & gt; 12) & amp; 0xF]); Code [3] = (Hexlat [(wc & 8; & amp; 8; & amp; 0xF]); ...

c# - Generics List<List> -

If I have list gt; is the type of MyClass , for example list & lt; List & lt; MyClass & gt; & Gt; and MyClass to MyClassB is the original class. Why can not I do the following? list & lt; List & lt; MyClass & gt; & Gt; All List = New List & lt; List & lt; MyClass & gt; & Gt; (); & Lt; MyClassB & gt; MyList = new list & lt; MyClassB & gt; (); MyList.Add (New MyClassB ()); // And now the point all lists do not work. Add (my list); If I apply a method, then I can say SomeClass & lt; T & gt; ... where t: myclass , is there anything like my list problem? So that I will add any child category list to my first-level list? The reason for this is not that you can do this: think allLists.Add (MyList) then the compiler will know that all the list [0] a list , so the following would be OK: all the listings [0]. Add (New MyClassX ()); This will be a runtime error, because all the list [0]...