Monday, 15 July 2013

regex - Perl regular expression to grep for a word after specific pattern -


मेरे पास एक चर के लिए निम्न पंक्ति है:

  "[कुछ सामग्री] NAME : सरण्य "  

मैं इस शब्द के बाद एक शब्द के लिए grep कैसे कर सकता हूं?

एक सरल कैप्चर आपकी आवश्यकताओं के अनुरूप हो सकता है हालांकि यह काफी स्पष्ट नहीं है कि आपका क्या मतलब है।

  मेरे ($ शब्द) = $ string = ~ / \ Q [कुछ सामग्री] NAME: saranyya \ E (। +) /;   

\ क्यू .. \ ई से बचने से आपके रीजेक्स के अंदर मेटा अक्षर [] के उपयोग की अनुमति होगी। आपके पैटर्न के बाद का कोई भी पाठ कैप्चर और $ शब्द को सौंपा जाएगा।

c# - ASP Dropdown list not changing the value -


First of all, I still find me down my web god I so posts, blogs, newsgroups and stacks of articles I have been working through and I am unable to fix my problem. This is similar to at least 10 different positions seen by me.

I have an ASP gridview, which acts as a demonstration and a select column. When you click on the selection, it throws the data in the description view. I have a field that needs to be a drop down box, but whenever I change the value and update the value that is sent to the command The original value is

Page Markup:

  & asp: TemplateField HeaderText = "Planner Name" & gt; & Lt; ItemTemplate & gt; & Lt; / ItemTemplate & gt; & Lt; EditItemTemplate & gt; & Lt; ASP: DropDownList ID = "cboCurrentPlanner" runat = "server" DataSourceID = "plannerDataSource" DataTextField = "planner_name" DataValueField = "planner_id" SelectedValue = '& lt;% # Eval ( "planner_id")% & gt;' AutoPostBack = "true" & gt; & Lt; / Asp: DropDownList & gt; & Lt; / EditItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; Asp: CommandField ShowEditButton = "True" /> & Lt; / Fields & gt; & Lt; FooterStyle BackColor = "#CCCC99" ForeColor = "Black" /> & Lt; HeaderStyle BackColor = "# 333333" font-bold = "true" ForeColor = "white" /> & Lt; PagerStyle BackColor = "White" ForeColor = "Black" HorizontalAlign = "Right" /> & Lt; / ASP: DetailsView & gt;   

SQLDataSource:

  SelectCommand = "vendor_key, vendor, Planner_name, road, select the city, State_country, Planner_id, country V_MAP_MarkerInfo where (vendor_key = @vender_ke) "Updtkmnd =" Map_usp_vebpdteplantovendor "Updtekmmandeepe =" Storedprosedure "Onupdting =" Mpdaetalsurs_updting "& gt; & Lt; SelectParameters & gt; & Lt; Asp: ControlParameter ControlID = "GridView1" name = "vendor_key" property name = "selected value" type = "int32" /> & Lt; / SelectParameters & gt; & Lt; UpdateParameters & gt; & Lt; Asp: parameter name = "vendor_key" type = "string" /> & Lt; Asp: parameter name = "planner_id" type = "int 32" /> & Lt; Asp: parameter name = "vendor" type = "string" / & gt; & Lt; / UpdateParameters & gt; & Lt; / ASP: SQLDataSource & gt; & Lt; ASP: SQLDataSource id = "plannerDataSource" runat = "server" ConnectionString = "& LT;% $ ConnectionStrings: vendor_mapConnectionString% & gt;" Select [MAP_planners] from SelectCommand = OldValuesParameterFormatString = "original_ {0}" & gt; [planner_id] [planner_name] "; & Lt; / ASP: SQLDataSource & gt;   

I will not post the stored procedure code, I know that it is working. The original value makes it easy for the price parameter only

I have tried all kinds of combinations of and ### Bind / eval ()% & gt; Postbacks But I'm not getting the right combination.

When I click on the selection, I want the current planner to be selected in the dropdown list. When I select a new Planner and click Update, I would like Planner to update. I am not sure why this is so difficult or I have made it difficult for this, but I am at the end of my mind, if possible, I would like to know what is happening and not just that magical line code Which does this work.

There is a particular badge.

EDITS: Wustaitianbag ટેડ = "true" has been added to the dropdown list, selected index has changed event is firing

Re-edit: & lt; Asp: ControlParameter & gt; DetailsView1_OnDataBind and MapDataSource1_updating and the value is in all places but I do not know why it is being reset. Set to EnableViewState = "false"

@ Control or @ Page settings? If visibility is not enabled, the control will always be the default value as the selected value. It can be set at the ASPX level or SSCX level.



Python progress bar and downloads -


I have a dragon script that launches a URL that is downloadable file. Is there any way to use the command line to download the python to oppose the browser launch?

Updated to your sample url:

To scrap a PDF, just a simple (slightly hacked) approach is written. Note that this works correctly only on Unix-based systems (Linux, Mac OS) because PowerShell "\ r"

  link = "http: // indy / abcde1245" file_name = F: Print "Downloading% s"% file_name response = requests.get (link, stream = true) total_length = response.headers.get ('content-length') if the file: "" (file_name, "wb"). Total_length None: # no content length header f.write (response.content) else: dl = 0 total_length = int (total_length) for data in feedback.iter_content (chunk_size = 4096): dl + = len (data) f .write (data) done = int (50 * dl / total_length) sys.stdout.write ("\ r [% s% s]"% ('=' * done, '' * (50-made))) Sys.stdout. Flush ()   

It uses it so that you can install it. This is similar to the following in your console:

& gt; Downloading DataData

& gt; [=============]

The progress bar script has a width of 52 characters (2 characters are only [] therefore 50 characters of progress). Represents 2% of each = download.

javascript - Resize parent element when inner one is dragged. (jqueryUI draggable) -


When the #right element is drawn, Parents want to change shape My example works incorrectly and I have failed to understand why any signal to fix it?

Just in case, what I'm trying to do here is to make a resizable scroll similar to that. But for now, I'm just interested in the right element.

