Posts

Showing posts from April, 2010

image - Recursive use of png optimization -

The file can be saved in size and more. In fact, repeated this time many times, till no shortage, I achieved any significant changes without saving image of about 30-50% of the original customized file. Has anyone else seen / tried this? Can anyone explain why this happens? Tin uses smart lossy compression techniques to reduce PNG file size From PNG files This means that it is not lossless. Even if you can not see any difference, every time you use TinyPNG to adapt PGG, then the quality of the image gets reduced slightly. To compare two images,

java - twitter4j Streaming Api not showing result when search "@sometext" -

twitter4j Streaming API is not showing results when searching "@sometext" is a code here Please help first before I started authentication I am making the listener again. After telling the listener, just apply the filter and show results from the listener. Public static zero main (string [] AGR) throws Twitter animation {ConfigurationBuilder CB = New ConfigurationBuller (); Cb.setDebugEnabled (true); Cb.setOAuthConsumerKey (ConsumerKey); Cb.setOAuthConsumerSecret (ConsumerSecret); Cb.setOAuthAccessToken (AccessToken); Cb.setOAuthAccessTokenSecret (AccessSecret); Twitter Serial Twitter Stream = New Twitter Stream Streaming (cb.build ()). GetInstance (); RawStreamListener listener = new RawStreamListener () {@Override Message on Public Zero (String Crude JSON) {System.out.println (rawJSON); } @parride public at zero (zero exception) {ex.printStackTrace (); }}; FilterQuery fq = new filterclub (); String keyword [] = {"@convo"}; Fq.track (keywords); TwitterStream...

C# Possible method to call protected non-static methods in current class? -

I recently picked C # as another language to further my knowledge in other languages, But to use the syntax of the language to experiment, I public static zero main (); This problem was encountered while using the and my calling code in the same class was as follows: Nom place testing process {class 1 class} {public static zero main } {System.Console.WriteLine ("This is nothing but a test. \ NInput" test "); Var UserInput = System.Console.ReadLine (); String input = this.ValidateInput (UserInput); System.Console.WriteLine (input); System.Console.WriteLine (); } Protected string ValidateInput (string variable) {var VarReturn = (string) null; If (string. Axles (variable, "test")) {VarReturn = "true \ n"; } And {VarReturn = "wrong \ n"; } VarReturn return; }}} Therefore, what I have researched has come to know that you call this syntax Can not use / P> Then I tried self but it did not take any advantage (like Python, with th...

mongodb - Undefined offset: 1 in genghisapp on PHP -

I have some success with PHP with some successes on various servers for managing your emogodeb database () I am using. I'm having trouble working on my Rackspace cloud server (Fedora 17, Apache 2.2, PHP 5.4). I have tried the previous few versions on this server without success. I can not see what I have done for my life. When I request the jinji.php page, I get this message ... Fatal error: 'Exceptional exception' with 'janji era option' Error: Undefined Offset: 1 'in /www/engine/system/genghis.php:17 Stack Trace: # 0 /www/engine/system/genghis.php(17): Genghis_ErrorException :: throwException (8,' Undefined Offset ... ',' / www / engine / sys ... ', 17, array) # 1 /www/engine/system/genghis.php(17): Genghis_AssetLoader_Inline-> InitAssets () # 2 /www/engine/system/genghis.php(15): Genghis_AssetLoader_Inline-> LoadRao ('error.html.must ...') # 3 /www/engine/system/genghis.php(15): Genghis_App-> RenderTemplate (...

Error returning boolean in java -

I'm trying to do a practice but got stuck. This class will ask the user whether he still wants to play with the answer yes or no and boolean wants to come back. public boolean playAgain () {char va; Boolean T = True; Boolean ry; While (T = true) {IO.outputln ("Want to play again? (Y / n)"); Va = IO.inputCharacter (); If ((VA == 'Y') || (VA == 'Y')) {RI = true; T = false; } And if ((VA == 'n') || (VA == 'n')) {ri = false; T = false; }} Returns RY; This gives me the next error: [error] variable ry may not have started Is it possible to assign variable ry ? (Because in any case it is being assigned in the loop) I changed your code and Added some explanation: Public boolean playgain () {char va; // You do not need any other variables while (true) {// endless loop ... only if the user enters "y" or "n" // then you avoid this loop and by answering each "yes" Should stop a "no" a...

javascript - Set extent of view in OpenLayers 3 -

After I just started getting an eye on OpenLayers 3 and there was one feature to which the extent of one is happening. Attempting to zoom for the geographical location sent by the server (which will change in each refresh, so I can not code the hard / zoom / central point). . I want to get the page load as quickly as this, but I am struggling to get it to work I keep getting an error saying: "Uncaught TypeError is not undefined function Is "the line where I try to read geometry from the geo-jsn object, and I'm not really sure how to fix it. Geographical string looks fine (I tried to parse it before passing it to read guitar, but he gave the same result) If I am doing this since then, then its There is an easy / fast way for me to be interested in hearing this too! Any help is greatly appreciated. var feature = new ol.Feature ({}); Var View = New ol.View ({center: [0, 0], zoom: 1}); Var Client = New XMLHttpRequest (); Client.open ('GET', 'http: // lo...

html - How do you make the banner and CSS menu a specific color, and the rest a different color? -

Image
So, I do not know how to really explain it a banner on my website (this is a picture) and Below the banner is a menu, and I want a dark brown background on the menu and above, a very light brown background with the rest How do I do this? This my website layout currently appears (excuse of the awesome art): This is what I want to look like a website: (notice the background colors) & lt; Html & gt; & Lt; Body & gt; & Lt; Div style = 'background: # 123' & gt; Your banner & lt; / Div & gt; & Lt; Div style = 'background: # 567' & gt; Your text & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; or & lt; Html & gt; & Lt; Top & gt; & Lt; Link rel = stylesheet type = "text / css" href = "my.css" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = 'banner' & gt; Your banner & lt; / Div & gt; & Lt;...

python - Saving Peewee queries with multiple foreign key relationships against the same table -

मेरे पास निम्न पीईवी पोस्टग्रेएसक्यूएल मॉडल है: क्लास गेम (मॉडल): क्लास मेटा : डेटाबेस = डीबी db_table = 'd_games' game_id =) प्राथमिक कुंजीफील्ड () स्थान = चरफिल्ड () home_team = विदेशी केफीफ्रंट (टीम, संबंधित_नाम = 'होम_गेम') दूर_टेम = विदेशी केफीफ़ील्ड (टीम, संबंधित_नाम = 'दूर_गेम') आप देख सकते हैं कि मॉडल के दो विदेशी कुंजी रिश्ते टीम मॉडल के साथ हैं मैं कुछ ऐसा करना चाहता हूं: गेम्स = गेम.सेक्ट (गेम, टीम) .जोइंड (टीम)। गेम्स में छ के लिए (10) खेलें: print '% S बनाम% s'% (g.home_team.team_name, g.away_team.team_name) दुर्भाग्य से, जबकि home_team संबंध में सहेजा जाता है आरंभिक क्वेरी: # क्वेरी लॉग से "चयन करें t1।" Game_id ", t1।" Game_date ", t1।" स्थान ", t1।" Home_team_id ", t1।" Away_team_id ", टी 2। "टीम_आईड", टी 2। "टीम_नाम" से "d_games" एएस टी 1 इनर जॉइन "डी_टेम" एएस टी 2 ऑन (टी 1। "होम_टेम_आईडी" = टी 2। "टीम_आईड...

