Posts

Showing posts from February, 2013

php - Using empty over == "" -

It has come to my attention that by using (empty ($ var)) { It is not as efficient as most people think instead of using empty () if I am using ($ Var == "") {{/ Code> Because if the text box / input is a white space, it is not empty .. while using white at white locations using == "" Is not taken care of, so if any white spot and cave If there is a white spot, then my second example is more for PHP documentation The following things are considered empty: "(an empty string) 0 (0 as an integer) 0.0 (0 as a float)" 0 "(As a string) Null Falls array () (an empty array) $ var; (A variable has been declared, but without any value) It seems that you are just checking that there is a non-existent The black color is the character and therefore it should work: if (stroken ($ var) == 0)

Reading file into object array C++ -

I have to read from a data file that is formatted like this abcd (string) 1 ( Int. 2 (Int) 3 (Int) - ABCDE (String) 4 (Int) 3 (Int) 2 (Int) . . . I want to do some functions that only use the variable in the same line but here is my code. I am starting because so please thank me right. In the .h file #include & lt; String & gt; using namespace std; #ifndef CALC_H # defined CALC_H class calc {public: Read Zero file (string file); Private: The name of the string; Int a; Int b; Int c; }; #endif in the implementation file #include "vehicle.h" include # iostream & gt; # Include fstream & gt; # String & gt; Include # include cstdlib & gt; # Include & gt; using namespace std; Zero vehicle :: readFile (string filename) {ifstream myIn; Ent Qulanum = 0; MyIn.open (filename.c_str ()); If (! My in) {cerr & lt; & Lt; "Failed to open data file! \ N"; Exit (0); } For (int i = 0; i And then I want to read that file for (int...

c# - Very confused about how to Group by in LINQ, and even more confused about HAVING -

I'm new to Linq. I'm trying to change this simple SQL query, but to change LINQ to SQL No great resources can be found. My SQL query is: Select some value from some value SomeValue HAVING SUM (OtherValue) & gt; 0; I do not understand enough LINQ to do this. I'm having a lot of trouble working with the group, I have not tried to deal with it so far. I have tried some things. This is most recent, though it is still very wrong: By entering someTable group entry from the entry. Select grp in some values ​​grp.Select (x = & gt; x.SomeValue) .toList (); Any help or resources will be good. The grouping is working to get it seems that you want it (rather than Lambda Query syntax): Log in from some entry into the Stable Group Entry. Some values ​​include GRP where grp.Sum (x => x .OtherValue) & gt; 0 Select grp.Key;

asp.net - ImageResizer - The process cannot access the file because it is being used by another process -

यह पंक्ति त्रुटि फेंक रहा है: ImageBuilder.Current.Build (imgURL, imgURL, resizeImg); किसी भी विचार क्यों? सार्वजनिक शून्य सेटइमजिज़ (स्ट्रिंग नियंत्रण आईडी, स्ट्रिंग फाइलनाम) {दशमलव currentWidth = 0; दशमलव वर्तमानहाइट = 0; Int maxFileWidth = 600; Int maxFileHeight = 600; Bool imageExists = false; स्ट्रिंग imgURL = "~ / SODocs /" + सोनम + "/" + फाइलनाम; स्ट्रिंग imgPath = Server.MapPath (imgURL); अगर (फ़ाइल। एक्सिस (आईएमजीपीएएच)) {imageExists = true; System.Drawing.Image imgFile = System.Drawing.Image.FromFile (imgPath); छवि imgControl = FindControl (controlId) छवि के रूप में; Int maxDisplayWidth = 273; Int maxDisplayHeight = 200; CurrentWidth = कन्वर्ट.ToDecimal (imgFile.Width); CurrentHeight = कन्वर्ट.ToDecimal (imgFile.Height); Int newDisplayWidth = 0; Int newDisplayHeight = 0; Int paddingHeight = 0; अगर (वर्तमानहाइट & gt; वर्तमान वाइड) {imgControl.Height = maxDisplayHeight; NewDisplayWidth = कन्वर्ट.ToInt32 ((maxDisplayHeight / currentHight) * वर्...

objective c - Blocks retain cycle from naming convention? -

मुझे निम्नलिखित व्यवहार को खोजने के लिए आश्चर्य है ... @interface Foo: NSObject - (शून्य) ऐडबार: (आईडी) के साथ एबर सम्मिलित करें: (शून्य (^) (शून्य)) पूर्णता; @ अंत @ इंटरफेस AwesomeClass: NSObject @property (मजबूत, nonatomic) Foo * foo; - (शून्य) doSomethingWithBar: (आईडी) बार; @end @implementation AwesomeClass - (शून्य) doSomethingWithBar: (आईडी) बार {[self.foo addBar: बार के साथ समाप्ति: ^ {NSLog (@ "% @", self.foo); }]; } एक्सकोड 4.6.1 में मुझे -doSomethingWithBar: के कार्यान्वयन में एक चेतावनी मिली है कि "इस खंड में स्वयं को" कैप्चरिंग "दृढ़ता से आगे बढ़ने की संभावना है एक बनाए चक्र। " हालांकि, यदि मैं नाम विधि का -addBar: withCompletion: से -setupBar: withCompletion: यह चेतावनी दूर जाती है ऐसा लगता है कि इस पर मेरा आश्चर्यजनक वर्णन है कि मुझे उद्देश्य- C नामकरण सम्मेलनों के बारे में अपने ज्ञान में अंतर मिला है! कोड [self.foo someMethod: बार के साथ समाई: ^ {NSLog (@ "% @", self.foo); }]; आमतौर पर एक बनाए रखने क...

oop - How do I access a superclass's constant property within Matlab? -

मेरे पास एक साधारण वर्ग संरचना है जैसे: classdef super & lt; Hgsetget गुण (स्थायी = सत्य, एक्सेस = निजी) PROP1 = 1; PROP2 = {2 [3 4] [5 6]}; अंत तरीकों से समारोह self = super () // कन्स्ट्रक्टर कोड यहाँ // ... एंड एंड एंड जो तो एक उपवर्ग द्वारा विरासत में मिला है। क्लासडेफ़ उप & lt; सुपर गुण PROP3 = 7; अंत तरीकों से समारोह self = sub () // उपवर्ग कंसट्रक्टर यहाँ // ... self = self @ super (); परीक्षण = आत्म। PROP1; // मुझे सुपर एंड एंड एंड से PROP1 तक पहुंच नहीं होने की प्रतीत होती है मेरी समस्या तब होती है जब मैं सुपर की संपत्ति PROP1 या PROP2 मुझे एक्सेस प्राप्त नहीं हुआ है: कक्षा उप के लिए कोई उपयुक्त विधि, संपत्ति या क्षेत्र PROP1 सुपरलैस सुपर में कोड> संपत्तियों के गुणों को सेट करें गुण (कॉन्स्टेंट = सच्चे, एक्सेस = सुरक्षित) एक एक्सेस एट्रिब्यूट से यह निर्धारित करता है कि कौन से कोड इन गुणों का उपयोग कर सकता है: / P> सार्वजनिक अप्रतिबंधित पहुंच सुरक्षित है ??? क्लास या उपवर्गों में तरीकों से पहुंच निजी एक ???? केवल वर्ग त...

c# - Export dynamic label text to Excel -

Image
मेरे पास एक छोटा सा प्रोग्राम है जो flowLayoutPanel1 में कुछ गतिशील लेबल्स उत्पन्न करता है I मा निर्यात करने का प्रयास कर रहा है इन लेबलों का पाठ एक्सेल में है, परन्तु मुझे जो मिलता है वह पिछले लेबल का मान है। यह मेरा निर्यात वर्ग है: class export {public export (bool defaultbackgroundIsWhite) {This.defaultBackgroundIsWhite = डिफ़ॉल्ट बैकग्राउंड ISWhite; ऐप = नया अनुप्रयोग (); App.Visible = true; कार्यपुस्तिका = ऐप। वर्क्सबुक। जोड़ें (1); वर्कशीट = (वर्कशीट) कार्यपुस्तिका। शीट [1]; } सार्वजनिक शून्य करें (स्ट्रिंग एक्सेलनाम, सिस्टम। विन्डोज.फॉर्म। लेबल नाम) {के लिए (इंट आई = 0; आई & lt; = 5; i ++) {एडम्स (i, 0, नाम); }} निजी शून्य addNames (int row, int col, System.Windows.Forms.Label lbls) {if (lbls == null) return; पंक्ति ++; col ++; रेंज रेंज = वर्कशीट। सील्स [पंक्ति + 2, कोला + 2]; Range.NumberFormat = ""; कार्यपत्रक। सील्स [पंक्ति + 2, कोला + 2] = lbls.Text; row--; col--; } निजी एप्लिकेशन ऐप = शून्य; निजी कार्यपुस्तिका कार्यपुस्तिका = नल; निजी वर्कशीट वर्क...

In Javascript, how do I print out a single element in an array every 5 seconds? -

मेरे पास [ संदेश ] विधियों [ .how () और । पुनर्प्राप्त करें () ]। विधि '.show ()' एक unordered सूची में अंतिम सूची आइटम के रूप में ब्राउज़र को एक संदेश प्रदर्शित करता है एक सर्वर से संदेशों की एक सीमित मात्रा में '। Retrieve ()' प्राप्त होता है इसकी कॉलबैक विधि को केवल एकमात्र पैरामीटर के रूप में ले जाता है यह तार की एक सरणी पारित करेगा सरणी में प्रत्येक स्ट्रिंग में एक संदेश होता है। मेरे पास निम्न कोड है: JS: Msg.retrieve (फ़ंक्शन (सरणी) {for (var i = 0; i & lt ; सरणी.लांबी; i ++) {संदेश.शो (सरणी [i]);}}); // कोड स्क्रीन के सभी संदेशों को सूची आइटमों के एक समूह के रूप में एक बार में आउटपुट करता है मैं प्रत्येक पांच सेकंड में एक संदेश कैसे प्राप्त करूं? मैं सेट इन्तरवल () पद्धति का उपयोग कैसे करें जावास्क्रिप्ट में अनिश्चित है। कोई भी मदद बहुत ही सराहनीय होगी। धन्यवाद! पुनः प्राप्त करने के बाद, एक टाइमर सेट करें और एक समय में सरणी एक मान को स्थानांतरित करें: Msg.retrieve (फ़ंक्शन (सरणी) {var timer = setInterval (function () {if (array.l...

css - Have a clickable image to open embedded content in wordpress - Space Invaders -

I would like to be able to click on an image on any of my blog pages and then add some embedded content to it. Specifically, I would like to create a cover image for the game of this space invaders here: Embed code = I would like to click on my custom cover image in this page and then the game will start, but I do not know how to do it. I 've used WordPress for some years, but only minor style changes are ... nothing like that. Any help for the beginning will be greatly appreciated! I'm not an experienced programmer. -C Here you can do it with jQuery, one Javascript library is: & lt; Style & gt; #cover {width: 480px; Height: 360px; Background: URL (JPG) left top duplication; } #game {display: none; Width: 480px; Height: 360px; } & Lt; / Style & gt; & Lt; Div id = "cover" & gt; & Lt; / Div & gt; & Lt; Div id = "game" & gt; & Lt; Object & gt; ... & lt; / Object & gt; & L...

development environment - Programming without installing or maintaining servers -

== समस्या == मुकेश एक सक्षम PHP और एएसपी है प्रोग्रामर-प्रकार जो ज्यादातर वेब विकास करता है वह विभिन्न प्रोग्रामिंग भाषाओं के आधार पर प्रोजेक्ट्स में शाखाएं बनाना चाहता है। समस्या यह है कि, मुकेश पर सिसडमिन वास्तव में अविनाशी है जो पूर्ण न्यूनतम न्यूनतम को छोड़कर कुछ की स्थापना या स्थापित करने की अनुमति नहीं देता है स्थानीय मशीनों पर इसके अलावा, मुकेश एक विंडोज़-आधारित मशीन के साथ जुड़ा हुआ है। मुकेश के पास एक एसएसएम टर्मिनल और एक टेक्स्ट एडिटर होगा, और संभवत: गिट का एक स्थानीय इंस्टालेशन होगा। यही बात है। == तर्क == अलग-अलग वातावरणों की एक गुच्छा में मुकेश के पूर्ण-स्टैक विकास की तरह महसूस करना चाहता है, लेकिन वह कार्यक्रमों को स्थापित करने में सक्षम नहीं है और इसके साथ काम करने के लिए एक सीमित बजट है। मुकेश केवल सभी अलग-अलग तरीकों पर ध्यान केंद्रित करना चाहता है, जिससे वे कई अलग-अलग वातावरणों में पूर्ण स्टैक प्रोग्रामिंग अनुभव हासिल कर सकें, जबकि अभी भी एक टेक्स्ट एडिटर और एसएसएच एक्सेस से ज्यादा कुछ नहीं है। == प्रश्न == कितने उत्पादों, सेवाओं या रणनीतियो...

javascript - Drag and Drop Html 5 file upload - Prevent loading -

I still have this code. I can see the dragentve and dragleave events, but when I leave the file, the browser opens (Chrome or Firefox) file (even a picture) Anyone who is called preventDefault () sees any mistake? What should I change? & lt; Script type = "text / javascript" & gt; $ (Function () {var $ box = $ ("# ulbox"); $ box.bind ("dragenter", dragEnter); $ box.bind ("dragleve", drag lev); $ box.top ("drop ", Drop); function dragor (evt) {evt.stopPropagation (); evt.preventDefault (); console.log (" dragent ... "); $ (evt.target) .addClass ('over'); back Return;} function drag lev (evt) {evt.stopPropagation (); evt.preventDefault (); console.log ("drag drag ..."); $ (evt.target) .removeClass ('over'); return Returned;} function drop (evt) {evt.stopPropagation (); evt.preventDefault (); $ (evt.target) .removeClass ('over'); var file = evt.originalEvent.dataTransfer.file...

opengl es - Pre Sorted 3d file type for indexed drawing -

I'm working on some 3D stuff in connection with Android, especially OpenEge ES 2.0. In all the (most) examples in my learning path, how do you take the Obj file (WAVEFRT.Obj) and rip it in the outside corner, even though on the further reading, you think both obj file and some other file type (on it) Are popular) decided to "go their own way", even if most 3D Libs do not have these freely indexed mice (separate division, normal and textured codes) of these file types. Like many of the indexes are mashed. So anyway I have a question: I have read in one place that there exist some file types that provide easy import in OpenGell (I have data in the OGJ file What to do, all the crazy shuffle electric slide Harlem shake stuff). Does anyone know some file types (open / friendly) that support a single pointer for indexed drawings? Try looking at Quak's MD2 format (good tutorial here) especially loaded in OpenGL has gone. On the contrary, the OBJ format is stil...

objective c - How to find out who called a method? -

Example: When my method is called - fooBar, I want to log in it to the console, another method Which is called the second class. _cmd [self class] Now, I know how to log the name of the method of the foos and its class is: Is it possible to find out? There is a fully customized code in which 100% certain methods No. The compiler can use the tail call optimization while the compiler uses the collar stack frame effectively to re-use for cali. To see an example, set a breakpoint on any method that uses GDB and see post-tracing. Note that you do not see objc_msgSend () before each method call because the objc_msgSend () makes a tail call for the implementation of each method. When you can customize your application to non-optimized, you will need non-optimized versions of all system libraries to avoid this one problem. And this is just a problem; In fact, you are asking, "How do I search for crashtrates or GDB again?" A very difficult problem on which the ...

Split url with javascript -

I am trying to split the following url: To get only I am using javascript window.location.href and partition, but not yet success. How can this be done? Thanks try it var fullurl = "http: // Www.store.com/products.aspx/Books/The-happy-donkey ", url = fullurl.split (" .aspx ") [0] +" .aspx ";

php - Page brings back old session after session_destroy -

No clue why this is doing but my logout.php code works fine and redirects to home page and Session is destroyed. When I go back to a certain page, it brings an old session that I do not get. That's my login file $ _SESSION ['id'] = $ line ['user_id']; $ _SESSION ['username'] = $ line ['username']; Setcookie ('id', $ line ['user_id'], time () + (60 * 60 * 24 * 2)); Setkey ('Username', $ line ['username']], time () + (60 * 60 * 24 * 2)); Here is my logout file // If the user is logged in, remove session to logout them session_start (); If (isset ($ _ session ['id'])) {$ _SESSION = array (); // if user (ADAT ($ _COOKIE [session_name ())) {setcookie ('session_name ()', '', time () - an hour ago (3600) by establishing its end to user id and user name Remove 3600); } // session session_unset () deleted; Session_destroy (); } // Delete user id and username password set cookies ('id...

sockets - Bluetooth SPP (serial) glitchs (Android) -

I am running a curious problem I have developed an app that will install a Bluetooth SPP link with an RDIO. Bluetooth device on Arduino is configured on 9600 baud. I can get data from arduino, but I think there is something wrong with price 0 or higher peaks. It is very upset because I need exact value for the graphing part and I know that arduino sends good data That's because I send it to a file. Why am I trying to fix or understand it instead of making an average or something similar instead of making it "patched"? Thank you for your help. Here is a picture that can explain my problem, arduino data is around 101 to 103: And here is the code Where I create a connection and get the data: Private class connected thread extended threads {Private end data inputstream mm instream; Private end data output stream mmOutStream; Public ConnectedRed (BluetoothSocket Socket) {InputStream tmpIn = null; OutputStream tmpOut = null; // Receive input and output stream, ...

ios - Incompatible pointer- MPMoviePlayer from URL -

I have an NSArray that loads video files from XML data when you press an array item It shows a button in which the NSString url is loaded. Here's the code to work on here. - (IBAction) playMovie: (ID) sender {RSSItem * item = (RSSItem *) self.description; NSURL * movieUrl = [NSURL URLWithString: item]; MPMoviePlayerController * Movie Player Controller = [[MP3 MPV Player Controller Alok] Init with Content URL: Film URL]; [Self.view addSubview: moviePlayerController.view]; Movie Player Controller Full screen = yes; [Movieplayer controller play]; } I'm getting a warning '' Incompatible Notifier Type 'RSSIT * _String' type is sending the parameter of 'NSString *' Whatever I think Can I try to do everything I can to convert the string to string and bring it to work. Please tell me that this question is very specific for the forum or basic. Thank you! this: RSSItem * item = (RSSItem *) self .description; It should be: NSString * ite...

matlab - reading and displaying video file frame by frame -

I am recently working with Matlab I want to read a video file and calculate something in every frame And display every frame. I wrote the following code, but every time it shows only the first frame, nobody can help. mov = VideoReader ('c: \ vid \ Akiyo.mp4'); NFrames = mov.NumberOfFrames; I = 1 for: nFrames videoFrame = reading (mov, i); Imshow (videoFrame); Note: mmreader has been API Closed by MATLAB, it likes to use the VideoReader . View comment by @Vivek. I usually do this: obj = mmreader ('c: \ vid \ Akiyo .mp4'); NFrames = obj.NumberOfFrames; K = 1: nFrames for img = read (obj, k); Figure (1), imshow (img, []); End As far as your code is concerned, I saw the documentation of MATLAB. You should work in the following order: mov = VideoReader ('c: \ vid \ Akiyo.mp4'); Read vidFrames = (MOV); NFrames = mov.NumberOfFrames; I = 1 for: nFrames imshow (vidFrames (:,:, i), []); % Frames are grayscale end

How to create layouts properly (Android) -

I am quite new to Android development and it was not really easy for me to prepare different layouts for each resolution Therefore, I was able to optimize my app for most devices (in the eclipse), but there are still some problems happening here and there: I really want different devices for each device-resolution in the related folder Make a copy of the same images with the proposals? I am currently using HDPI, large-HDMI, MDPI and XDPI folders ... Is it possible to use a drauble folder and it is possible to scale images is? Is there an additional drawer folder for those 5.1in (WVGA) /5.4in (FWVGA) devices? They are labeled with MDPI in eclipse, but these devices are using large HDPI folders and those images are very big, but that's right for Nexus 7. i''m is also using 4 different layout-folders (layout-SW360dp, sw480dp, sw600dp and sw720dp). Is each device group a proper way to create a layout? Hope someone can help me with this. thank you in ad...

java - Crawling data from Web, When page loads data dynamically at end of page -

I want to crawl data from some web to Java, but I have found that the page is loading when the page's Reaches the end. I'm not a web developer and do not know what technology they use to load data while reaching the end of the scroll page. Can you give me some hints? What technology did they use? How can I read the data when I do not want to use the browser? (I wrote a code with Java using urlConnection to read data from the site. The site is something like this. Thank you. This is a common "problem" of web crawler bots ... some pages have dynamic content added from the sources contained in it. Loads or triggers (such as your example - by scrolling down) can be loaded. When the target page downloads and scraps the dome structure In most cases, the HTML elements of the external data are not included. What I suggest to do is to identify the source path of this data, which is carefully coded on the dome And it is being called as a secondary source, which...

mysql - Installing multiple Moodle package -

Can I install multiple code on my local machine for development purposes? Currently, I have installed the latest Moodle dev version and it works fine. I will be able to use MySQL and phpMyAdmin as my will. How many Moodle packages will be affected MySQL or phpMyAdmin ? Any blog / post will be appreciated. I am using Ubuntu. Yes. Your seventh Moodle installation should be installed in this way: Open all files in Moodle 7; Make MoodleData 7 folder; Create Moodle 7 databases in phpmyadmin; Do not create a separate user, just give all the same privileges to the same user as the previous 6 installations; Install Open Localhost / Moodle 7 as a general, point installation wizard for the above folders and databases. If you want to clone your current Moodle installation, copy Moodle to Moodle 2, copy moodle data, moodleda 2, moodle 2 cloned database moodle, then moodle 2 folder In the root, edit dirroot , wwwroot and config.php to indicate the datab...

nhibernate - What is the best way to filter my SQL queries to search for a certain "top" parent? -

I have a website that uses nhibernate that asks a SQL Server database in one of the following tables Columns: ID # name - ParentId Then there are some entries in this table: ID name ParentId 1, " I try to run a query like this (pseudo-SQL), "3" 3, "Tim", 5 5, "Jack", 7 7, "Tom", blank I am doing . "Select * Like this, where 7's ISD Endend" and it will return 7 or children of children, etc. . (In this example above, all rows will be returned) Besides what is the best way to correct this without keeping everything in the loop, since I am using nhibernate, I can add it as a function in my code, but it seems that it translates hundreds of SQL statements. I'm also curious how to do it in raw SQL too. You can use recursive CTE in SQLServer2005 + Entry @ intern = 7; CTA with (SELECT Id, name, ParentId FROM dbo.test45 WHERE ID = @ EDi Union Select all t.Id, t.Name, t.ParentId Join DOTAST 45T. CTC on CT....

c# - Setting dropdownlist selected index -

I have a dropdown list with the name of the country in alphabetical order. I always show the dropdown to India as the default value I want to put in. I do not want to set the selected index with constant because other countries can be added later in the list, how can I set the index to "India"? ddlCountryCode.DataSource = ds1.Tables ["AUser"]; DdlCountryCode.DataTextField = "Contra Contro"; DdlCountryCode.SelectedIndex = ddlCountryCode.Items.IndexOf (ddlCountryCode.Items.FindByText ("India (+91)")); DdlCountryCode.DataBind (); does not work ... dropdown list 1. Selected index = dropdown list 1 Items.indexoff (dropdown list 1.tems.findbay value (str Text)); or dropdown list 1 Selected index = dropdown list 1 Items.indexoff (dropdown list1 item .Fundbit text (str Text)); Reference 1 Change the order of your code ddlCountryCode.DataSource = DS 1.Tables ["AUser"]; DdlCountryCode.DataTextField = "Contra...

asp.net - Control event not firing from within updatepanel -

I go to a listbox that is being updated through a timer and in the form of expected working within an UpdatePanel Is in. However, I can not bring the selected indicted event to the fire. I think there is something to do with a partial postback, does anyone know what I can do to do this work? When I take it out of UpdatePanel it works fine even though obviously I can not do partial postbacks UPDATE: Now try to make changes below, the timer event is still working but not the selected induced event. . I am losing with this & lt; ASP: UpdatePanel ID = "UpdatePanel" runat = "Server" ChildrenAsTriggers = "false" UpdateMode = "conditional" & gt; & Lt; ContentTemplate & gt; & Lt; ASP: Timer ID = "Timer 1" runat = "server" ontic = "timer 1 ticket" interval = "500" & gt; & Lt; / Asp: timer & gt; & Lt; asp: ListBox ID = "ListBox_JobPositions" runat = ...

what is the use of pipe symbol in yaml -

I'm new to Yamal, and I have a question. Pipe symbol (|) is used for multiple lines. Does Yaml have the following one like any syntax? Examination: | 6 + I is a yaml code in two ways, the first one is working and the other is not. I do not know what was happening there First file name: - test: well 1 - second: val 2 - third: val 3 - then - Last: | An AA aaaa: 'test:' second file name: - test: val 1 - second: Val 2 - Third: Val 3 - Then - Final: | 6+ Aaaa: 'test:' PS: The second file is of the customer I am using xmlbeans and I "com.esotericsoftware.yamlbeans. Parser.Parser $ ParserException: Line 17, column 12 is found: A 'block end' was expected, but found: Block mapping started " . Edit XMLBines have been added > The pipe symbol at the end of a line in YAML indicates that any indented text should be interpreted as multi-line scalar value. See. Specifically, the pipe indicates that scalar values ​​(e...

java - Get Greenwich Mean Time -

India Standard Time (IST) is ahead of 5:30 hours (5 hours 30 minutes) Greenwich Mean Time. We show it as GMT + 5.5. Is there a way to find this value (in the case above, value = 5.5) by time zone? In my Android app, I can get the time zone of the device. But how can the device get this value using time zones? double time zone = 0.0; Calendar cal = calendar.justinstance (); Cal.set (mn.Year (), mn.Month (), mn.day (), mn.Hour (), mn.minute (), (int) mn.second ()); Timezone tees = timezone.gate default (); Boolean T = tz.inDaylightTime (cal.getTime ()); If (t) time zone = ((timezone.get default). GetRawOffset ()) / (60 * 60 * 1000d) + (timezone.get default) .getDSTSavings () / (60 * 60 * 1000d)); And timezone = ((timezone.gate default). GetRawOffset ()) / (60 * 60 * 1000D)); You can try this code. This will give you time zone value. If you want a different time zone value; Just timezone tees = timezone.get default (); to timezone tees = timezone.get time zone (...

mysql - Combining result of inner join with left join -

select name, transpl from skyplan_deploy.deploy_sids where appropriate = 'KBOS' and name! = Trans Left Join (Separate c.sid_ident as name, c.fix_ident from internal.cd_sid_leg as internal c (join selection sid_ident, transition_ident, max (sequence_num) seq, route_type from corept.std_sid_leg where data_supplier = 'J' and airport_ident = 'KBOS' group by sid_ident, transition_ident) c.sequence_num = b.seq and c.sid_ident = b.sid_ident and c.transition_ident = b.transition_ident b ou c.data_supplier = 'j' and c .arport_ident = 'KBOS') d right_tbl. Name = right_tbl.sid_ident; This is my code. When I am executing I am getting the error in the left joining saying that syntax is wrong. Anybody helps ... I have gone through the syntax tutorial, but in the end empty hands. Thank you. WHERE Also, what is that column trans in the WHERE section? Where it came from? If this string is verbatim, then put it in quotes. It should be written ...

javascript - Grabbing contents from another web page using jQuery -

I have just started learning jQuery I came into this "grabbing material from other webpages" I code in any one site Was going through how to get it, here its part is: $ (document) .ready (function () {$ ('# list') .load (" Http://www.narutoget.com ul ", function (response text) {$ ('#otherHtml'). Text (feedback text);});}); I'm not able to get content from the page. I Narutoget.com. Can anyone help me as to how to achieve this? And I would like to know if it is legal to do it. As you do not maintain another site, this can be prevented if other sites Obviously it allows to include it well and the only solution is to side the server where you can ask the server if you wish. If you also keep the other site, you need to insert a good corso headers to query your first site. Here is a good tutorial for enabling cross-root requests for various server side technologies: Once you do this, you simply ask the server and analyze the page. Mu...

ios - Retrieving NSDictionary Objects -

I have this dictionary that is extracted from XML parser. GITUB library has been used to parse XML files with this link. quiz = {question = ({"@id" = 1; answer = D; a = "tree"; b = "tree"; c = " Mountain "; d = water; question =" where fish live? "}, {" @id "= 2; answer = d; a =" four "; b =" two "; c =" six "; d = Three; Question = "How many feet for a rabbit?";}, ......}; I get key question, answer, option 1-4 to recover items I am trying to do something but how can I not go through the value. for (in NSString * key XmlDictionary) {NSDictionary * subDict = [xmlDictionary objectForKey: @ " N "log" (@ "correct answer \ n \ n% @", [sub-object objectForcae: @ "answer"]); // all your other code here.} No value is coming back. In fact, I have 10 elements inside that XML and during parsing it shows that I have 10 points I XmlDictionary and ...

.htaccess for static to wordpress conversion -

यह मेरी WordPress ब्लॉग के लिए .htaccess फ़ाइल है - # BEGIN वर्डप्रेस & lt; ifModule mod_rewrite.c & gt; RewriteBase / RewriteRule ^ सूचकांक \ .php $ RewriteEngine चालू - [एल] RewriteCond% {REQUEST_FILENAME} -f RewriteCond% {REQUEST_FILENAME} -d RewriteRule!। /index.php [एल] & lt; / ifModule & gt; # एंड वर्डप्रेस मैं एचटीएमएल वेबसाइट को वर्डप्रेस ब्लॉग में परिवर्तित कर रहा हूं। मैं अपने स्थैतिक एचटीएमएल और एचटीएम पेजों को वर्डप्रेस पोस्ट्स में रीडायरेक्ट करना चाहता हूं। कैसे और क्या एचटीएसीयूएक्स प्रारूप होगा। i.e। पुराना यूआरएल: http://mywebsite.com/sarclaw/pakistan/companies_act.htm नया यूआरएल: http://mywebsite.com/sarclaw/pakistan/the-companies-ordinance-1984 .html अपने वर्डप्रेस नियमों से पहले, इन्हें जोड़ें, अपने प्रत्येक पन्नों के लिए एक: पुनर्लेखन नियम ^ aarclaw / pakistan / companies_act.htm $ / asarclaw/pakistan/the-companies-ordinance-1984.html [एल, आर = 301]

How to create TINYINT(1) datatype in mysql database? -

I am creating a table in the mysql database but giving this error ... 'EC_TIMETABLE` (`S_ID` VARCHAR (30)) Null primary key,` Skilled IdED' VARCHAR (30) tap, START_DT DATETIME NULL, END_DT DATETIME NULL, Repeat tinet (1) faucet, ALL_DAY TINYINT (1) NULL, CLASS_DURATION INT NULL, COURSE_DURATION INT NULL, REPEAT_TYPE VARCHAR (30) NULL, REPEAT_EVERY INT zero, REPEAT_DAYS VARCHAR (100) NULL, REPEAT_FROM DATE NULL, REPEAT_TO DATE NULL, COURSE_FEE INT ZERO, ATTENDEE_MIN INT NULL, ATTENDEE_MAX INT NULL, SEARCH_KEY TINYTEXT Zero, foreign key (`SCCIEDID`) reference` ECICKSTST` (` S_aidi`) no action) engines no action went Action ouster = Innodibi; but giving this error: # 1064 - There is an error in your SQL syntax; Click on the manual which is close to the correct syntax for your syntax 'Repeat tinનેટ (1) NULL, ALL_DAY TINYINT (1) NULL, CLASS_DURATION INT NULL' How to solve this one repeat is a reserved keyword you still use it You can, but you need to...

java - Convert enum of Objective-c to enum of Android -

Anyone can help me please, I want to convert objective-c enum into Android enum like the following: // Objective-c enum =================================================================================================== // Just print using Android logger: =============== log ("ab =", ab + ""); Logs ("BC =", BC + ""); Logs ("ca =", ca + ""); ================ Result: ab = 0; BC = 1; Ca = 2; Want to convert from above Android enumeration, but want to keep the same results while printing. It may be public enum piece type {AB (0), BC (1), CA (2); Private int values; Private currency (int value) {this.value = value; }}; And here is a link for you:

jQuery: Having trouble hiding/showing when a div is clicked -

I am creating a homepage with four links with four different images when one click is made I would like a new image that will be visible next to the link using jQuery's hide / show effects. Right now I am having trouble working on it. HTML: & lt; Img src = "images / images / grey_shape1.png" square = "grey_shape1" /> & Lt; Img src = "picture / picture / gray_specify 2" square = "gray_shap 2" /> & Lt; Img src = "Pictures / Pictures / GrayScheap 3" class = "GrayScheap 3" /> & Lt; Img src = "picture / picture / gray_speap4png" class = "gray_speap4" /> & Lt; Div id = "green_box_container" & gt; & Lt; A href = "#" & gt; Div id = "green_box1" & gt; & Lt; Img src = "picture / lilacs_small.jpg" /> & Lt; / Div & gt; & Lt; / A & gt; & Lt; A href = "#" & gt; & Lt; Div id = ...

hadoop - Hive index rebuild too slow in compare with PostgreSQL -

I am trying to compare the same functionality on my PostgreSQL data warehouse and the new one on the same box on the same box I am trying to understand the hive data warehouse and the same table structure I understand the hive benefits, but ... despite the fact that Data Load is running 3 times in postgresqual - Index build / rebuild on PostGrace SQL To fold The index hive do not need to create every time. My question is, what am I missing in the hive configuration? My setup is: '' Status / Data / Spaces / Hadoop / hadoopfs '' set by ROW FORMAT DELIMITED FIELDS; Make Table Tablet (AR ANAR, BB String); Load data local INPATH / data / Informix94 / spaces / postgres / myfile_big 'Overlay in table matrix; Index mytable_indx 'org.apache as Current Table Matabable (AA) Thoop Hv.kill.inx.com Compact index handler with 'defrade rebuild space' / data / spaces / halaps / thophis'; Set Hive OPTIMATE. Otto indices = true; Set hive.aptimize.inx.filter...

How to Show download progress in progress bar in Android? -

I am using Net Web Services and I am able to download the file to the SD card, but I can see the progress bar I want to show when a special file is downloaded and is complete and then I want to see the options such as viewing or canceling. Click on event class: public void onItemClick (AdapterView & lt;? & Gt; parent, see v, int status, long id) {casual adapter ca = (LazyAdapter) parent.getAdapter (); Folder list item_name = (folder list) ca.getItem (status); Folder list document id = (folder list) ca.getItem (status); Folder list type = (folder list) ca.getItem (status); Intent mIntent = new intent (); MIntent.putExtra ("item_name", item_name.folder_name); MIntent.putExtra ("item_id", DocumentID.ID); MIntent.putExtra ("item_type", type.type); MIntent.getStringExtra ("ITEM_NAME"); String type = mIntent.getStringExtra ("item_type"); Log.i ("type", type); If // some code here .....} and {intent I = new intent (g...

python - 'str' object is not callable in my cycling -

में श्रेणी के लिए (1, 27): temp = str (i) प्रिंट '% s' (temp) .जफिल (3)) ट्रेसबैक (सबसे हाल ही में कॉल अंतिम): फ़ाइल "& lt; ipython console & gt;", पंक्ति 3, & lt; मॉड्यूल & gt; TypeError: 'str' ऑब्जेक्ट कोने योग्य नहीं है मुझे आश्चर्य है कि क्यों? ¼ ?? क्योंकि मुझे यह पसंद करने के लिए आउटपुट चाहिए: 001 002 .. 021 ... इसलिए मैं zfill का उपयोग करें। लेकिन अजगर मुझे बताता है कि " str ऑब्जेक्ट लायक नहीं है" इसे कैसे हल करें? आप % में प्रिंट '% s'% (temp.zfill (3)) अनुपलब्ध हैं

yii - how to implement afterSave method to a specific controller action only? -

Assume that I have the model I..then Model A is being used by many controllers ... now I In the model of only one controller, which later uses Model A. For example, in the controller C, the function calls (), so I want to call that function later. that it is? Safe function after saving () {parent: :: save (); If ($ this-> hainai record) {echo "hello"; Go out; Because} Save all of all controllers using Model A. () affects save () after affecting call Post text "itemprop =" Text "> after you function: if (Yii :: app () -> gt; controller-> id! == ' Your Controller ') {// What You Want to Do} If necessary, you can test the value of the Yii :: app - the controller- & Gt; Action-> ID . Edit : or J. Sector de fries Take a look at the answer. / P>

jquery-ui-picklist: set maximum selected items -

I use the jquery plugin in my project and I want to set a limit for the items that the user chooses. How do I set a limit for the maximum number of items selected? How to disable a button on the control? - If maximum items are selected, I want to disable the "add" button Thanks. jquery-ui-picklist has multiple event hooks in which you can tie a function, I suppose That's the best option depending on the situation. Afterwards the ad is the best option so that after the limit is reached you can disable the add button. On-change counting events in both directions, if you are limiting one volume, then you should count after removing it afterwards. Here is the list. The button control is a regular HTML button control with a class of "addClass". You can change or modify this category or you can stop the defaults. I believe by default the Jquery plugin includes "Add" button along with the "Add all" button. If your amount ...

javascript - Convert one array to another with minimal quantity of splices -

Let's, for example, this array ar = [6,3,5] ], 1,2] I want to convert it to another array and I can only use two operations - special status (insert (i, 0, item) Item) or remove items from the specific position (arm (i, 1)) I am looking for a solution that uses the least amount of diameter. The second important condition is that we consider arrays with unique values, there are no doubles in our array. For example, ar1 = [6,3,10,5,1,2]; Ar2 = [6,3,1,2,5]; It is clear that if we want to get RE from R1, we only need one piece - AR.splice (2,0,10). If we want to get 2 ar 2, then we need to splice two: ar.splice (2,1) and then push (5) (second is equal to benzene (ar.length, 0,5)) By the way, this work is a natural practical value. Let's imagine, for example, a list of products and product filters. We change the filter settings and the list respectively. And every change after beauty slides jquery slow - slide down animation This animation can slide up and hide sp...

ios - How to upload image to a server -

I use these codes in the IOS to upload my image This is almost another Code with Internet NSData * uploadImage = UIImageJPEG report (self.image, 1); NSString * uploadURL = @ "http: //...../jeff.php"; NSMutableURLRequest * uploadRequest = [[NSMutableURLRequest alloc] init]; [Request RequestSet URL: [NSL URL URL String: Upload URL]]; [Http method set to upload: @ "post"]; NSSTING * limit = @ "--------------------------- 14737809831466499882746641449"; NSString * contentType = [NSString stringWithFormat: @ "Multipart / Form-Data; limit =% @", border]; [UploadRequest addValue: contentType forHTTPHeaderField: @ "Content-Type"]; NSMutableData * body = [NSMutableData data]; [Body endodata: [[NSSring string with format: @ "-% @ \ r \ n", border] Data wrapping encoding: NSUFF 8 string encoding]]; [Body endodata: [@ "Content-Disposal: form-data; name = \" userfile \ ", filename = \" test.jpg \ "\ r \ ...

html - Move a paragraph after a div with .after (jQuery) -

I am currently playing with the codecady and I got a job, after a div, to a new paragraph Saying to move. Here's what I did: $ ('#a'). ('& Lt; p & gt; this is jquery & lt; / p & gt;'); Now I want to move the new paragraph after a second, which is called #Ut, though, to use it. After this, it tells me After # two ID, how do I get new paragraphs? EDIT: Sorry, I'm starting on this. In some way, stuff does not work in JSfield for me, I am doing something wrong most. Although I will leave some screenshots below: html & lt; Div id = "one" & gt; A & lt; / Div & gt; & Lt; Div id = "two" & gt; Two & lt; / Div & gt; ('& Lt; p & gt; this is jquery & lt; / p & gt;'); javascript $ ('#a'). $ ('# Two'). After ($ ("#A + P"));

NHibernate performing a delete with Cascade.All causes N+1 deletes -

I have two entities, passwords and passwords in password is a collection of passwords in the password (which are hash with different masks). When I delete a password, I want to remove all the related password hashes too. I like this mapping: mapping Hasman (x = & gt; x.PasswordHashes) .cascade. All (). Current () .powered by (x => x.password); I was expecting two questions to be generated: Remove from "passwordHash" where "idpassword" =: p0 And obviously remove from "password" "idpassword" =: p0 Instead, NHibernate has prepared N + 1 queries in this way Delete: Remove the password from "Password hash": "id password ish" =: p0 (n) and "password" How can I make this behavior more optimal? Edit: Code which deletes: session.Delete (password); Session.Flush (); In the current release of NHibernate (3.3), from my research, it seems that It is not possible to delete a chi...

jquery - HTML, display label if drop down has just one value -

I am generating drop down dynamically by script. If drop down is just an option value, it is possible to display it as a label. This will display a drop down with 3 values. & lt; Select & gt; & Lt; Options & gt; 1 & lt; / Options & gt; & Lt; Options & gt; 2 & lt; / Options & gt; & Lt; Options & gt; 3 & lt; / Options & gt; & Lt; / Select & gt; If it only shows one value, it is displayed as a label, is it possible with a combination of pure HTML or Jquery or both? I can use cleverness to check values ​​and throw different HTML, but it will make my code for a long time because I have droplets of several drops. & lt; Select & gt; & Lt; Options & gt; 1 & lt; / Options & gt; & Lt; / Select & gt; Update (Resoluted) Thanks to everyone StackWorflowers which helped However, In order to copy, the code has expanded, if someone is looking for , // a $ (select '). Each...

c# - Document not saving when Created Using the Open XML Format SDK 2.0 CTP -

I want to create an excel document based on the template using Open XML Format SDK 2.0. I have followed this tutorial. My problem is that the rows and cells I put in the documents are not saved. When I open the document, it looks like a template. No exception will be thrown when I run my code. I understand that the changes saved in the document should be emphasized, but how can I understand how. Here are some of my codes: Public Static Zero GenerateExcelReportToDisk () {Var Factory = New Factory (); Var generated = "result.xlsx"; Var newFile = Util.GetReportTargetPath () + Generated; Var templateFile = Util.GetReportTemplatePath () + @ "template.xlsx"; File. Copy (templatefile, newfile, true); (Var myWorkbook = SpreadsheetDocument.Open (newFile, true)) using {var workbookPart = myWorkbook.WorkbookPart; Var Worksheet = Workbook page. Worksheet pars first of all (); Var sheetdata = worksheetparty Worksheet Gatefest Chald & lt; SheetData & gt; (); //...

ruby on rails - Relative URL with CSS Upgrade -

I am developing an application with Rail on Ruby, and I use Bootstrap to upgrade my CSS I am here. My question is: If I have the next URL link: link href = "css / bootstrap.css" rel = "stylesheet" How can I re-define the URL relative to the project files? I think putting the stylesheet in the following directory is best practice: apps / assets / stylesheet stylesheet_link_tag 'name' But if you use Bootstrap If you are using, I recommend using excessive gems (for example). In this way, it will automatically handle the stylesheets and frameworks JavaScript.

iphone - Zoom overlay image only -

मेरे पास कैमरा ओवरले में एक ओवरलेइम्ज़ है UIImageView * overlayImageView = [[UIImageView alloc] initWithImage: [UIImage image नामांकित: @ "overlay.png"]]; [ओवरले इमेज दृश्य सेटफ़्रेम: सीजीआरएक्टमेक (30, 100, 260, 200)]; [[स्वयं देखें] ऐडस्यूब्यूव्यू: ओवरले इमेजव्यू]; [ओवरले इमेजव्यू रिलीज]; - (शून्य) दृश्यडिडलोड {[सुपर व्यूडिडलोड]; UITapGestureRecognizer * टैप गैस्ट्रर = [[UITapGestureRecognizer alloc] initWithTarget: स्वयं कार्रवाई: @ सिलेक्टर (हैंडसेटटैप गेश्चर :)]; टैप गैस्ट्रर.नम्बरऑफ़टैप्स आवश्यक = 2; [OverlayImageView addGestureRecognizer: टैप जेस्टचर]; // अपने छवि दृश्य में टैप जेस्चर जोड़ें [टैप जेस्टरा रिलीज़]; Self.isTouch == हाँ; // यह BOOL प्रकार है } - (शून्य) संभालटैपजैचर: (UITapGestureRecognizer *) प्रेषक {if (self.isTouch) {// जूम इमेज विज़ के सापेक्ष आकार self.isTouch == नहीं; } Else {// सामान्य छवि के लिए put कोड self.isTouch == हाँ; }}

c# - Accessing CurrentTestOutcome in ClassCleanup? -

Using C # 4.0 I have a unit test where I need to create a temporary database during class initialization Used: [Class initial ()] Public static zero MyClassInitialize (TestContext testContext) {// Create database! } [Class cleanup ()] public static zero MyClassCleanup () {// Remove database IF CurrentTestOutcome == UnitTestOutcome.Passed} Q: How can I read CurrentTestOutcome My ClassCleanup method by value I Suggest that you create a static flag, which you can access from your MyClassCleanup and when you receive an error, you can set it during your cleaning test, not in your class Something like the following: [test class] public class mystages {static bool _testFailed; [Start the class ()] Public static zero MyClassInitialize (TestContext testContext) {// Create database! _testFailed = false; } [Class cleanup ()] public static micelluscleanup () {if (_testFailed == wrong) {// remove database} IF CurrentTestOutcome == UnitTestOutcome.Passed}} [TestCleanup ()]...

sql server 2008 - sp_refreshview throws unexpected error -

Image
I am currently writing a TSQL script where the part of the script refreshes all the views of the database. After finding the example online I am repetitive through the collection, but a strange issue when one of the scenes (not earlier) getting refreshed When running the query below, I get a result from the sysobjects table select * from sysobjects where type = 'V' and name = 'vwEnginesFinishBuiltToday' Then one of the exceptions to running refresh Returns exec sp_refreshview N'dbo.vwEnginesFinishBuiltToday ' Now the thing is the error that I'm saying a scene with a different name that can not be found The issuer. Its true that it is not present in the database, so that another view was done using thinking dbo.vwEnginesFinishBuiltToday internally I see the TSQL view. Select COUNT (dbo.tblBatches.IdBatch) TotalEnginesFinishedToday as dbo.tblBatches from within include on dbo.tblBatches.IdBatch = dbo.tblEngines.idBatch dbo.tblEngin...

javascript - Not Capturing FB Like Event -

I have placed the button using the iframe code like FR ... For buttons here The code is: & lt; Iframe src = "// www.facebook.com/plugins/like.php?href=https%3A%2F%2Fmadamebridal.com%2Fdev%2Fcheckout%2Fonepage%2F& send = false & amp; layout = Standard & amp; width = 450 & show_faces = True & amp; amp; amp; & amp; amp; amp; amp; amp; amp; amp; amp ;; no "Frameborder =" 0 "style =" border: none; overflow: hidden; width: 450px; height: 80px; "allowTransparency =" true "& gt; & Lt; / Iframe & gt; And I'm using this code to capture events like FB ... Here's the code: window FbAsyncInit = function {(function (d, s, id) {var js, fjs = d.getElementsByTagName (s) [0]; if (d.getElementById (id)) returns; js = d.createElement (S); Js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore (JS, FJS);} (document, ' Script ',' Facebook...

lift - SBT "package" depend on "test" -

How can I make the goal "package" depends on the target "test"? There is a solution here: But this does not really work with the XSBT-Web-plugin. Here's what I did: key. Package & lt; & Lt; = (Test in test, key 'packet' in the compilation) Map {(_, in) = & gt; This test runs, and iff tests were successful, then the package works (on fresh installation of lift-5-RC2), println ("after package and test")}} Has been tested)

c# - jQuery event binding issues with radio buttons -

When I load the document on my radio button, then I try to bind an onClick function to get jQuery I am here. ASP goes back to the database and finds all open markers and then it sends feedback on the page with raw HTML to create an image of a radio button and marker. What I need to do is jQuery (or anything for that matter), an onclick bind, which indicates what is clicked on, so I can send that marker back to the database to add a person . I have tried till now which is a fat one. In debugging I added alerts to each function and I look like 3x, but attr ('id') is undefined. This is the html radio button on the form & lt; Br / & gt; & Lt; P & gt; Choose the open marker for the new user: & lt;% getMarkers (); & Gt%; & Lt; / P & gt; This is codebehind for that call while (reader.Read ()) {if (readIndex% 3 == 0) markerTable + = " & Lt; tr & gt; "; String marker id = reader ["marker_id"]. ToString (); ...

c# - Instantiate ResourceDictionary xaml from other Assembly -

I have defined a Reource dictionary containing a WPF class library called Color and Brush, BrushResources.xaml. pre & lt; ResourceDictionary xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml" & gt; & Lt; There are so many colors and brushes & gt; & Lt; / ResourceDictionary & gt; I want to use some brush code from another assembly, which refers to this library project. How to get an example of ResourceDictionary ? What are you asking is a component of the necessary functionality to provide true skinning in an application . Receiving resources from a different assembly involves reading compiled XAM or joining the other assembly. Here is a method that I use in a skinning library to recover BAM from an assembly: // relevant namespace: // System.Windows.Baml2006; // Using System.Xaml; Public static list & lt; Stream & gt; GetBamlStreams (assembly ...