The simplest solution is as follows (note # left and #right changes in SCSS):

SCSS:

  # container {width: 500px; Height: 100 pixels; Background: #F9F9F9; } # Nav {width: 100px; Height: 100 pixels; Background: # E9799; Cursor: move; } #left {width: 10px; Height: 100 pixels; Status: Completed; Top: 0; Left: 0px; Background: # A9A9A9; Cursor: W-resize; & Amp ;: Hover {background: # 999; }} #wright {width: 10px; Height: 100 pixels; Status: Completed; Top: 0; Correct: 0px; Background: # A9A9A9; Cursor: changing the e-shape; & Amp ;: Hover {background: # 999; }}   

Javascript:

  var cont = $ ("# container") var nav = $ ("# nav") var left = $ ( "# Left") var correct = $ ("# right") nav.draggable ({prevention: cont}); Right.draggable ({prevention: cont, drag: function (e, ui) {nav.width (ui.position.left);}});   

The only problem was that you were getting very fancy with your javascript. All the information you needed in Ui.position.left was what I did, the content was changed from floating to position: absolute;

c - Stuck on linked list exercise -


I wrote this function that creates nodes.

When I add only one node, the program works, but if I add another node I get a split mistake, so obviously the problem is "second" of "add_node ()" Is in the part, but I can not understand it

  #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Typedf Structure node {four * city; Structure node * next; } Node; Node * start = null; Node * on; Zero add_node (char * cityname) {node * y = molok (node)); Y-> city = city name; Y-> gt; Next = null; Current = start; If (start == tap) {start = y; } And {while (current! = Null) {current = current-> next; } Current-> Next = y; }} Int main () {add_node ("Paris"); Add_node ("London"); Current = start; While (current! = Null) {printf ("% s \ n", current-> city); Current = current-> next; }}    

You have a loop that is current Takes the tap up ... then you set the current-> to y , but current is essentially zero.

A simple way to fix this is to change the loop

  (current-> next! = Null) {  

I also note that you should avoid the global current should be a local variable and start should be a parameter ... and I just call it list Call because it reflects that it should return the value (possibly new) to add_node to list .

php - How refresh the page in post method -


मैं वसा रहित PHP ढांचे का उपयोग करता हूं

PHP:

  F3 :: मार्ग ( 'पोस्ट / वोट', function () {वैश्विक $ टहनी, अगर (isset ($ _ प्राप्त [ 'studentKey']) ) {$ studentKey = $ _GET [ 'studentKey']; // Ð²Ñ ?? Ð ± Ð¾Ñ ?? кР° आईडी n ?? Ñ ?? Ñ ?? Ð'ÐμÐ½Ñ ?? Ð ° $ SELECT_student_Id = "का चयन करें पहचान की ID कहां studentKey = '$ studentKey' "; डीबी :: एसक्यूएल ($ SELECT_student_Id); $ studentId = F3 :: ( 'DB- & gt; परिणाम'); मिल // Ð²Ñ ?? Ð ± Ð¾Ñ ?? кР° आईडी п Ñ ​​?? ÐμпоÐ'Ð ° вР° N ?? ÐμÐ »एन ?? $ SELECT_teacher_Id = $ studentId [0] [ 'आईडी']" kbinding कहां idStudent = से idPrep का चयन करें। "; डीबी :: एसक्यूएल ($ SELECT_teacher_Id ); $ teacherId = F3 :: प्राप्त ( 'DB- & gt; परिणाम'); गूंज $ twig- & gt; प्रस्तुत करना ( 'vote.html', सरणी ( 'आईडी' = & gt; $ studentId [0] [ 'आईडी' ], 'teacherId' = & gt; $ teacherId [0] [ 'idPrep']));} else {$ twig- & gt गूंज;, प्रस्तुत करना ( '404.html' सरणी ( 'त्रुटि' = & gt; 'डी ?? Ñ ​​?? иР± кР° '));}});   

जावास्क्रिप्ट:

  $ (document) .ready (function () {$ ('# sendData')। क्लिक करें (function () {$। एजेक्स ({type: "POST", url: "engine.php", डेटा: some_data, सफलता: फ़ंक्शन () {*** location.reload (); ***}, त्रुटि: फ़ंक्शन () {चेतावनी (" त्रुटि ");}});});});   

और मैं पृष्ठ को ताज़ा नहीं कर सकता, क्योंकि यह एक पोस्ट विधि है मैं बिना किसी समस्या के पोस्ट विधि का उपयोग कैसे कर सकता हूं और इस पेज को ताज़ा कर सकता हूं?

मेरा समाधान अगले है:

  1. फ़ॉर्म बनाएं, विधि 'पोस्ट' जोड़ें
  2. अस्थायी पृष्ठ बनाएं, जो प्रपत्र से मूल्य प्राप्त करता है।

    2.1 सत्र में यह मान संग्रहीत करें < / P>

    2.2 इसके बाद, किसी अन्य पृष्ठ पर रीडायरेक्ट करें

java - How do I create an embedded WebSocket server Jetty 9? -


I hate to ask such a vague question, but I'm having a hard time finding a simple example. That's what I have so far:

  Public Sector JettyWebSocketServlet extends WebSocketServlet {@Override Configure Public Zero (factory). (Factory.register (MyEchoSocket.class); }} @WebSocket Public Square MyEchoSocket {@OnWebSocketMessage Text on Public Zero (WebSocket Connection Connection, String Message) {System.out.println ("Text:" + Message); {Conn.write (Tap, New FutureCollection (), "Found:" + Try); } Hold (exception e) {e.printStackTrace (); }}}   

In embedded Jetty examples, I can always show something like the following to start running a server instance, but I do not know how to update my WebSocketServlet. server server = new server (8080); Server.start (); Server.join ();

How can I create an embedded server that can handle the webserver connection request?

Update: December 2, 2013

Embedded See for example a date with WebSock with JetT:

Original Answer

An example of test cases Has been found.

Short answer:

  server server = new server (8080); WebSocketHandler wsHandler = New WebSketchesHandler () {@Override Configure Public Zero (); factory.register (MyEchoSocket.class); }}; Server.addHandler (wsHandler); Server.start (); Server.join ();   

This will create a simple server that controls 1 reference, the original reference.

  http: // localhost: 8080 /   

If you want to pair WebSocketHandler in another context, wrap it in a contextual handler.

  server server = new server (8080); WebSocketHandler wsHandler = New WebSketchesHandler () {@Override Configure Public Zero (); factory.register (MyEchoSocket.class); }}; Reference Handler Reference = New ReferencesHandler (); Context.setContextPath ("/ echo"); Context.setHandler (wsHandler); Server.addHandler (reference); Server.start (); Server.join ();   

This is your websocket

  http: // localhost: 8080 / echo /    

android - Click twice to check Radio Button? -


I am trying to create the probe app and I'm using the radio button for one of the options, B, C, D. I'm trying to calculate the result - & gt; For example, when one increment press 1, when the increase of B is pressed 2 and on this I was using the radio group for the first time, but I understood that the user tries to change the answer to his question from one, then the increase will not be expected as the results 3, 2 will be expected. So I switched to the radio button and I tried the following code:

  rb1.setOnCheckedChangeListener (new android.widget.CompoundButton.OnCheckedChangeListener () {@Override Public Zero onCheckedChanged (CompoundButton buttonView, Boolean IsChecked) {i ++, if (rb2.isChecked ()) {i--; rb2.setChecked (wrong);}}}); Rb2.setOnCheckedChangeListener (new android.widget.CompoundButton.OnCheckedChangeListener) {@CheckedChanged on Public Zero (compound button button view, boolean hackcake) {i ++; if (rb1.isChecked ()) {i--; rb2.setChecked (False);}}});   

And now the second radio button sequence has to be checked twice. Does it have a bug and it may decide I need the button to change the state after the first click. All ideas and advice will be welcome Thanks.

You can change your code to use a switch statement (as suggested in a comment) But if you want to continue doing what you have, and to answer your question, for Rb2 in your code, you are saying that if rb1 is checked then rb2 is set to false has been done. Therefore, if you click RB1 (and it is now checked / pushed) and if you click it unselected RB2 for the first time, it keeps checking for 2 times.

Then sticking to its coding style and process:

  Public Zero (compounded button button view, check boolean) on check-in {i ++; If (rb1.isChecked ()) {i--; Rb2.setChecked (wrong); }}   

should be:

  checked on public invalid (compounded button button view, boolean is checked) {i ++; If (checked & amp; rb 1.is check ()) {i--; Rb1.setChecked (wrong); } Rb2.setChecked (isChecked); }   

Make a similar change in your RB1 method.

javascript - Change class onClick using jquery -


I have a navigation that shows an active status using class = "active". When a link is clicked, I have to add an "Active" class to click, and all other links will have to remove the "Active" class.

Here's my code:

  & lt; Div id = "references" & gt; & Lt; Div id = "refer 1" & gt; & Lt; A href = "javascript:;" OnClick = "changeClass ();" Class = "active" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "referLink2" & gt; & Lt; A href = "javascript:;" OnClick = "changeClass ();" Class = "" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "refer33" & gt; & Lt; A href = "javascript:;" OnClick = "changeClass ();" Class = "" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

Any help would be appreciated! Try it out:

  function changeclass () {$ ('$')   

And you should also force the function in Javakrat like this:

  $ ('#NotNav A'). On ('click', changeclass);   

In this way, as reported in Travis J., $ (this) will reference the correct object.



django - Setting choices for a field in a Form Wizard? -


I'm trying to create a simple quiz application. I am trying to use the form wizard, but I do not see anything in Docs about setting options for a form field. I would like to use the same form field multiple times

models.py
  class options (models.model): choice = model. Kharefild (max_long = 64) def __unicode __ (self): Returns self.choice #create A multi-choice quiz for starting class questions (models.Model): Question = Model. CHAfild (max_long = 64) answer = model. Kharifield (max_long = 64) option = model. Multi-standard Field (Choice) module = Model.Carfield (max_length = 64) def __unicode __ (self): return self. Question Category Quiz (models.Model): name = models.CharField (max_length = 64) Question = models.ManyToManyField (question) def __unicode __ (self): return self.name   

views .py
  class quiz (session wizard view): DEF (self, form_list, ** quad): Return Render_to_propx ('done.html', {'Form_data': [form_cleaned_data form_list in form For example],}   

urls.py
  url (r '^ answer / (? P & lt; question_ id & gt; \ d + ), 'Quiz.views.answer_question', name = 'answer_question'),    

Comes for option Its the same concept for form fields as model zones. For model areas.

Unless you plan to add many options, you should not have just one table for it You can change your model:

  CHOICES = ( (1, 'one'), (2, 'two')) class (models.Model): option = model.tector field (option if you make it like above, then a  ModelForm  This will do what you expect and provide a drop down with the right options for the 

How to delete an excel worksheet programmatically VB.NET -


I tried to permanently remove a worksheet from the Excel workbook, though it is not working as expected ,

  CType (oWB1.Sheets ("ABC"), Excel.Worksheet). Delete ()   

What's wrong with this?

  oWB1. DisplayLetter = Wrong OWB 1 Sheet ("ABC"). Remove OWB1. Application DisplayLetter = True    

asp.net - Changing visibility of Log-out button from serverasp -


I am now building a site with users' database. If the session is present I would like to add the "Log-out" button to the menu. I thought after checking the session I would change the visibility property in CSS. How can i do it Thank you.

OK, about something like this:

javascript: < / P> PageMethods.IsSessionActive (Active, Onscue, On Error); Success on function (results) {if (result == "true") {// logic where logout button is set to be visible} other {// set hidden}}

C # server Side Web Method:

  [WebMethod] The public static string IsSessionActive (string is active) // // is active active // ​​active is active = active " ; "; The return is active; }    

actionscript 3 - AS3 how to set initial stage size -


How do I set the initial step size (height / width) if I use FlashDialView in pure AS3 Am using

You can right click on your project and go to the properties to set the dimensions there. Or you can keep the following in the declaration of your main category:

  [SWF (width = "1280", height = "800", background color = "# 000000", Frame rate = "30")) Public class main sprite is extracted {...}    

android - getting error "Can't read row# 0, col# 2 from CursorWindow. Make sure your Cursor is initialized correctly." -


I am developing an Android app. I am trying to display a user input, however when I do this If I try, I get the error message above. I do not know what I'm doing wrong here is a code that I use. Thank you.

  try {cursor cursor = glossary.getgeardatabase (). RawQuery ("select catgram fROM adresse_definition WHERE definition = '" + word [0] .toLowerCase (.) Trim () + "'", zero); // cursor cursor = glossary Database () RawQuery ("Select index_name_addresses" + word [0] .toolware () .trim () + Add definition from adresse_definition to adresse_definition.definition = "on definition.data_id", zero); // cursor cursor = glossary Database () Query ("adresse_definition", null, "index_nom_adresse = '" word [0] .toLowerCase (). Trim () + "' or definition = '" word [0] .tocharcas (.) Trim () + "'", Empty, null, empty, blank); Cursor.moveToFirst (); If (cursor .getcount ()! = 0) {if (word [1] == null || word [1] .equals ("english")) {translatedWord = cursor.getString (2); } And (translated word = cursor.gate string (1);}} Else {translatedWord = "word is not in database"}} Cursor.close ();} hold (SQLiteException sqle) {translatedWord = "word is not in database ";} Dictionary.close ();    

Check if you have all the words in your query Selecting the column that you are going to get from the cursor. Now you are just selecting one column and you can get two columns in the cursor .getString. Change the query to:

  Select * from table_name where ...    

post - why can't Codeigniterload Input class, and can't find the file either -


I'm trying to use the postigniters input class, to use the post method. Now, I tried to load it into the controller and the auto loader, but no luck! Error is occurring

  Unable to load the requested file: helpers / input_helper.php   

looking through my code and trying to find it After the input but for the IDE nothing could be found. I essentially

  $ this-> Input-> I want to use the post ('varname');   

Nothing crazy, is this file not included by coding by default? I have got the most recent release from Github a few days ago. If I say something stupid, please be very new to codeigniter, please forgive me an explanation will be greatly appreciated!

You do not need to load this assistant at all:

< P> Note: This class is automatically started by the system, so there is no need to do it manually.

Try removing your efforts to auto-load in the administrator or elsewhere, then try again and see if that works.

wpf - Resizing only open expanders -


I have 3 expansions in a window and I want to know that there is a way to do this so that I have an extension 2 And 3 are open but not 1, it will only spread to those 2 It is currently pulling the three together equally, and, when they are closed, the material is closed, but the column remains in the same width as it was open.

What is the best way to stretch them after expanding and after 10-pixtile wide sizes?

You can set triggers to column define < Fixed when setting to width to / code> when extension stops and when extension is open then set to proportionate .

Example:

  & lt; Grid & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; ColumnDefinition & gt; & Lt; ColumnDefinition.Style & gt; & Lt; Style TargetType = "ColumnDefinition" & gt; & Lt; Setter property = "width" value = "20" /> & Lt; Style.Triggers & gt; & Lt; Data Trigger Binding = "{Binding IE Expanded, ElementName = Explorer 1}" Value = "True" & gt; & Lt; Setter property = "width" value = "20 *" /> & Lt; / DataTrigger & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; /ColumnDefinition.Style> & Lt; / ColumnDefinition & gt; & Lt; ColumnDefinition & gt; & Lt; ColumnDefinition.Style & gt; & Lt; Style TargetType = "ColumnDefinition" & gt; & Lt; Setter property = "width" value = "20" /> & Lt; Style.Triggers & gt; & Lt; DataTrigring binding = "{binding ispended, element = explorer 2}" value = "true" & gt; & Lt; Setter property = "width" value = "20 *" /> & Lt; / DataTrigger & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; /ColumnDefinition.Style> & Lt; / ColumnDefinition & gt; & Lt; ColumnDefinition & gt; & Lt; ColumnDefinition.Style & gt; & Lt; Style TargetType = "ColumnDefinition" & gt; & Lt; Setter property = "width" value = "20" /> & Lt; Style.Triggers & gt; & Lt; DataTrigring Binding = "{Binding IE Expanded, Element Name = Expender 3}" Value = "True" & gt; & Lt; Setter property = "width" value = "20 *" /> & Lt; / DataTrigger & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; /ColumnDefinition.Style> & Lt; / ColumnDefinition & gt; & Lt; /Grid.ColumnDefinitions> & Lt; Expander Name = "Extension 1" Grid. Column = "0" header = "expander 1" /> & Lt; Expander Name = "Extender 2" Grid Column = "1" header = "expander 2" /> & Lt; Expander Name = "Extender 3" Grid Column = "2" header = "expander 3" /> & Lt; / Grid & gt;   

Result:

Enter image details here enter image details here

 Enter image details here  Enter image details here

javascript - blockui $.unblockUI() not working -


I am working on a very simple model using blockUI which pops up and asks if any user Whether or not a certain age. To avoid conflict, I always try to develop a piece of code in my page, and that's what I have done here. I have a simple HTML / Javascript page and it is not working as much as you want.

When the page loads, it comes right. However, when trying to unblock (even without using the button) it does nothing and it just sits with the loading icon.

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "jquery.blockUI.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {// A bit of work around. BlockUI tries to center based on // div. By adding block of html tag immediately, From ($ message: $ ('message'), centerX: true, centerY: true, CSS: {width: '600px', height: '300px', range: '3px solid # FF9900 ', background color:' # 000 ', color:' #fff ', padding:' 25px '}}) $ (' # over '). Click (function () {Warning (' clicked! ' ); $ Undocked ui (); return returned;}); $ (under '#'). Function () {$. UnblockUI (); return returned;});}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "message" style = "display: none;" & Gt; & Lt; Img src = "logo.png" range = "0" /> & Lt; Br / & gt; & Lt; H1>! Welcome & lt; / H1> You can not see this page until you are 21 or older. & Lt; Br / & gt; & Lt; Button id = "over" & gt; I'm 21 or more & lt; / Button & gt; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Lt; Button ID = "Down" & gt; 21 & lt; / Button & gt; & Lt; / Div & gt; It's dusty down here! I should be seen! & Lt; / Body & gt; & Lt; / Html & gt;   

There is no error in Chrome's console, I can not really get any reason so that it should not be closed.

When you call, $ UnblockUI () Try calling it on an element, e.g. $ ('html'). Unblock (); :

  & lt; Div class = "body" & gt; & Lt; Div id = "message" style = "display: none;" & Gt; & Lt; Img src = "logo.png" range = "0" /> & Lt; Br / & gt; & Lt; H1>! Welcome & lt; / H1> You can not see this page unless you're 21 or more & lt; Br / & gt; & Lt; Button id = "over" & gt; I have 21 or more & lt; / Button & gt; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Lt; Button ID = "Down" & gt; 21 & lt; / Button & gt; & Lt; / Div & gt; It's dusty down here! I should be seen! & Lt; / Div & gt;   

JS will be:

  $ ('body'). Block ({message: $ ('# message'), centerX: true, centerY: true, css: {width: '600px', height: '300px', range: '3px solid # FF9900', background color: '# 000 ', color:' #fff ', padding:' 25px '}}); Click $ ('# over') (function () {warning ('clicked!'); $ ('. Body'). Unblock (); Return;}); $ ('Under #') Click (function () {$ ('. Body'). Unblock (); return false;});   

See example:

Read more about element blocking here:

bash - How can I replace a word at a specific line in a file in unix -


I have searched for other questions here, but in reality there is no one working for me. I am trying to select a specific line and change that string with another string. So I have a file called my_course, which I'm trying to modify a row in "my_search" which starts with "123" on that line I want to change the string with "0", "1". Help

A possibility sed :

  Sed '/ ^ 123 / s / 0/1 /' my_course   
  • In the first /../ Specify the pattern that you are looking for ^ 123 for the line beginning with 123

  • You want:
    • Redirect the output using ...;

    • If you are using destructive version of the location, then you have given the original version when anything went wrong. Besides placing a copy with the extension, you will want to use -iEXTENSION .

      Edit: To match the desired lineup with a prefix stored in one variable, you will need to add the sed script with double quotes using a single code " ' will prevent variable extension:

        sed "/ ^ $ input / s / 0/1 /" my_course    

SSIS: Working package fails after upgrade to SQL Server 2012 -


I have an SSIS package that is running fine on SQL2008R2, which is pointing to the configuration file for the connection strings Using the environment variable is happening. Using VS2010 Shell, I have upgraded the package to our SQL Server 2012 database. Package package deployment model is still in the security level of the package set to DontSaveSensitive run 64 bittime = false . When I VS In my works I and executed to package, so I get the following error:

[OLE DB Destination [2]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER Connection Manager AcquireConnection method "DB_Connection" Call Error code 0xC0202009 failed with the acquisition method call call failed, with more information before that error message may be possible. ** , I see the first failure is:

Finally, [Computername] Office \ username, dB connections, {5AD75239- D546-4AAF-963E-E195FC2F0C1E}, {9EC48106-DDBD-40E9-8FBB-942BCF025EEE}, 03/26/2013 10:35:21 AM, 03/26/2013 10:35:21 AM, 0, (tAP), ExternalRequest_post: 'ITRansactionJoin :: Shamilpratibndn fail "has been completed external requests. **

Which is actually throwing me is that in the first package, the same "DB_Connection" manager is used successfully in executing several SQL tasks. Therefore, it seems that the connection strings are being read properly from the configuration.

I have tried to resume the connection manager I have verified that DTC is properly configured on both my local and server. I have another package attached to the same SQL 2012 db, using the same data flow function without problems, using the same configuration method.

Anybody can help who can point me in the right direction. I do not have to do this for carrying on the model project at this time if I do not have to.

I was able to get my package to run locally while I TransactionOption had to make to ensure that they were set to support , it turned out that one of my sequence containers must . Not sure why it works in SQL2008R2, but not in SQL2012 I changed my container to supported and the package now runs.

Redis compound commands or command piping -


Staying around for the past few days. Whether a compound command can be run like the following:

  MGT Zareng rank 0 1   

I have not received a definitive answer from the docs, or the test From:

  Redis 127.0.0.1:6379> ZRANGE rank 0 1 1) "One" 2) "Two" redis 127.0.0.1:6379> MGT One to 1) "1" 2) "2" radis 127.0.0.1:6379> MGET Zerange Rank 0 1 1) (zero) 2) (zero) 3) (zero) 4) (zero)    

Built in Radis, the LU scripting support should allow you to effectively archive commands together. See . Not exactly what you are looking for but maybe it will be enough.

A simple example:

  redis> Set foo bar is fine redis & gt; Set Bar Barrel OK & gt; Evil "returns redis.call ('get', redis.call ('get', 'foo'))" 0 "baz"    

javascript - jQuery Selectors and IFrames -


I would appreciate some help with the following:

There are three variants inside my three commandments In addition to clicking the button button in three general guardian pages, the form needs to be submitted in IFrames.

Iframes are dynamically instatuted in the original page via Javascript, but I do not think that really matters.

There are three splinted tags used to attract the iframes: div-1 div-2 div-3 is not id in any form. However, all three variations have the same name attribute "RDForm "Shares.

Will the selector be appointed to submit each form in an Okvak button event? Or is it more complicated than that?

If you have access to the frame:

  & lt; Input type = "button" class = "submit" data-iframe = "iframe_name_1" value = "submit" /> & Lt; Input type = "button" class = "submit" data-iframe = "iframe_name_2" value = "submit" /> & Lt; Script type = "text / javascript" & gt; $ (Function () {$ ('. Submit'). ('Click', function (e) {e.preventDefault (); var iframename = $ (this) .data ('iframe'); window.top [' Iframename ']. Document.rdForm.submit ();});}); & Lt; / Script & gt;    

android - Invalid layout param in a LinearLayout: layout_column -


I'm getting this warning, the program still creates and runs properly. I just want to know how to get rid of it. Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" ** Android: layout_column = "0" Android: layout_arrow = "Android: image =" id = "id = / myimage4" Android: layout_width = "wrap_content" "0" ** Android: src = "@drawable / ic_luncher" />

< P> Android: layout_column and android: layout_row are valid only in the tabular layout, and they are not present in any LinearLayout.If you are using a LinearLayout You do not need them, and should be safely deleted. The issuer.

Change to git as the push protocol for dotcloud -


I have an app that uses rsync to push. To use Git, I went to .dotcloud / config and

  "push_branch": null, "push_protocol": "rsync"   

However, now when I try to push

  "push_branch": "some_branch", "push_protocol": "git"   

I do:

  $ dotcloud push ==> Push the code with Git, Apply "./" from some "brochure" branch error to myapp: Unable to crop the goat   

What did I do? I could not find the docs to change the push protocol.

The correct way to use GIT protocol is

  such as DotCloud Connect --git AppName [--branch branchname]   

In that directory where dotcloud.yml stays.

http - read specific websourcecode in c# -


जब मैं एक बटन दबाता हूं, तो निम्न होता है:

  एचटीटीपी वेबबर्वर अनुरोध = (एचटीटीपी वेबबर्ब) WebRequest .Create ( "http://oldschool.runescape.com/slu"); HttpWebResponse प्रतिक्रिया = (HttpWebResponse) request.GetResponse (); स्ट्रीमरेडर sr = नया स्ट्रीमरेडर (प्रतिक्रिया। गेटरस्पॉन्सस्ट्रीम ()); RichTextBox1.Text = sr.ReadToEnd (); sr.Close ();   

संक्षेप में डेटा मेरे टेक्स्टबॉक्स में स्थानांतरित हो जाता है (यह पूरी तरह से काम करता है)

अब अगर मैं विश्व 78 चुनता हूं (उदाहरण के लिए, कंबोडिया से, यह उस पंक्ति के आखिरी अंक) मैं मान 968 प्राप्त करना चाहता हूं, यदि मैं 14 दुनिया का चुनाव करता हूं, तो मुझे 973 मूल्य मिलना है।

यह मुद्रित डेटा का एक उदाहरण है

  ई (378, सच, 0, "पुरानास्कूल 78", 968, "संयुक्त राज्य अमेरिका", "यूएस", "ओल्ड स्कूल 78"); ई (314, सच, 0, "बूढ़े स्कूल 14", 973, "संयुक्त राज्य अमेरिका", "यूएस", "ओल्ड स्कूल 14");   

मैं इसे पढ़ने के लिए क्या उपयोग कर सकता हूं?

इसलिए यहाँ दो समस्याएं हैं, सबसे पहले सही रेखा का चयन कर रहा है, फिर संख्या बाहर हो रही है

सबसे पहले आप प्रत्येक पंक्ति को सूची में प्राप्त करने के लिए एक विधि चाहते हैं, उदाहरण के लिए:

  सूची & lt; स्ट्रिंग & gt; लाइन = नई सूची & lt; स्ट्रिंग & gt; () स्ट्रिंग पंक्ति = sr.ReadLine (); जबकि (रेखा! = नल) {lines.Add (पंक्ति); लाइन = sr.ReadLine (); // अगले पंक्ति को पढ़ें}   

फिर आपको प्रासंगिक रेखा ढूंढनी होगी और इसे से टोकन प्राप्त करना होगा।

शायद सबसे आसान तरीका है, प्रत्येक के लिए

उदाहरण के लिए

उदाहरण के लिए,

  foreach (स्ट्रिंग लाइन इनफ़ाइल लाइनों में) {// स्ट्रिंग को टोकन स्ट्रिंग में विभाजित करें [] टोकन = लाइनइनफ़ाइल। नमूना (',', '\' ',' (',') '); // नमूना स्ट्रिंग के आधार पर और हमने इसे कैसे विभाजित किया है, // हम 15 वीं एंट्री स्ट्रिंग एंड पीरामेटर = टोकन लेते हैं [15]; // endParamter = "ओल्ड स्कूल 14" ...   

अब हम नंबर का उपयोग करने के लिए उपयोग करते हैं। हम जिस पद्धति का उपयोग करेंगे वह डी + है, अर्थात् 1 या अधिक अंक।

  रेगेक्स नंबरफेंडर = नया रेगेक्स ("\\ d +"); मैच संख्या मैच = नंबरफाइंडर। मैच (एंडपैमेटर); // हम मानते हैं कि एक मैच है, क्योंकि अगर कोई स्ट्रिंग नहीं है / सही नहीं है, तो आपको कुछ त्रुटि संभाल यहाँ स्ट्रिंग मिलान करना चाहिए संख्या = numberMatch.Value; Int मान = Int32.Parse (मिलान वैल्यू); // हम स्ट्रिंग को संख्या में परिवर्तित कर देते हैं यदि (मान == वांछित व्हल्यू) ...   

हम जांचते हैं कि मान उस मान से मेल खाता है जो हम देख रहे थे (जैसे 14), अब हम आपको वह संख्या प्राप्त करने की आवश्यकता है जिसे आप चाहते थे।

हमने पहले से ही पैरामीटर विभाजित किए हैं, और जो संख्या हम चाहते हैं वह 8 वीं वस्तु है (जैसे स्ट्रिंग [] टोकन में सूचकांक 7)। चूंकि, कम से कम आपके उदाहरण में, यह सिर्फ एक अकेला संख्या है, हम इसे प्राप्त करने के लिए केवल पार्स कर सकते हैं।

  {वापस IN32.Parse (टोकन [7]); }}   

फिर हम यह मान रहे हैं कि स्ट्रिंग आपके द्वारा दिखाए गए स्वरूपों में है, और आपको यहां त्रुटि सुरक्षा करना चाहिए

asp.net - Finding Controls in an Update Panel -


I have seen some threads on it. If I have a control in an updated panel when the page is loaded, then I can easily get it from the following code:

  Label lbls = (Label) upPreview.FindControl (lbl. ID); Lbls.Text = lbl.id;   

I can not do the following on two different buttons with two different update panels

button 1:

  Labeled lbl = new label (); Lbl.Text = "Something"; Lbl.ID = "Something"; UpPreview.ContentTemplateContainer.Controls.Add (LbL);   

button 2

  labeled lbls = (label) upPreview.FindControl (lbl.id); Lbls.Text = lbl.id; UpForm.ContentTemplateContainer.Controls.Add (lbls);   

Essentially I am creating a label and putting it in an update panel, then clicking on the second button I'm taking it to another update panel. Every time I try this, then it says: Price can not be zero. Parameter Name: Toddler

I also have ControlCollection cbb = upPreview.ContentTemplateContainer.Controls;

The same error has been tried. Any ideas?

Your label lbl is lost during partial postback button s you can use viewstate to protect it during a postback.

Add a single label above your page_load and instantize it to clear it.

  Safe label Lbl = null; Secure Zero Page_load (object sender, eventAgps E) {if (! IsPostBack) // First load of page or reload {lbl = new label (); Lbl.Text = "Something"; Lbl.ID = "Something"; UpPreview.ContentTemplateContainer.Controls.Add (LbL); } See Else {// LLL which is stored in the visual position, if (seestate ["label"]! = Null) lbl = (label) viewstrate ["label"]; Else lbl = null; }}   

Then in your buttonclick events:

  Secure zero button 1_kill (object sender, eventAgps E) {// LLL in ViewState before proceeding Save. ViewState ["label"] = LLL; } Secure Zero Button2_Click (Object Sender, EventArgs e) {if (lbl! = Null) {// Behind the LLL with visual state, and add it to another update panel upForm.ContentTemplateContainer.Controls.Add (lbl); } And {lbl = new label (); LLL Text = "Error: The label was empty in the viewstate."; }}   

This way you keep track of it during the post-back.

c# - Is it possible to format DB content (as string) before comparison with where clause -


I want to be able to pick a url-formatted string (like united-kingdom ) I am ) And use it in a WHERE section against that country's column, which is not formatted like this (e.g. United Kingdom ).

Ideally, I do something like this:

  db.Jobs. Where (j = & gt; j.ountry.MyStringFormattingExtension () == urlformattedstring);   

I understand that this is none because AF will attempt to launch and execute SQL applications. It gives me: "The method for LINQ does not recognize the method 'system string string mystream formatting extension (system.string)', and this method can not be translated into store expression."

It has been suggested that I return the query as a number before implementing this question, although I think that it is very inefficient - before all the rows from DB before filtering Is returning.

You can define a user defined function and import that is in your database more Read the description for

  // Create the SQL function dbo.ToFormattedString ... // C # Public Fixed Class EntityFunctions {[EdmFunction ("dbo", "ToFormattedString")) Public Stabilized String ToFormattedString (this string input) {New NotSupportedException ("direct call is not supported"); }} Var result = db.Jobs.Where (j = & gt; j.ountry.ToFormattedString () == urlFormattedString);   

Alternatively, you can create a view in your database that satisfies the string you want to format, so include it in your linux query . See

  // Create SQL in dbo.vFormattedJobs AS ... // in C # Viral result = (jb in db.vFormattedJobs where j.FormattedCountry == urlFormattedString selection j);    

javascript - How do I properly encapsulate a socket.io socket? -


This code is running in my node. JS server application:

  io.sockets . ('Connection', function (socket) {var c = new client (socket, tools. GenerateID); are waiting; Push (c); allClients.push (c); if (waitingClients.length == = 2) {ActiveGames.push (New game ([waitingClients.pop ()), pst ()]))))}}}); Function client (socket, id) {this.Socket = socket; This.ID = ID; this. Player = new player (); This.Update = function {socket.emit ('update', {actions: this.Player.Actions, buys: this.Player.Buys, Coins: this.Player.Coins, Hand: this.Player.Hand , Step: this.Player.Phase, Supply: Supply}}}} Socket.on ('play', function (data) {console.log (data); console.log (this.Player);}); Socket Emit ('id', id);}   