html - creating custom web interface app using node-webkit and manipulating DOM with Javascript -

I want to create a custom web interface / app on a web site. A well-organized / custom visual data of important summary data can be cached locally on the site and weekly updates can be done if there is a change in the source site. I am using two windows, one window I am loading html from remote site, second window I use javascript to manipulate the first window's domains / tables only to display important information if doing so There is a better method or device, as I have not found yet I am having problems with javascript which can be used to manipulate the first window's domes. Shm not. I'm trying to edit / edit (hide / hide the colors on table rows) Changes in the second window Javascript is running The first window (startup node-webkit) says Docs Should I have universal access to other windows? How do I ensure that this is true? var gui = require ('nw.gui'); Var new_win = GUI.Window.get (window.open ('http://example.com/index.html')); Var my_el...

borland c unable to include header file -

I have a very old project, which should be opened using Borland, my machine wins 8 so I decided to go to Borland The problem is that when I create a project, many errors are present, in all forms: "Unable to include the file" xxx H " P> Please note that: - All these header files include folds I have created a CFG file and set the correct path to that folder for the compiler, so that for the linker - I have set environment variable and still have the same errors Can anyone help me with that? bcc32.cfg file. It should be of the bcc32.exe file in the same directory. Check it out.

python - Simple App Routing Flask -

क्यों जा रहा / अपलोड / स्टैक 1234 मुझे 404 त्रुटि दे? filed = "Stack1234" @ app.route ('/ अपलोड / & lt; दायर & gt;') def stack (): return render_template ('filed.html') स्टैक () में तर्क परिभाषित होना चाहिए। इसे एक वैश्विक चर के रूप में परिभाषित करने की आवश्यकता नहीं है। @ app.route ('/ अपलोड / & lt; दायर किया गया & gt;') डेफ स्टैक (दायर): return render_template ('filed.html')

c# - How to set automatic width? -

I would like to use some "dock" for the listview column I want to set the minimum width, but I want to fill the entire ListView width, which is set to dock fill . Is this possible? It would be nice to be able to set the column width as a percentage value of its length. I was searching the web and many people said to width 2, but it does not work for me You have two basic options: You You can choose one of Column Header Auto Resize Style options: ColumnContent , header size or none . The alternatives suggest their names. Note that they apply only when you set them up. This means that to add HeaderSize you have to add the first column, set the then option. And column content , you need to fill the first column and items with your content to work! Or you can choose the script to resize the resize event to the column size of your choice. I add the code that changes each column again. So that the ListView is filled up and each column ...

ListView Selection Issue in Android -

what do i have I have a list file device. I have a hidden image view that I want to visualize when a user clicks on the "Select All" button. Problem Select all buttons when the user clicks, all the items are not selected when I scroll down, I think Some items have not been selected (the view of the image is still unreliable). My Code Select AllSetOnClickListener (New OnClickListener) {@Override Click Public Zero (see V) {List & lt; Items & gt; Select list = dir; (Int i = 1; i & lt; list.getChildCount (); i ++) {tmpView = list.getChildAt (I) Selection = (image view) tmpView.findViewById (select RID file); Select .net disableability (see Visualic);} for (int i = 1; i & lt; selectList.size (); i ++) {item o = Adapter.getItem (i); O.setSelected ();}}}); Please suggest solving this problem? I know that list view items are reused and this problem is actually causing this problem, but I do not know how to solve this problem. Your approach...

javascript - how to create pop up screen -

I have been using JQM for the last one year. I have developed a pop-up screen with JKM. Can we develop such pop-up screens in angular JS? This means that when the button is clicked, open the pop up screen. With the editing area and buttons in it? (Function () {$ ("#testCaseId"). Popop ("open");})}) angular-ui-bootstrap is the port of bootstrap you

Android Daydream not properly reading rotation -

I have an animation that is dreaming while scrolling an ImageView layer and I want to scroll it in the thin side of the screen ( I.e. on the 720 × 1280 x 720 screen) I get a display variable which is in the display landscape rotation. Sometimes it does not respond right and it will scroll on the wrong axis. I have tried to solve this issue in several ways, the image view is running, including dragging the dimensions of the frame, it still randomly makes the width and height mistake It seems almost like if the screen was spent properly this axis posts were put (in the scenario X is still the least side and y is the longest). Kilter is properly and I do not understand why. Private Wide Initiative Album ArtScroll () {albumArtwork.setX (0); AlbumArtwork.setY (0); MAnimator = albumArtwork.animate (). X (0) .y (0) .setDuration (1) .setStartDelay (0) .setInterpolator (sInterpolator) .withEndAction (New Runnable) {@Override Public Zero Run () {if (inPortrait) {Log.i (TAg , "Scroll ...

php - Cannot execute queries while other unbuffered queries are active -

OK, so I used this website (amateur using PHP 5.4 (working 100%) using a local test server Manner) developed on Remote Host, I have encountered non-stop problems, possibly due to differences in all PHP versions. The remote server uses PHP 5.1 On this page, a value is passed from the previous page and this value is used to fill out a form. I have detected this problem with trial and error, but he does not know what is happening due to this and what has been read so far there are at least 30 relevant SE questions. Immediate execution on the code generated statement on this page stops. I can not find any type of error message. I know that the $ link connection is open because I have a query that works perfectly. if (('POST' === $ _SERVER ['REQUEST_METHOD']) & amp; (isset ($ _ POST ['Description'])) {$ sql = 'From Select * where it is that: = ';'; per second $ sql; $$ query = $ link-> added for testing ($ sql); resonance "it never ...

javascript - trigger jquery floatlabels plugin on input load -

I'm trying to use the jQuery plugin as to create inline labels for input fields. Works great for fields in which they do not have text, but I need that label, even if they have pre-default text. I checked the plugin code and found this line thisElement.on ('keyup blur change', function (e) {self.checkValue (e);}); Which means that it will trigger only on the keyword, the event will blur and change. I need to trigger even when the first input of the input is triggered I know that I To do something like checkValue is for everyfield and there already it is self.showLabel But I'm not sure How that ?? OK, if you can update the code of that plugin, then you can try Something like this: thisElement.on ('load funnel change', function (e) {self.checkValue (e);});

C# Mysql connection problems - connection attempt failed -

मुझे अपने सी # एएसपी.नेट पृष्ठ को लोड करते समय निम्न त्रुटि मिलती है। एक कनेक्शन प्रयास असफल हो गया क्योंकि कनेक्ट किए गए पक्ष समय की अवधि के बाद ठीक से प्रतिक्रिया नहीं देता, या स्थापित कनेक्शन असफल हो गया क्योंकि जुड़ा हुआ होस्ट जवाब देने में विफल रहा है [SocketException (0x274c): कनेक्शन का प्रयास असफल रहा क्योंकि कनेक्टेड पक्ष नहीं था समय की अवधि के बाद ठीक से प्रतिक्रिया दें, या स्थापित कनेक्शन असफल हो जाता है क्योंकि जुड़ा होस्ट का जवाब देने में विफल रहा है] System.Net.Sockets.Socket.Receive (बाइट [] बफर, Int32 offset, Int32 आकार, SocketFlags socketFlags) +6528783 System.Net। Sockets.NetworkStream.Read (बाइट [] बफर, इंट 32 ऑफसेट, इंट 32 आकार) +130 [IOException: परिवहन कनेक्शन से डेटा पढ़ने में असमर्थ: एक कनेक्शन का प्रयास विफल हुआ क्योंकि कनेक्टेड पक्ष ने ठीक से जवाब नहीं दिया समय की अवधि के बाद, या स्थापित कनेक्शन असफल क्योंकि कनेक्ट होस टी जवाब देने में विफल रहा है।] System.Net.Sockets.NetworkStream.Read (बाइट [] बफर, Int32 ऑफसेट, Int32 आकार) +296 MySql.Data.Common.M...

c# - RavenDB batch update -

I am trying to update the batch for a list of raven documents. The code below var result = documentStore.DatabaseCommands.Batch (documents.Select (d = & gt; New PutCommandData {document = RavenJObject.FromObject (d), Etag = null, key = D id, metadata = new raven joebase (),}). OfType & lt; ICommandData & gt; ()); Although there is no exception and the correct update timestamp occurs in the result of the batch, none of the updated documents in Raven. The same result Has anyone experienced the same behavior? It seems that I'm missing something with batch updates. Appreciate any help and concerns.

How to get a variable name as a string in Python? -

I would like to be able to get the name of a variable as a string, but I do not know that near Python Very introspection abilities such as: & gt; & Gt; & Gt; I want to do this because I have a bunch of wars, which I want to convert to a dictionary: Bar = True foo = False & gt; & Gt; & Gt; My_dict = dict (bar = bar, foo = foo) & gt; & Gt; & Gt; Print my_dict {'foo': False, 'bar': true} But I need to be more voluntary than that. In Python, local () and wars () , so I think there is a way. Are you trying to do this? ['Name' (name, eval (name))] for the name in 'something', 'list', 'ka', 'wars' Example & gt; & Gt; & Gt; Something = 1> & Gt; & Gt; List = 2> gt; & Gt; & Gt; Of = 3> and gt; & Gt; & Gt; Wars = 4> gt; & Gt; & Gt; ('Name, evil (name))' {'list'} (2, 'some': 1, 'wars') for th...

javascript - Selenium operation in different tab (Python or C++) -

I have an issue with selenium I have a scenario: User opens a browser via script: driver = webdriver.firefox () driver.get ("some_startpage") I want to change an element on the page in another tab, but my webdriver The focus is on the first tab. I've tried driver.getWindowHandles () to change the focus of the WebDrive, but it only shows a hingle (in the main window), and I switch the reference on the second tab can not do. webdriver.tittle shows the title of the second tab and webdriver.current_url displays the first tab's URL But in general it is normal I have read that Selenium does not support tabs in the browser. My question: Is there any work to work on elements on the other side (Meribi JS?) (Third, fourth ...) tab in browser? I do not want to open a new browser window, and humans should manually open tabs, it can not be done through selenium.

Attaching an image to jQuery's autocomplete -

I'm having some difficulty adding the image to jQuery's auto-complete widget. I'm a lot new for jquery so I apologize for the simplicity of the problem. The function Belbo is what I am using, but syntactically it is wrong (throwing firebug error "type error: $ (...). Autocomplete (...). Data (...) is undefined "), But I do not see where it is wrong. I can not even get on its functionality aspect! Any guidance would be helpful are already a number of questions on this tpoic but unfortunately I can not do anything because of my inexperience with could not manipulate messages to fit your case (mainly because jQuery). The way of avatar is "../avatars/user_id/user_id_thumbnail.jpeg" where user_id = an integer $ (function () {$ ("#main_search" Data ("Autocomplete") ._RenderItem = function (ul, item) {var pic_path = ' & Lt; img src = "../ avatars / '+ item.value +' / '+ item.value +' _thumbnail.jpeg...

asp.net - populate gridview on dropdownlist indexchanged -

I have the gridview that populates the date from the database. I want to change the data on the dropdown. I database when I choose I try to get one more data, but this code is my code Secure Zero Page_load (object sender, event year e) {if (IsPostBack) {BindData (); }} Private void BindData () {if (ddlTguidedit.SelectedIndex == 0) {select string strQuery = "[Pdfid], [Arpdf_name], [Arpdf_des], [pdf_date] [books_alaa] from. [Dbo]. [Tbl_uploadpdf] "; SqlCommand CMD = new SQL Commands (Structure); GridView1.DataSource = GateData (CMD); GridView1.DataBind (); } Else {string strQuery = "Select Pdfid, Enpdf_name Arpdf_name, Enpdf_des Arpdf_des, pdf_url, as as pdf_date" Tbl_uploadpdf of; SqlCommand CMD = new SQL Commands (Structure); GridView1.DataSource = GateData (CMD); GridView1.DataBind (); }} Private Datatable GetData (SqlCommand CMD) {DataTable dt = New DataTable (); SqlConnection con = new SqlConnection (strConnString); SqlDataAdapter sda = New SqlDataAdapter ...

Get a value of a particular cookie in Socket.io -

I am using socket.io for real time messaging in my application (most applications were not written in node ) I am looking for a way to get the value of special cookies with socket. The closest I've been using yet: client.request.headers.cookie which gives me a string: io = Ntp0MJVr3J_ifTKjAAAA; My_sess = c08mk6g0u66ifrjm6madt7535mknb7ur; Other = fk1sq140hgj6gmp1vdcimkto71 . I am not interested in all these values ​​and only need my_sess, of course I can split and parse the string. This is not the hardest and easiest way: var value = cookieStr.split ('my_sess =') [1] .split (';') [0]; But before doing so, I will ask if I have a native method to give the cookie value. You can install - a small module for cookies parsing and serialization: require cookie module without setting it up. : Var cookie = requires ('Express / node_module / cookie'); Then use it: var value = cookie Pars (cookiessrr) My_sess;

MongoDB - slow '$group' performance -

I have a MongoDB archive of more than 1,000,000 records. The size of each record is around 20 (hence the total storage size is about 20 GB). I have a 'Type' field in the collection (which can be approximately 10 different values) I would like to get a counter-type counter for the archive; In addition, there is an index on the 'Type' field. I have tested two different methods (consider the Python syntax): A naive method - Each value to use the 'count' call: For type_val in my_db.my_colc.distinct ('type'): Counter [type_val] = my_db.my_colc.find ({'type': type_val}). () Use the aggregation structure with a '$ group' syntax: counter = my_db.my_colc.aggregate ([{'$ group' : {'_ID': '$ type', 'AGG_val': {'$ sum': 1}}}]) The performance I am receiving for the first approach is Approximately 2 orders, more intensity than the second approach is likely to be related to the fact that the...

Why factor variable is not reordering in R -

I am using an example from this page: but the code does not work: D & LT; - Data. Frame (Team 1 = C ("Cowboy", "Legend", "Eagles", "Redskin"), Win = C (20, 13, 9, 12)) Team 1 Win 1 Cowboy 20 2 Baron 13 3 Eagles 9 4 redskin 12 & gt; D $ Team 1 [1] Cowboy Veteran Eagles Redskin Level: Cowboy Eagles Giant Redskins & gt; & Gt; D $ Team3 & lt; - Reorder (D $ Team 1, D $ Win) D Team 1 Win Team 3 1 Cowboy 20 Cowboy 2 Luminous 13 Luminous 3 Eagles 9 Eagles 4 Redskin 12 Redskin & gt; & Gt; D $ Team 3 [1] Cowboy Veteran Eagles Redskin Level: Cowboy Eagles Giant Redskins & gt; & Gt; D [Order (D $ Team 1), Team 1 Win Team 3 1 Cowboy 20 Cowboy 3 Eagles 9 Eagles 2 Giants 13 Giants 4 Redskins 12 Redskins & gt; D [Order (D $ 3 Team), Team 1 Win Team 3 1 Cowboy 20 Cowboy 3 Eagles 9 Eagles 2 Giants 13 Giants 4 Redskins 12 Redskins & gt; Team 3 is similar to Team 1 despite the column reader command. Where is th...

gdata - Google sites liberation: Bad Request Invalid request URI -

मैं जारी रखता हूं Jul 24, 2014 11:53:15 AM com.google .sites.liberation.export.ContinuousContentFeed? $ FeedIterator? CatchException चेतावनी: क्वेरी से प्रतिसाद पुनः प्राप्त करने में त्रुटि। com.google.gdata.util.InvalidEntryException ?: गलत अनुरोध अमान्य अनुरोध URI com.google.gdata.client.http.GoogleGDataRequest पर com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse (HttpGDataRequest.java:558) पर। handleErrorResponse (GoogleGDataRequest.java:543) com.google.gdata.client.http.HttpGDataRequest.checkResponse पर (HttpGDataRequest.java:536) com.google.gdata.client.http.HttpGDataRequest.execute पर (HttpGDataRequest.java:515) मैंने इस्तेमाल किया (आप इस परीक्षण खाते का उपयोग कर सकते हैं मैं नीचे पासवर्ड यहां प्रदान करता हूं :))। java -jar गूगल-साइटों-मुक्ति-1.0.4.jar डब्ल्यू https://sites.google.com/site/hmmtestgsl/ -u hmmtestgsl@gmail.com -p aaabbbcccddd -f ./backup और मैंने मुख्य में MANIFEST.MF को बदल दिया: मुख्य-क्लास : com.google.sites.liberation.expor...

c# - Unmanaged to Managed returning object that contains BOOL -

I am using a C + + DLL function to call PInvoke in C # in a returned object But the price is never right. I have read many articles on this, which tells that C ++ bool is 1 byte while C # Bull has 4 bytes. I have also seen how to solve this problem when a function gives a force, But my function is returning an object in which there is a boole. I am not getting any articles that handle this situation. For example, I have two strings for the input of unmanaged DLL functions and one that defines the output: public structure MyInput {public int id; Public string model number; } Public framework MyOutput {public int SomeValue; Public Double A Aalu; Public Bull ISIELD; } [DllImport ("MyUnmanaged.dll", EntryPoint = "? Unit @@yah? AUMyOutput @@ UMyInput @@@ Z")] Public stable extern MyOutput unit (Ref MyInput UnitInput); MyOutput does not work as defined above because the signature is invalid so I changed it: public int isvalid; This invalid signature take...

android - Inflate view in a single fragment -

I currently have an action bar with 5 tabs (pieces) in the developed app, one of these pieces shows a warning dialogue , But the layout is empty. I want to have a background image, so I created a layout for that piece and used the inflater.inflate (...) method to set the layout. The problem is that the line of code sets the layout to all pieces of pieces. Which limitation can I limit it to? This is my code: extends the public class migration agreement fragment {Creatives on the public view (Layout: Influencer Inflator, View Group Container, Bundle Saved InstantState) {// ... AlertDialog Ad = New alertDeal. GetActivity) .setTitle ("title") // ... ad.show (); Inflater.inflate (R. Late fragment_m, container); // This is the layout that I want to increase for the return of my piece. Conrite Viz (Inflator, Container, Saved Instantstate); } Also tried to replace the last two rows with: return inflater.inflate (R. framesment_trovy, container); But I'm getting ...

ruby on rails - How to make Jbuilder to always return times in UTC? -

I have an app where a user presents many dates and times without timing information. Obtains, interprets them as a dataset in the Pacific region, and saves them in the database in UTC. Then the controller gives a JSON built with JBilder that contains these datasets. I want to return these datasets to UTC, but not to change each of them explicitly for UTC. Is there a way to assign this conversion to Jbuilder globally? Here is some sample code to give an example of the question: # ActiveRecord has a default configuration, i.e. UTC time.US_Zone ('Pacific Time (US & Canada) ') P = Party.New (: start_at = & gt; "2014-07-27 15:00") p.save end Jbuilder.encode do | Json | Json.started_at p.started_at.utc # = & gt; "{\" Start_at \ ": \" 2014-07-27 T-22: 00: 00.000Z \ "}" #include .. TC # = & gt; "{\" Start_at \ ": \" 2014-07-27T 15: 00: 00,000-07: 00 \ "}" Termination How to return datasets...

html - CSS Image not touching top -

I'm creating a navigation bar is horizontal and touches both the sizes of the screen is only a problem that the top does not touch (as you can see yellow rectangle does not touch on the top) I had it I'm in CSS: html, body {margin: 0; Padding: 0; } HTML code: & lt; Div id = "nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "/ test" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; What am I doing? Your & lt; Ul & gt; Display is set as: block; by default. You are looking at the break of the line that comes before it. You eat it as a margin-top in your CSS: -10px;

Teradata : How to get the server name using query -

How do I get the server name using the query in Teradata? That is, if I am writing a question on 'Dev' server, then he must return the Dev Server Name. For example, in Sybase: We will select the @@ Servers name. There is nothing like @@ server name TD you can create a SQL UDF on each server Are, e.g. Repeat functions syslib. # Servername () returns VARCHAR (30) Language SQL is SQL SQL Ditermnistik reverse tap input SQL Security Defender COLLATION INVOKER inline type 1 returns Dev ' If the syslib , then it can be reached without qualification like this: SELECT #sernvername ();

php - search query via http using JSON -

I am sending an API request and want to submit a search term within the URL: $ Query = "My query"; $ Query_encode = urlencode ($ query); $ Url_json = "API_URL" $ Query_encode $ json = file_get_contents ($ url_json); What I want to do is that there should be a more complex word in "My query" such as: "word1 word2" (word3 or word4) And Word5 My problem is that I want to get results from the API (database) that matches "word1 word2", so send me quote marks through http in some way is required. Does anyone have an idea that I need to set the contents of my query, which includes the necessary quotation marks, to send a question with the phrase, not just the word $ query = "My query"; If you want to send a quote then include it in your query. If you set a string value inside the quote in PHP, then whatever you have is not an extra quote, which you want to send along with on request, the quotes will be parse...

ruby on rails - Partials not transferring local variable correctly -

Image
This is completely confusing for me error message telling me that the user is undefined and I know that I correct it I am passing through manner Never before and I have never seen this error message what am I doing? Unloading / show.html.erb Error: Edit session controller: Thanks! Wrap the variable in the hash of the local people and call using partial assistant. Partial render: "error message", local: {user: @ user} You can now enter partial code to user Should be able to reach.

c++ - C/pp Sockets, recv()/send() works only under gdb -

Edit: In the socket: The CanReceive () argument was the reason I was checking the input 1 millisecond While stepping into GDB, everything worked out. I have a problem with C sock send () / recv () do nothing if they are in non-debug mode. Even if std :: cout can not return their return value for some reason std :: cout is not working in my method I std: : Cerr can not even make a mistake It does not make sense to check that in GDB, because everything works perfectly as a virus in non-debug mode. C does not. //b - buffer // s - size // sd - socket descriptor int32_t TCP :: reception (char * b, uint32_t s) {error :: critical. SetErrorNumber (error: List :: noor); If (! Socket :: valid (sd)) {error :: serious .sitemember (error :: list :: invalid socket); Return -1; } If (Disconnect ()) {Error :: Critical. SetErrorNumber (Error :: List :: Notepanked); Return -1; } If returned (! Socket :: canvasive (SD, readtimeout)) incorrect; If (! B) {B = new four [S + 1]; Std :: mem...

post - Haskell, Posting Values to Webpage -

I am trying to display GET and POST for websites in Haskell, and I also have trouble finding this address Find out how to make a simple post. I'm sure this is a GET. Import Networks http. Context import data Context import data Conrad. Binary (syncfile) importable data. Biotrading L import control as LG Monad.IO.Class (liftIO) import control. Monad Trains Resource (runResourceT) Main :: IO () Main = Run Run Resource $ tax case Parse URL "https://www.google.com" Nothing - & gt; LiftIO $ putStr "Not a valid URL" just request - & gt; $ Manager with manager - & gt; Do ridge and lieutenant; - httpLbs rake manager LITO L.putStr $ responseBody res Can anyone show me an example how to post in the mail? I have tried to find a better example, which I understand I can not, but I have not got any luck! Can you please post me using the "Login" -> "James", "Pass" -> "Mypassword". thank you in advanced! Y...

javascript - Cordova plugin not being loaded into the DOM -

I am trying to use the Cordova plugin in one of my ionic apps, I have installed it with it: add the Cordova plugin https://github.com/christocracy/cordova-plugin-background-geolocation.git More demo sets as an example Please. However, this is not being loaded as is in README, you should use them with: window.plugins.backgroundGeoLocation However , It is undefined. What is the correct way to install / open it?

closures - Do the parameters passed into an anonymous function in Javascript have special properties? -

I have seen the snippets of javascript written in different blog posts like this and I have some problem that is the concept of properties, when They are passed in anonymous works. For the example given below: var http = {banana: function (context) {var object = {say something: function (msg) {console.log (Msg); }}; Return reference (object); }} Http. Ban (function (some) {something.saySomething ("I love bananas!");}); " I like bananas! " It's back from but what I do not understand is why " context "Anonymous function can do this for parameter bananas: references (object); What are the special properties of the parameter to be passed in the unnamed properties? How does this happen even when I add an extra parameter to the banana function: / P> banana: function (reference, string) {........} Try again: return string (object); I get an error? You expect a callback function parameter reference to be a function in...

c++ - How to get the full HTTP request URL using Apache httpd API (request_rec)? -

मुझे CPP में एक कोड बनाने की आवश्यकता है जो कि request_rec से पूर्ण HTTP अनुरोध URL प्राप्त करते हैं (मेरे httpd में मैं यूआरएल को हेरफेर नहीं करता, इसलिए मुझे लगता है कि यह नहीं बदला गया है) उदाहरण के लिए, अगर कोई उपयोगकर्ता http: / server1 / application1 तक पहुंचता है / पृष्ठ 1 मैं इसे सर्वर साइड पर प्राप्त कर सकेंगे। मैंने therequest का उपयोग करने की कोशिश की है, लेकिन यह सर्वर का नाम मुद्रित नहीं करता () जोड़ा फ़ंक्शन का उदाहरण मुझे जावा में मैं const char * ap_get_server_name (request_rec * r) का उपयोग कर इसे प्रबंधित करने में सक्षम था

ios - PFFacebookUtils loginWithPermissions errors first time, goes through the second -

So I'm working on the initial flow of my app, and my Facebook login is all bad now. After deleting all references to my user account in my database (parsed, then in the browser I have removed my installation and user object), and to remove my app permissions directly, I should be in a new one User's trend When they reached the clean state to start I'd start the app, login page and tap the Facebook login. I get this error then: Uh oh There was an error: Error Domain = com.facebook.sdk code = 5 "The operation could not be completed. (Com.facebook.sdk error 5.)" UserInfo = 0x14e848e0 {com.facebook.sdk: HTTPStatusCode = 400, com. Facebook.sdk: ParsedJSONResponseKey = {body = {error = {code = 190; "Error_subcode" = 458; Message = "Error validating access token: User has not authorized 578357495617589."; Type = OAuthException; }; }; Code = 400; Header = ({name = Connection; value = close;}, {name = expires; value = "Sat, 01 Jan 2000 00:...

java - Eclipse - playframework, angularjs and coffeescript -

I have started a new project, where there is playfamework 2 as a backend and with a coffeeplus as a frontend For Angels, I'm using Eclipse and I was looking for plugins that help in writing code in these frameworks. I found, but it does not work with coffeescript (or maybe I do not configure it) when I open I can see plain text of angular editor without any highlights and content help in Cooney file. How to configure eclipse to work with these frameworks? Or maybe another IDE for Angels, coffee script in playframe work structure? Thanks for the answer and sorry for my english. For me, I use Sublime Text 2, which you can download from .. Then you can add some plugins to support those structures. Causescript: Angulose: Run: / Li> Hope this helps ..

python - How can I get python3 file.close to release the file lock? -

Python3 file.close is not apparently giving the file, so it can not be used by Win7 commands. To: Wise: Import OS, time hfile = "condition .htm" hf = open (hfile, "w") hf.write (str (buf) )) Hf Close time.Sleep (2) # Close enough time to os.system (hfile) # Run the html file in the default browser This is an error message from Win7 The result is saying, that the file can not be accessed because it is currently in use, however, it can be easily used after the dragon program is over. Yes, I know that similar questions have been given here, but I did not see a common answer. You can simply close () Forgot to call hf.close # incorrect hf.close () # correct You can see that hm.close just do not call it Gives you a bound method: & gt; & Gt; & Gt; Hm.close & lt; Built-in method, close the _io.TextIOWrapper object at 0x7ffe8ec74b40 & gt; As Pedriak Chalami Hamm said, if you just use with syntax, then you do not have to d...

c# - Web Api 2 - How do i return an image (MemoryStream from Azure Storage) from a HTTPGET without saving to disk ? -

I am using Web API 2 with C # and Ezur, and how to return image (base from memorystream) To display on the page ... Here my administrator HTTPGET [root ("API / PhotoSmit / GetPhoto / {ID}")] [httpTPA] Public HttpResponseMessage GetPhotoById (Int ID) {storage service storage = new storage service (); MemoryStream MS = Storage. DownloadBlock (ID); // Return what? } Here is the beginning of the escape: $ http ({method: 'GET', url: 'api / PhotoSubmit / GetPhoto /' + $ RouteParams.id, accept: 'application / json'}) .success (function (results) {// How do I handle the result and how should I use HTML? & Lt; img?}); Hope someone has knowledge of this and can help me with this "show-stopper";) You do not need to use $ http from the client side. You can simplify the process by using plain old HTML ... & lt; Img src = "/ api / PhotoSubmit / GetPhoto / 2232" /> Use JQuery for dynamic images like this ......

android - How to use jfeinstein sliding menu with a mapview -

How can I integrate the jfeinstein sliding menu inside a map view? I tried to use code in this post but it still does not work. It is completely easy, but go and download the Java class suitable. This will fix the slidingMapActivity problem. Then SlidingMapActivity from Acitivty of extension in ATT and you

c# - How to properly wait for an unawaitable operation to complete -

In my app, I created a class, SerializableBitmapImage, which displays a default image while another image is downloaded from the Internet It also allows to download the downloaded image as a byte array so that the image does not need to be downloaded at every app launch. I currently have a serializable bitmap image in a square "card" that is saved right after downloading the card data: var resp = appData.API.GetCards (); If (resp! = Null) {if (AppData.CardsData == empty) AppData.CardsData = new card data (); AppData.CardsData.Update (resp); AppData.SaveCards (); FillCards (); } However, occasional images applet in the serializablebitmap image. Downloading of Savcards () timings does not end, so images can not be saved. Therefore, I am looking for a way to save images until I get the download. Right now, I am downloading images to the creator of SerialWebbitmap image like: image = new bitmap image (default Yuri); // Set the bitmap to default while downloading the ...

c# - Display an image from a file path in an image control -

I am trying to do something that should be simple - file control using image control, file path. Here's the XAML for image control: Here is the converter: Public Seal Class PathToImageConverter: {Invite Public Object Convert (Object Value, Type TargetType, Object Parameter, String Culture) {Try {New bitmap image (new URI (string value)); } Hold {return new bitmap image (); }} Public Object Convertback (Type Object Value, Type Type, Object Parameter, String Culture) {New Non Imulated Expansion (); }} I think I am very much in the dark to understand it. I know that the path of the image is happening in FavPicPath because I can see it when debugging. This is a path example "C: \ Users \ John \ Picture \ OldPictures \ 2010-04-18 18th April 2010 Mulberry Flowers \ 18 April 2010 Mulberry Flowers 022.JPG" I also try to put that The path in the image source of the direct control and still can not be found to show it I tried several different ways to show the ...

java - paintComponent () never executes on a JFrame -

आयात करें javax.swing.SwingUtilities; आयात javax.swing.JFrame; आयात javax.swing.JPanel; आयात javax.swing.BorderFactory; आयात करें java.awt.Color; आयात करें java.awt.Dimension; आयात java.awt.Graphics; Import java.awt। *; आयात करें java.awt.event.MouseEvent; आयात करें java.awt.event.MouseListener; आयात करें java.awt.event.MouseAdapter; आयात करें java.awt.event.MouseMotionListener; आयात करें java.awt.event.MouseMotionAdapter; Import java.awt.geom। *; Import java.util। *; पब्लिक क्लास टेस्ट 1 जेफ्रेम लागू करता है माउस लेस्टनर {निजी जेपीनल जेपी = नया जेपीनल (); सार्वजनिक टेस्ट 1 () {जेपी। सेटबॉर्डर (बॉर्डरफैक्चर। कंटेंट लाइन्स बॉर्डर (कलर। ब्लैक)); JP.addMouseListener (this); this.setDefaultCloseOperation (this.EXIT_ON_CLOSE); this.add (जेपी); this.pack (); } सार्वजनिक स्थैतिक शून्य मुख्य (स्ट्रिंग [] एल्ग्स) {जावा.एवीटी.एवेंट्यूयुयु.इन्वेल्लेटर (नया रननाबल () (सार्वजनिक शून्य रहित) {test1 फ्रेम = नया टेस्ट 1 (); फ़्रेम.सेटसिज़ (400,400), फ्रेम.सेस्वियबल ( सच); } ...

Haskell 2D character array -

I have a question from Haskell language. I need to store a bunch of letters in the 2D array. How can I store it ?? The text file contains characters in 10x10 format and I want to store it in 2D character array in hackel language. Please help me as soon as possible .. Thanks .. Here is the code that I tried and in this code I am attempting to store the value of x in the listofchar name list: module tracerfile where importing system. IO main = WHD HDL & lt; - openFile "map.txt" ReadMode readbychar hdl readbychar hdl = do not t & lt - hIsEOF hdl if t then return () and let listofchar = [] x Try it out: import system.IO Main = This program facilitates the move: First, readFile Reads the file and binds the content on textContents . Next, whenever we encounter a Newline delimiter and format the content by dividing the list then finally remove the remaining empty string. Done! Now what we want from our "map", we can do. A small note...

c# - How do I enable the PUT and DELETE HTTP methods running Nancy in xsp4 on Mono? -

I should have some incredibly easy. I'm writing a Nancycks app using the Zoom Studio I pUT in my module and I want to use DELETE HTTP methods, but when I issue a PUT or DELETE request, I do not get the 405 method back allowed and allow me to allow: GET, POST HTTP response title. My app is running in xamarin studio on OSX under xsp4. The problems I have seen while running under IIS are only relevant. How can I put and select XSP4 / Mono / Nancy? I do not believe that Nancy is the problem. I'm pretty sure that it is limited to XSP4 server on mono. Am I missing something in the config file (posted below)? The DELETE handler in my Nancy module looks like this: delete ["/ API / Family / {Id}"] = _ = & gt; {Int row = 0; (IDbConnection con = dbFactory.Open ()) using rows = con.execute ("Remove from family WHERE id =?", New {id = _.id}); Return response. ASJASON (rows, HTTTPTAS code oak); }; My web.config file is very simple; it enriches Nanc...

Nested Struct and Array C++ -

Hello, I am working with Nested Stracts and Array in C ++, here are some background information: Code> A collection of cells in the structure room / data cells : [Cell] // cell: a location and a value nCells :: integer // Number of cells in array capacity :: integer // maximum size array end structure cell location :: int // data cell lines have a location value :: int // values ​​end cells with me Od which will not compile (3 files, header, ADT implementation, I am Main) How do I tell incorrectly nested structure structure array? // cell defines the AHDT interface structure; Structure cell; Cells [cell cells] []; Int nCells; Int capacity; }; Struct cell {int location; Intestine value; }; // Fill in random number zero initial cells (cell * rcells); ADT implementation using namespace std; # Include & lt; Iostream & gt; # Include & lt; Cstdlib & gt; #include "cell.h" zero start (cell * rcells) {for (int i = 0; i nCells; i ++) {rcells- & ...

regex - .htaccess URL rewrite: file.php?param=val --> removing 'file.php?param=' -

बस एक ही समस्या को मेरी पोस्ट की पुष्टि करने का हल, महान! : पी वर्तमान में मेरे पास यह कोड है: # बाहरी रूप से /file.php?page=cat/subcat/page पर / cat / subcat / page को पुनर्निर्देशन% {THE_REQUEST} file.php? पेज = (। *) [एनसी] रीव्रेटआर्यूल ^% 1 [आर = 301, एल] # आंतरिक रूप से आगे / बिल्ली / उपकैट / पृष्ठ पर /file.php?page=cat/subcat/page RewriteCond% {REQUEST_FILENAME}! -d रिक्राइटकॉन्ड% {REQUEST_FILENAME}! -f पुनःलेखन नियम ^ (। *?) /? $ File.php? पृष्ठ = $ 1 [एल] सबसे पहले , मुझे उम्मीद है कि यह वाक्यविन्यास सही / कुशल है ... मैं regex पर चूसना! अभी, का दौरा: / cat / subcat / page सही ढंग से काम करता है लेकिन अगर मैं /file.php?page=cat/subcat/page पर जाता हूं तो पृष्ठ बिल्ली को रीडायरेक्ट नहीं करता है / Subcat / page। आंतरिक / बाह्य रिफ़्रिक्शन, regex, और .htaccess पूरी तरह से मुझे भ्रमित करता है, इसलिए मुझे यकीन नहीं है कि मुझे समस्या की तलाश क्यों करनी चाहिए I अगर इसका मतलब है कि कुछ भी, दोनों htaccess और file.php फ़ाइल www.website.com/test/ पर स्थित हैं...

java - Delimiter to use for parsing negative numbers -

मैं integers (सकारात्मक और नकारात्मक) को खोजने के लिए split का उपयोग कर एक स्ट्रिंग पार्स करना चाहता हूं। उदाहरण के लिए, dfgs # & amp; -6d5।, B-dgj895-9-8 सरणी में बदल जाएगा [- 6, 5, 895, -9, -8] । अंग्रेजी में, regex होगा: अक्षर जो अंक नहीं हैं वर्ण जो अंकों के बाद डैश नहीं हैं ज़ीरो-चौथाई वर्ण जो एक डैश द्वारा पीछा किए जाते हैं, जो एक अंक के बाद होता है ये अलग घटक हैं, लेकिन मुझे नहीं पता कि उन्हें कैसे एक साथ जुड़ना है: \ D + [^ - (? = [0- 9])] (? = - [0- 9] +) split स्पष्ट रूप से आप चाहते हैं परिणाम प्राप्त करने के लिए उपयुक्त उपकरण नहीं है हालांकि इसे split के साथ करने के लिए आप इस पद्धति का उपयोग कर सकते हैं: स्ट्रिंग [] nbs = text.split ("(? & Gt; [^ - 0-9] (?! [0-9]) - | +) + | (= - [0-9]) "); लेकिन आपको खाली परिणाम निकालने की आवश्यकता है (जो शुरुआत के समय या अंत में, स्ट्रिंग के आधार पर हो सकता है)।

php - Unable to apply array_unique on exploded string -

I have some database records that I want to take in an array and some of them are duplicates. Attempted to filter with array_unique but it does not appear to work on explosion () -d strings. $ string = 'one two three one'; $ Explosion = array_unique (explosion (',', $ string)); Var_dump ($ blast); Output the following: array (size = 1) 0 = & gt; I also tried to use the str_getcsv () function as a bit of a solution, but no one was able to use the string, 'one two three one' (length = 17) Not benefited; array_nank (str_getcsv ($ string)); What is the result of the above example? Your string spam is delimited, not commas: $ String = 'one two three one'; $ Explosion = array_unique (explosion ('', $ string)); Var_dump ($ blast);

How to arrange animation order properly in Swift language for ios? -

I have to realize such an effect: a pile of card (UIView) (0,0) to (100,100) ) One by one; After the last card is over, all the cards come back again (0,0) after one I wrote the code written below, but the effect is not correct Please help me understand that the problem is where is. Import UIKit class card: UIView {var name: string = "" init (name: string) {super.init (frame: CGRtechMake (0, 0, 100, 100)) .name = name self.layer.borderColor = UIColor.blueColor () CGColor self.layer.borderWidth = 0.3}} Class ViewController:. UIViewController {var cardGroup: Card [] = [] Start @IBOOTlet var: UIButton! Override Funk Viewedload () {super.viewDidLoad ()} @Ibation Funk Start () {var Cardorder = ["HeartSyncS", "HeartSewen", "Heart Eite", "Hartinine", "Hearttone", "DiamondJack", "ClubQueen "," SpadeKing "," HeartAce "] for (Var I = 0; I & lt; cardOrder.count; ++ i) {var card = card (n...

angularjs - Dynamically add angular attributes to an element from a directive -

I am trying to create a directive which is a slow Ajax calls, in fact it is the idea that "Button" -Loading "is to set up the attribute, and the instruction is to add the rest of the goods. This is the html code: & lt; Button class = "btn btn-primary" name = "commit" type = "submit" ng-loading = "loading signup" & gt; & Lt; / Button & gt; Submit and this is the directive code: . Replace: False, Terminal: True, Link: Function (Scope, Element, ethers) {element.attr}, 'Directive', ['$ compile', 'function' ('Ng-class', '{loading:' enters ['njyloding'] + '}'); Element.attr ('ng-disabled', attrs ['ngLoading']); element.append (angular element '& Lt; img class = "loading-icon" src = "/ assets / images / loading-icon .gif" />); $ compilations (element.contents ()) (scope);}}; }]; All this looks correct in ...

javascript - Dynamically changing chart data using Django and Highcharts? -

Image
How can I allow a user to change the status of the graph and update it on the page? For example, allows a user to adjust the size of a graph without having to re-administer it. I am using high charts in Django, which I thought of doing is this. Send all the data up, and set a default size so that there is something to show. Then a dropdown or some addition that allows the user to increase the size of the graph. When a user selects one of them, I somehow slice the data to increase the size. Example, the list is sent to L = [1,2,3,4,5,6,7,8,9,10], but the default size is 5. Therefore only L [: 5] has been displayed. The user chooses the size of 6, so it reloads so that El [: 6] is displayed. Example graph: data is collected, fun things are done and all charts are set -> def post (self, requested): ... top_chart_series = Consolidated user data, ready to be parsed in JS. # Currently I'm only sending the default size of the data (top 10 words) # But what I want to...