The part I am having trouble with is the event handler for the 'play' event. I console.log (this. Player) Output Undefined . I think why this is wrong, because 'this' is my client object (socket? Anonymous function?) Refers to the thing, but I do not know how to rearrange the code to handle play events properly, and there is full access to the members of the client object.

You just this inside client .

  function client (socket, id) {var self = this; ... socket.one ('play', function (data) {self.Player.play ();});    

Google Sheets - Script to delete date expired rows -


I am trying to get a script that automatically rows with the old date of 3 days (within 4 days)

I found this script, which I was hoping to optimize ... Function DeleteOldEntries () {

  var ss = SpreadsheetApp.getActiveSpreadsheet () ; Give your sheet name instead of // Sheet1 var sheet = ss.getSheetByName ("Foglio1"); Var Datenz = Sheet.GetData Range (); Var lastrow = datarange.getLastRow (); Var currentDate = new date (); Var oneweekago = New Date (); Oneweekago.setDate (currentDate.getDate () - 7); For (i = last; i> = 2; i--) {var tempdate = sheet.getRange (i, 1) .getValue (); If (tempdate & lt; oneweekago) {sheet.deleteRow (i); }}}   

But there seems to be an error in the script that I have to figure it out before adjusting for 4 days instead of 7 (this part is easy)

My sheet has 3 columns with the date of column C, if this information is useful

"Date in column C, if that information is useful"

It really is! Rather than trying to get a date in column A, it is done in this line:

  var tempdate = sheet.getRange (i, 1) .getValue ();   

You should see the value in column C as:

  var tempdate = sheet.getRange (i, 3) .getValue ();   

To be more efficient, you should compare these at the array level, look at it as below and it will be very fast ...

  Var ss = Spreadsheet App.getActiveSpreadsheet (); Var letter = ss.getSheetByName ("Foglio1"); Var Datenz = Sheet.GetData Range (); Var lastrow = datarange.getLastRow (); Var values ​​= datarange.getValues ​​(); // Get all the data in a 2D array var data currentDate = new date (); Var oneweekago = New Date (); Oneweekago.setDate (currentDate.getDate () - 7); For (i = last; i> = 2; i--) {var tempdate = value [i-1] [2]; // arrays 0 are indexed then line1 = value [0] and col3 = [2] if (tempdate & lt; oneweekago) {sheet.deleteRow (i); }}}    

java - Liferay - portlet title reloading -


The settings are kept in the hsql script, I think, right?).

  1. I select the language option;
  2. After some action, I hope the replacement of the portal title depends on the language version but it does not work; Changes appear after the page is reloaded once;

    I have tried to implement the Strutsortort class and set dynamically (Resenders Response) sitel, it is not working as well. Changes appear after reloading the page once. Why are not changes visible immediately? I have read () that the " setTitle method is defined only in the RenderResponse interface, you can only change the portrait title in request processing phase render . What does it mean? Any Suggestions?

    You should use the resource bundle for the localization of the Portlet title.

    portlet.xml & lt; portlet & gt; Portlet-name & gt; test portlet & lt; / portlet- name & Gt; ... & lt; resource-bundle & gt; Greterest-Portlet & lt; / ResourceBundle & gt; ... & lt; / portlet & gt;

    test-portlet.properties

    test-portlet_sk.properties

      javax Portlet.title = Testovaci Portlet    

Language C formatted string without printf -


यही है जो मुझे चाहिए:

  char * getHour () {वापसी ("% D:% d:% d ", घंटा, मिनट, सेकंड); }   

इस तरह से एक स्ट्रिंग लौटें "hh: mm: ss" मैं यह कैसे कर सकता हूँ?

मैं आपको यह करने का एक अच्छा कारण बताऊंगा। यहां कोड है जिसे आप ढूंढ रहे हैं:

  चार * getHourMinuteSecond (इंट घंटा, इंट मिनट, इंट सेकेंड) {जोर (घंटा & gt; = 0 & amp; घंटे & lt; 24); जोर (मिनट & gt; = 0 & amp; amp; मिनट & amp; amp; मिनट & lt; 60); जोर देना (दूसरा & gt; = 0 & amp; amp; सेकंड & lt; = 60); // छलांग सेकंड ... शायद चार * आउटपुट = (चार *) मॉलोक (9 * आकार (चार)); अगर (आउटपुट == नल) {वापसी नल; } आउटपुट [0] = (चार) ((घंटा / 10) + '0'); आउटपुट [1] = (चार) ((घंटा% 10) + '0'); आउटपुट [2] = ':'; आउटपुट [3] = (चार) ((मिनट / 10) + '0'); आउटपुट [4] = (चार) ((मिनट% 10) + '0'); आउटपुट [5] = ':'; आउटपुट [6] = (चार) ((दूसरा / 10) + '0'); आउटपुट [7] = (चार) ((दूसरा% 10) + '0'); आउटपुट [8] = '\ 0'; वापसी आउटपुट; }   

अब एक छोटे से saner कुछ करने के लिए प्रतिबंध आराम देता है। हम snprintf का उपयोग कर सकते हैं: <पूर्व> चार * getHourMinuteSecond (इंट घंटे, इंट मिनट, इंट सेक) {जोर (घंटे> gt; = 0 & amp; hour & lt; 24); जोर (मिनट & gt; = 0 & amp; amp; मिनट & amp; amp; मिनट & lt; 60); जोर देना (दूसरा & gt; = 0 & amp; amp; सेकंड & lt; = 60); // छलांग सेकंड ... शायद चार * आउटपुट = (चार *) मॉलोक (9 * आकार (चार)); अगर (आउटपुट == नल) {वापसी नल; } Snprintf (आउटपुट, 9, "% 02d:% 02d:% 02d", घंटा, मिनट, सेकंड); वापसी आउटपुट; }

अब भी saner प्राप्त करें, और एक पैरामीटर के माध्यम से समारोह वापसी है (ताकि हमें malloc के साथ खेलने की आवश्यकता नहीं है): <पूर्व> शून्य getHourMinuteSecond (चार लक्ष्य [9], int घंटे, int मिनट, int सेकंड) {जोर (लक्ष्य! = नल); जोर (घंटा & gt; = 0 & amp; amp; घंटे & amp; amp; घंटे; 24;); जोर (मिनट & gt; = 0 & amp; amp; मिनट & amp; amp; मिनट & lt; 60); जोर देना (दूसरा & gt; = 0 & amp; amp; सेकंड & lt; = 60); // छलांग सेकंड ... शायद snprintf (लक्ष्य, 9, "% 02d:% 02d:% 02d", घंटा, मिनट, सेकंड); }

रुको, उस अंतिम फ़ंक्शन में ज्यादातर त्रुटि जांच थी हम फिर से मूर्खता प्राप्त कर सकते हैं और एक #define :

  #define getHourMinuteSecond (tgt, h, m, s) snprintf (tgt, 9, "% 02d: अंत में, अपने मूल कोड में, आप  hour ,  मिनट नहीं लेते ,  minute   

/ Code> या दूसरे पैरामीटर के रूप में, तो क्या आप उन्हें निर्धारित करने के लिए फ़ंक्शन चाहते हैं?

  शून्य getHourMinuteSecond (चार लक्ष्य [9]) {assert (target! शून्य ); Const time_t अब = समय (0); Const tm * const tmnow = स्थानीय समय (और अब); Snprintf (लक्ष्य, 9, "% 02d:% 02d:% 02d", tmnow-> gt; tm_hour, tmnow- & gt; tm_min, tmnow- & gt; tm_sec); }    

java - Android EditText in a ListView - Erratic / Unexpected results -


I'm working on a client / server application to a few months, for the final year project of my undergraduate degree , I am currently working on a ListView, which should show a list of products and the user will be allowed to enter the value representing the amount of that item in the stock. I took a good look at the scene and adapter but editing text I caused issues, I have spent many hours to answer and pressed stack overflow for similar problems, but I have found either The issue is not implemented or the issue is not resolved.

I almost am definitely a Risaiclr issue but root of the problem seems to indicate to me that the value entered in the edit text to be placed in several positions in my Hampap, not just one, And scrolling through the list causes most of all to happen, if not all the scenes are to show the same value! Here's my adapter class and I'm happy to provide any other code that helps you, thank you in advance.

  Public class StockAdapter ArrayAdapter and lt; Stock & gt; {Private Layouts Inflator MLoot Infolator; Reference Reference; Int LayoutsreshsID; Stock data [] = null; Maps & lt; Integer, string & gt; Stockhashmap = new hashmop & lt; Integer, string & gt; (); Public stock adapters (reference references, int layasourceosource id, stock [] data) {super (references, layoutsresource id, data); MLayoutInflater = LayoutInflator From (context); This.context = context; This.layoutResourceId = layoutResourceId; This.data = data; } @Override Public View getView (last integer status, see convertView, ViewGroup parent) {Stockholder Holder = Null; If (convertView == empty) {convertView = mLayoutInflater.inflate (layoutResourceId, null); // Institution Stockholder Object Holder = New Stockholder (); // thoughts holder.txtName = (TextView) go to convertView.findViewById (R.id.stockName); Holder.etValue = (EditText) convertView.findViewById (R.id.etValue); ConvertView.setTag (holder); } And {holder = (Stockholder) ConvertView .getTag (); } // Get stock objects from the data set. Stock stock = data [status]; Holder.txtName.setText (stock.Name); // Keep the Stock ID in a variable - The last IID = Share is used to refer to the correct stock item. Id; String old text = stockhashmap.it; // Check whether the value of the old text is zero holder. Text (old text == empty? "": Old text); // Create the EditText addTextChangedListener (New TextWatcher (for holder.etValue.addTextChangedListener) {public void afterTextChanged (editable editable) {stockHashMap.put (ID, editable.toString ());} public void beforeTextChanged (CharSequence s, start int, int count, after rounding) {// TODO auto-generated method stub} public void onTextChanged (CharSequence s, int start, before int, int count) {// TODO auto-generated method stub}}); Return Convertview; } Fixed class stockholder {int id; TextView txtName; EditText at Value; }}   

Answer: Matt C. Answer:. The following but no better

  @Override public integer getCount () {if (data == null added) return 0; Return data Length; } @ Override public stock holidays (status of int) {return data [status]; }    

I if personally found I do not override function in an adapter I get all kinds of strange unexplained issues In your case, I think I will do a redundancy check and then return the size of the stock [] named "data". I can not guarantee that this will fix your problem, but for me in these cases, always "OK" you can also override for perfection.

php - Resize uploaded picture -


  यदि (move_uploaded_file ($ file_Tmp, "product_images / nl.$ File_Name)) {// अपलोड करने के लिए नाम बदलें फ़ाइल $ Random = rand () * 1200; $ File_New_Name = $ यादृच्छिक। "। $ $ $ File_Extension; नाम बदलने ( "product_images /".$ FILE_NAME," product_images /".$ File_New_Name); }   

अब मुझे अपलोड की गई छवि एक कस्टम परिभाषित आकार होने चाहिए। कृपया मुझे मुझे यह कैसे काम करता है पर एक स्पष्टीकरण के साथ कोड लिखने में मदद करें ... धन्यवाद ... PHP केवल कोड कृपया।

मैंने जेरोड द्वारा इस ट्यूटोरियल का पालन किया है, और अच्छे परिणाम प्राप्त किए हैं I इसमें इनपुट छवि प्रकार के लिए पकड़ने में त्रुटि शामिल है।



SQL query - mod function - how can I use it to group results? -


If I'm a simple question, then I am very new to apologizing. Note that this question is related to Microsoft queries as I am pulling results through a report.

I currently have a table with a number of columns, including an integer value between 1 and 6 columns. I am trying to group on this pillar whether the value in the column is either odd or odd but only to make sure that it is given a bit of background as my information (the reason that I want it) How to not: The table I am using is related to the tailsheet entries with the shift column, I consider it strange for day shift and also for night shifts). If anyone can help it would be very good at present, I have the following code:

  SELECT PRTH.PostDate, HRRM.LastName, Acararm. First name, sum (PRTH.Hours) AS 'Sum of Hours', (PRTH.Shift Mod 2) as 'Night Shift' Viewpoint.dbo.HRRM from HRRM, Viewpoint.dbo.PRTH PRTH where PRTH.Employee = HRRM the .PREmp and PRTH.JCCo = HRRM.PRCo group by PRTH.PostDate, HRRM.LastName, HRRM.FirstName, Night shift   

mode function that I Along with as I'm not sure how to define it, I'm having trouble and still how to use this group in the ceremony.

Thank you in advance

Text after "

It looks like you 're again Viewing -% 2, using a% 2

  Select a% 2, zodiac (B) from your broken group:   

< / p>

to apply it to your query, try this: