Wednesday, 15 April 2015

SQLite Android after clicking on insert button it crashes(insert button meant for creating and inserting table and table value) -


कोड:

  सार्वजनिक वर्ग डेटाबेस ओपनहेल्पर SQLiteOpenHelper {सार्वजनिक स्ट्रिंग str = null; सार्वजनिक स्थिर अंतिम स्ट्रिंग TABLE_SPEECH = "लेंपेच"; सार्वजनिक स्थिर अंतिम स्ट्रिंग COLUMN_ID = "id"; सार्वजनिक स्थिर अंतिम स्ट्रिंग SPEECH_TEXT = "भाषण"; निजी स्थिर अंतिम स्ट्रिंग DATABASE_NAME = "speechtext.db"; निजी स्थिर अंतिम अंत DATABASE_VERSION = 1; निजी SQLite डेटाबेस डेटाबेस; निजी डेटाबेस ओपनहेल्पर डीबीएचलपर; निजी स्थिर अंतिम स्ट्रिंग TABLE_CREATE = "टैब बनाएँ" + TABLE_SPEECH + "(" + COLUMN_ID + "INTEGER," + SPEECH_TEXT + "TEXT);"; DatabaseOpenHelper (संदर्भ संदर्भ) {सुपर (संदर्भ, DATABASE_NAME, रिक्त, DATABASE_VERSION); } @ ओवरराइड पब्लिक व्हाइड ऑन क्रैक (SQLiteDatabase db) {db.execSQL (TABLE_CREATE); लॉग। V ("मुख्य गतिविधि", "निर्माण के बाद"); } @ ओवरराइड सार्वजनिक शून्य पर अपग्रेड (SQLiteDatabase डीबी, इंट पुरानावर्सन, इंट न्यूवर्सन) {// पुरानी तालिका ड्रॉप यदि डीबी.एक्सएक्सएसक्यूएल ("ड्रॉप तालिका में मौजूद है" + टैबिल_SPEECH); // बनाने के लिए टेबल पर फिर से बनाएं (डीबी); } सार्वजनिक शून्य खुला () फेंकता है SQLException {database = dbHelper.getWritableDatabase (); } सार्वजनिक शून्य बंद () {database.close (); } सार्वजनिक शून्य सम्मिलन (स्ट्रिंग भाईपास) {ContentValues ​​cv = नया सामग्री मूल्य (); सीवी.पुट (COLUMN_ID, 1); cv.put (SPEECH_TEXT, getpass); // खुला(); Database.insert (TABLE_SPEECH, रिक्त, सीवी); // बंद करे(); } सार्वजनिक स्ट्रिंग रीडमी () {SQLiteDatabase डीबी = this.getReadableDatabase (); कर्सर कर्सर = db.rawQuery ("चुनें" + SPEECH_TEXT + "FROM" + TABLE_SPEECH, रिक्त); If (cursor.moveToFirst ()) {str = cursor.getString (cursor.getColumnIndex (SPEECH_TEXT)); } वापसी str; }}   

और टेबल और तालिका मूल्यों को जोड़ने और बनाने के लिए एक बटन (हाँ) के लिए मुख्य सक्रियता में: इस ऐप के क्रैश होने पर क्लिक करने के बाद।

  हाँ SetOnClickListener (नया View.OnClickListener () {public void onClick (देखें दृश्य) {try {makeTable ()}} पकड़ (SQLiteException से) {Log.e (getClass ()। GetSimpleName (), "डेटाबेस बना या खोल नहीं सकते ");}}});   

यह तब कहा जाता है जब उपयोगकर्ता हां बटन पर क्लिक करता है और डेटा को डाला जाता है और क्रेट () को कॉल किया जाना चाहिए, लेकिन तब यह क्रैश हो जाता है क्योंकि मैं हां पर क्लिक नहीं करता हूं। < Pre> सार्वजनिक शून्य createTable () {DatabaseOpenHelper dbhelper = new DatabaseOpenHelper (getBaseContext ()); dbhelper.getWritableDatabase (); dbhelper.insert (पास); स्ट्रिंग ए = डीबेलर। रीड (); TextView पढ़ता है = (TextView) findViewById (R.id.textView2); reads.setText (क); } "CreateTable" विधि में आप "डेटाबेस" चर को सेट नहीं कर रहे हैं, तो

कि आप अपने डालने में उपयोग कर रहे हैं, इसलिए यह शून्य है। अपने स्टैकट्र्रेस की जांच करें और देखें कि क्या त्रुटि सम्मिलन () विधि में है।

CreateTable () में परिवर्तन:

  dbhelper.getWritableDatabase ();   

से

  dbhelper.open ();    

javascript - Inserting object literal into array -


I do not understand why the wedding method is not working for me I have an array that looks : (It really is big but I did not want to dislodge the page)

php - mysql : using like return duplicate row count -


मेरे पास नीचे एक मुद्दा है

table1

पहला मामला: < / P>

  पोस्टकोड LS1 1LS   

दूसरा मामला:

  पोस्टकोड LS11LS   

table2

  पोस्टकोड | क्षेत्र एलएस 1 | लीड्स एलएस 11 | लीड्स   

और मैं क्षेत्र से संबंधित पोस्टकोड

  SELECT table2.region को 'क्षेत्र' के रूप में गणना करने के लिए नीचे की क्वेरी का उपयोग कर रहा हूं, COUNT (table2.postcode ) तालिका 1 से 'गिनती' के रूप में तालिका 2 पर तालिका 2 में शामिल करें। कनॉट (जैसे तालिका 2.postcode, '%') 1) जहां तालिका 1.postcode & gt; 'ग्रुप बाय क्षेत्र   

लागू करने पर कि तालिका 1 पहले के मामले में मुझे मिल

  लीड्स | 1   

तालिका 1 दूसरे मामले पर इसे लागू करने पर मुझे

  लीड्स | 2   

इस पोस्टकोड / इसी तरह के पोस्टकोड पर किसी कारण के लिए जहां दूसरे आधे भाग पहले भाग की तरह ठीक हैं और इसमें आंतरिक अंतर के बीच कोई रिक्त स्थान नहीं है, 2 के रूप में गिनती देता है। <पी>

यदि आप LS1 1LS और LS11LS के साथ तालिका एक में दो प्रविष्टियां हैं, आपका इन दोनों में से मेल होगा, आपको 2 की गिनती देगी।

c++ - Proper method to increment a void* by type size because cast results in temporary, not lvalue -


To upgrade under the modern Xcode 4.x compilers, I have found the following to upgrade the old C ++ code, I have found That the original developer was a programming idiom that used to be avoided but it should be avoided - it is now an error:

  * ((USACHR * PVPxL) ++ = UGG; // Copy Red & amp; Green color (2 bytes)   

I was looking at what was intended: to know how to copy unsigned short (urg) by zero pointer (pvPixel), then by the proper size Increasingly told (in case above, 2 bytes) the problem is that pvPixel casting is in a temporary, not a realway, which is no longer allowed.

The original developer used this idiom in many places - which I would like to rewrite in a short time though, rather than rewriting each context instead of brutal force, providing a beautiful and corrective solution will be good. I can think of several possible options for rewriting the cruel force of each incident: macros, inline functions, maybe a template? My question is: Is there a C ++ syntax / language solution for this problem? What is an approach that would produce clear code for future developers

(two examples work, below):

  zero PrimSurfaceGDI3 :: mFillHLine (uint uRGB, uint UX, UINT UI, UINT UW (LPVOID PVPCell; if (UW> 0) {// surface pvPixel = mPtr (uX, uY) receives an indicator for a specified pixel; USHORT uRG = * (USHORT *) And URBB; BYTE uB = ((BYTE *) and URGB) [2]; LPVOD PVID = (byte *) PVPxL + UW * 3; while (pvPi Xel & lt; pvEnd) {// The two lines are now invalid in modern compilers because casting pvPixel is USHORT * or byte * is a temporary, not the result in lvalue * (USHORT *) pvPixel) ++ = urg; // Copy red & green (2 bytes) * ((BYTE *) pvPixel) ++ = uB; // Copy blue (1 byte)}}   

and below, The requirement for this idiom loop is used in the statement:

  Zero PrimSurfaceGDI3 :: Mphil Veline (UINT URGB, UINT UX, UINT UI, UINT UH) {LPVOA D Pivipiksel = Mpitiar (UX, Uway); USHORT uRG = * (USHORT *) and URBB; BYTE uB = ((byte *) and urgb) [2]; LPVOD PVID = (Byte *) PVPx + UH * MUSCAN; // Required statement is now illegal in modern compilers because casting for a byte is a temporary for pvPixel *, not the result in lvalue (; pvPixel & lt; pvEnd, (byte *) pvPixel) = = muscan) (USHORT *) PvPixel = uRG; // Copy Red & amp; Green (2 bytes) ((byte *) PVPxL) [2] = UB; // Copy blue (1 byte)}}    

To resolve this problem To re-do things again, replace mPtr , then it gives an indicator (or container reference) three byte types in which it has three fields, and then fill it with std: : Use fill_n to input RGB

  Zero PrimSurfaceGDI3 :: mFillHLine (uint uRGB, uint UX, uint UY, uint UW: Then the function is something like this (which is none of your compiler To apply proper customization A shrinking provides a great opportunity)) {if (UW & gt; 0) {color circular Pivipiksl * = Mpitiar (UX, Uway); Std :: fill_n (pvPixel, UW, Color (urgb)); Next} Note that the original "optimization" is likely to cause de-optimization due to all incorrect allocation of two-byte access to the program.   

If you want to make as little as possible changes to the code, then you acknowledge that this code will not work on any architecture other than x86 (due to incorrect alliance access), and you -fno-strict-aliasing (which may be necessary due to casting an unrelated type), then you might have come across a reference: reinterpret_cast :

  * (reinterpret_cast & lt; unsigned short * & amp; (pvPixel)) ++ = uRG;    

c++ - How can I make a Stata plugin not depend on the order of variables? -


I am writing a plugin for Stata in C ++, and it seems to me that the variable Depending on the sequence of the form, in the form of SF_vdata () , only variables takes integer arguments in the index.

At this time I have the best solution, first store macro with all variable names, and then call your plugin. My plugin can then search the macro of that variable, which she is interested in, and the index takes the base in its position in the list.

This works, but I would like that my plugin is not dependent on the fixed state, the commands are being run first. I know this is silly because the plug-in is required to format the dataset in a specific way, but something seems wrong about calling ds and calling to my plugin Archives the macro before doing it.

Is there no way to access the order of variable names from inside the plug-in if ds is not called first?

I agree with Nick Unfortunately your macro solution is the only answer, and that's what I do . You can only access data using the SF_Data functions directly as "matrix", and all you get by default, there is no header in the table. I use macros to save all data information and pass all the datasets, I'm just reading variables like you, just like you, and have written the translators to maintain the format settings, but so far Value labels are not used.

Xcode c++ function list -


I want to see a list of all the functions defined in the current file in XCode, such as Tag Catalog plugin in VIM. I'm not familiar with Xcode, is it possible to do it in Xcode? Thank you.

You can see that information in the "Jump Bar" at the top of the window.

Whenever you have the file open, you should see a thin stripe over the file editor / viewer, in which the name of your project and the path you have to open the file. When you are in any .m or .h file, then the last thing in that time is in your cursor if it is one.

If you click on it, you will scroll the window by clicking on a list of all the methods of that file and one of them.

Here's an example of an old project:

This jump bar is the path to your file and allows you to select other files:

topbar

If you click on the current method then it will be used in your current file Is the list of:

method list

apache - Running Multiple Versions of Passenger for Multiple Ruby-on-Rails Applications -


After installing the passenger API 2 module, it likes me something like this:

 < Code> LoadModule passenger_module /home/passenger/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.17/ext/apache2/mod_passenger.so Passenger Route / Home / Tracer /. RVM / Games / Ruby-1.9.2-P290 / Gemstones / Passenger -3.0.17 Passenger / Home / Tracer / RVM / Weeper / RB-19.2.2-P29 / RUB   

(Sorry, I have a user account that is not passenger . .)

So if I want to use the second version of Ruby which completely uses a different version of Ruby, I believe that it will be something similar with the above configuration But with a different Ruby version, for example:

  LoadModel passenger_model / Chrome / Trasr /. RVM / Games / Ruby-1.9.3-P194 / Games / Penger-3.0.17 / Aust / 2 Escrow 2 /mod_passenger.so Passenger Rats / Home / Tracer / R.V.M. / Games / Ruby-1.9.3-P194 / Games / Penger-3.0.17 Passenger / Home / Tracer / So how can I configure Apache2 (I am not asking for virtual host part)? Because there are two versions of  LoadModule passenger_module  I do not think an Apache 2 server can load two different versions of the  passenger / module , okay?  

I am very confused please help me

Passenger version 4.0.0 supports many Ruby interpreters. The PassengerRuby config option has been made a per-virtual host option, so that you can customize your Ruby interpreter on a per-application basis.

For Passenger 3 you will have to use behind the scenes.

c# - how to refresh my page when returning a view -


After redirecting to the page, I am redirecting to a page. However, I can actually see these changes only after reloading the whole page.

I am redirecting to this page this way:

  public action details statement (string id) {return see (function (id)); }   

Is there something that I can add to my parameter which can refresh the page?

OK This is a common mistake that people make to deal with ASP.Net MVC. You want to redirect properly, instead you do not want to return View .

  Public Action Detail Description (String ID) {// Actual Redirect Redirect Redirection Tiection ("Function", new {id}); }   

This will ensure that your controller performs a real redirect, and not only displays the view. It also ensures your routes / URLs. Hope this helps :)

connect - sharepoint list wont refresh properly -


Hello, I'm having trouble with the SharePoint list, I've got a list associated with a visit, and when I am On-premise, this fast update, I mean that I change the list, click refresh in the Visio app and it has been updated, but on Visio Web Access from SharePoint, it takes a very long time, I press fresh I can, but its choice is a timer, it updates every 2 or 3 minutes, every change i Do yet. The problem is that I need to be quick, sometimes it happens immediately because I change the list to freshly when it has to be refreshed.

Do I have any configuration for that server that updates fast? English is not my native language, so I'm sorry

If you want your changes to show up instantly You can set minimum cache age to zero in SharePoint:

Note that the default value (few minutes) is better in the multiuser scenario Provides rendering performance.

Also note that this seating is not available in SharePoint Online / Office 365 (please correct me if I am wrong).

jsf - Keep url parameters after clicking -


I have a page that takes ID as a URL parameter and uses it to get an object And displays data about it. On this page we got a model that contains the file upload component, so we can not use to save AJAX. Instead, we do this:

  & lt; Rich: modalPanel domElementAttachment = "parent" id = "profilePanel" style class = "popup" resizeable = "false" moveable = "false" autosized = "true" Zindex = "200" top = "-10" & gt; & Lt; A4j: form enctype = "multipart / form-data" id = "profilePanelFormId" & gt; & Lt; Q: Box Title = "Edit Advocacy Profile" width = "width6x" wantFocus = "true" & gt; & Lt; S: div id = "profilePanelForm" & gt; & Lt; Rich: Messages provided = "# {messagesUtil.errorsExist}" /> & Lt; A4j: viewId = "/ panel / advocacy / advocateprofileEdit.xhtml" /> Include & lt; / S: div & gt; & Lt; H: Command button icon = "Cancel" instant = "true" value = "cancel" action = "# {advocateManager.cancelEditCommitment}" styleClass = "cancel button" tabindex = "100" /> & Lt; H: command button id = "save" value = "save" action = "# {advocateManager.saveCommitment}" styleClass = "submit" tabindex = "101" /> & Lt; / Q: box & gt; & Lt; / A4j: form & gt; & Lt; / Rich: modalPanel & gt;   

We populate parameters in such pages as:

  & lt; Page view-id = "/ advocacy / advocateCommitmentView.xhtml" login-required = "true" & gt; & Lt; Param name = "confirmationCode" value = "# {advocateManager.commitmentId}" /> & Lt; / Page & gt;   

So far, the problem we are running is when a user is rewritten without the required ID parameter to cancel the click or URL. If the user again refreshes the page, then it throws errors because it does not have this key. Does anyone know how I can call my save method without having to use AJAX and then keep the URL parameter Or can I block the call and add the parameter back?

The at the end of the maintenance string? IncludeViewParams = true / P>

Where can I find a PHP/MySQL implementation of Charles Miller's "Persistent Login Cookie" solution? -


I have recommended time and again Charles Miller to be the perfect best Method "remember me" functionality on a site (if you really want actually that feature is what I need).

However, I have scratch on the web and I can not find the real PHP / MySQL code implementing your solution, and use "Remember Me" In relation to "security" about an gazillion was emphasized about time, I'm scared to scare myself to scare it that I will misunderstand something or make a mistake As a result, massive security holes Oga.

Since their solution is approximately 10 years old and if it happens that permanent login cookies, there are definitely some vetted PHP / MySQL code that can be correctly installed without any unexpected security hole Follows the solution. (The closest thing was that I had a Drupal module, but I do not use droplets.)

Does anyone know where I can find it? After reading a question on Stack Overflow I, writing a PHP / MySQL implementation of Charles Miller's SAP, Have been motivated to help? ??? Continuous Login Cookie Best Practices ??? For this tutorial, I believe that you can already get a PHP system with user login. user code of user (user_id INT (11) unassigned tap, session VARCHAR (39) not tap, TIMESTAMP tap default CURRENT_TIMESTAMP created primary key (user_id, session);

First of all, when you sign in to store the session in a cookie, we will have to update the site. This code will go with your current login system.

  If the (/ * code that confirms credentials) / / // ... persistentAuth :: login ($ userId) for user logs in session session; }   

Secondly, we want to check whether there is a new user cookie credentials on the site. This code checks at the beginning of your code, first, are we already logged into our $ _SESSION? If not, try a cookie-based login.

  If (/ *! Login) * / & amp; amp; ($ userId = PersistentAuth :: cookieLogin ()) {//. For $ US $ user}   

Thirdly, according to Charles Miller's article, if we can not allow a user to log in to the following sections cookies:

  • Changing the user's password
  • Changing the user's email address (especially if email-based password recovery is used)
  • Any address of the user, payment details or financial information
  • Any merchandise of purchase

    Code:

      If the user is logged in through the cookie (PersistentAuth :: isCookieLogin ()) and this section does not have access to the section, we need to ask them about the password, perhaps some login page But send them to? Ask for a TODO password or send it to a password page}   

    To get all the code for checkout permanently at:

    There are some changes with this persistentAuth class that you have to do to get an example of your database back to getDB () The function has to be changed. IA ???? In this example, using PDOs I have set it to refresh every page, clear the database of old sessions, the best way to handle it is to use a cron if you set a cronon USE_CRON flag Change to Class Settings in

regex - How to build regular expression to find n ocurrences of "[########]" in a cell -


I have a large table that includes the code of the item as follows:

 < Code> "Description [#######]" (code is enclosed in "[]" and is composed of 8 numbers)   

I have code and details in different columns Will have to be separated. The reason for Regex is that the above details are found in Excel formulas like: =

  = IF (xyz, "description1 [1 ######]", "description2 [2 ######] ")   

so that the end result should be:

  column 1: = if (xyz, 1 ## # ###, 2 ######) Column 2: = IF (xyz, "description1", "description2")   

Has anyone done something like that? I have found these answers to some extent related, but there is currently not enough information to circumvent the regex:

< This class simplifies the replacement by using

class = "post- regExp

This code uses a different array on column A, in column B

Enter image details here

  sub-spliced ​​() retarded object Object Dim X as Dim ozragmax I LNGRO Long X = Range ([A1], Cell (Rows.Count, "A"). And (XLEP). Protect Formula Redeem X (1 to Ubuntu (x), 1 to 3) objRegex = CreateObject ("Vbscript.regexp") with objRegex.Global = True.Patrain = "" (\ w} (\ [) (\ d {8}) (\)) for "" "(X (LNGRO) , 2) = X (LNGRO, 1), "$ 3") X (LNGRO, 3) = Change. (X (1, ​​3) = x and all   (x, 1), "x" (LNGRO, 1), "" "$ 1"  

mysql - Only getting the last row from a table using POST with PHP -


i ?? 'Am new to PHP and I have a problem getting data from the post. I have a SQL query that selects from Table 3 column, which I resonate in the table form. Note that only 3 columns should have input type. Although the table looks fine (all values ​​from mySQL), when I print the third column variable from $ _ POST , only the last value is printed. Here is the code:

  $ result = mysql_query ("` id`, `component`,` `select percent` from waste_percentage`) or die (mysql_error ()); $ Line = mysql_fetch_array ($ result); Echo "& lt; table border = '1' cellspacing = '0'>  $ field1 ;"; Echo "& lt; td> $ field2 ;"; Echo "& lt; td & gt;" . "& Lt; input type = \" text \ "name = \" percent \ "value =". $ Field 3 "& lt; / td & gt;"; Echo "& lt; td & gt;" . "& Lt; input type = \" hidden \ "name = \" hidden \ "value =". $ Line ['id'] "& lt; / td & gt;"; Echo "& lt; / tr & gt;"; }} Echo "& lt; / table & gt;"; Echo "& lt; input name = \" submitpercent \ "type = \" \ "value = \" i £ i ?? νÎÏ ?? ÎμιΠ± \ submit "/>"; Echo ""; // If I try to produce (isset ($ _ post ['Submitpercent'])) {$ USER_PERCENTAGE [] = $ _POST ['percent']; Print_r ($ user_percentage); }   

Output is: 'Array ([0] => 13.60)' Thanks for any help! thank you in advanced.

You can change your & lt; Input & gt; tag, like this:

  echo "& lt; td & gt; . "& Lt; input type = \" text \ "name = \" percent \ "value = \" ". $ Field3." \ "& Gt; & lt; / td & gt;"; Echo "& lt; td & gt;" . "& Lt; input type = \" hidden \ "name = \" hidden \ "value = \" ". $ Line ['id']." \ "& Gt; & lt; / td & gt;";    

How to make up in pixels for android using Cordova Phonegap -


I know that you can download Cordoba and work with HTML pages such as the Android app. Can I use pixel makeup while working with it and I can use someone like zoomout function if the screen size is smaller than my PSD width / height parameters or I have any other way than% makeup

You can work with PhoneGap because you have regular sites firing on the screen size of the Android device Because of you, maybe you Percent based CSS layouts on CSS and the need to make good use of media queries.

mongodb - Scala Lift - Cloudbees 500 error, mongo record -


I have a perfectly fine version of my app locally, and in a dedicated server environment.

Now I am in the process of hosting the service through the cloud alone, but has gone into a strange error that I would be very much appreciated for some help.

Error in the question resulted from a new record being created for this model:

  Class Panel_Model (Personal) is extending MongoRecord [Panel_Model] ObjectIdPk [Panel_Model] { Def meta = Panel_Model object extends DBID longfield (this) object handle extends StringField (it, 50) extends the object cell StringField (it, 50) extends the object user StringField extends object name (this, 50) StringField (this, 50) extends the object element StringField (this, 50) extends object slide MongoJsonObjectListField (this, Panel_Model_Slide) Object State State JsonObjectField (this, Panel_Model_State) is expanded {Def defaultsValue = null.asInstanceOf [Panel_Model_State]} Extends the object-time JsonObjectField (this, Panel_Model_Time) {def defaultsValue = null.asInstanceOf [Panel_Model_Time]}} Object Panel_Model Expands Panel_Model with MongMetaRecor D [Panel_Model] { Fixed override collectionName = "panel"} case class Panel_Model_Slide (handle: string, media: string, absolute: map [string, string], content: string, view: string, index: int, active: int] JSONObject extends [Panel_Model_Slide] {Def meta = Panel_Model_Slide} Object Panel_Model_Slide extends JsonObjectMeta [P Anel_model_lide] Case class Panel_Model_State (ready: int, active: int, closed: int, slide: map [string, int]) is expanded JSONObject [Panel_Model_State] {def meta = panelmodel_state} Object panelModel_State extension of JsonObjectMeta [Panel_Model_State] Case class Panel_Model_Time (Created: lengthy) JsonObject [Panel_Model_Time] Extends the {def meta = Panel_Model_Time} object Expands Panel_Model_Time JsonObjectMeta [Panel_Model_Time]   

and the actual call that Generates error, only The inside of the Loudbee's environment is:

  Panel_Model.createRecord DBID (DBID). Room (Room_Session.is). User (User_Session.is). Name (fph.fileName). Handle (handle) Element (element). State (Panel_Model_State (0, active, 0, map (("active" -> 1), ("total" -> 1)))). Time (Panel_Model_Time (Unix))   

Any help is greatly appreciated, thanks in advance

< P yourAppId - Seeing a tail - and seeing: Bees app is seeing the actual error.

: (tail, or web console bees app)> You should take a look at the error in the logs The result is when this error occurs in the state - which will help a lot.

c# - Make .NET executable to load faster in the first time -


In C #, I made a simple Windows application executable (simple, I mean there are 20 ways in it, but this is just a window), targeting. .NET Framework 2.0 When the app loads, this default initial element (); does nothing more than the manufacturer.

The first time I open, the app takes approximately 7 seconds to load in my Windows 8 here. So it takes less than a second in the next time. I to open it

In Windows XP I tried, it takes 30 seconds to load for the first time Some of my friends, while testing the application, also complain that for the first time loading It takes a lot of time (about 30 seconds) then it takes fast (1 or 2 seconds).

I think this may be because the .NET Framework is not loaded yet, so it takes some time to load them into their machines.

Have you ever experienced the same problem with .NET applications?
Do you have any clue why this happens and how can I fix it?

Edit - I see some people NGN are suggesting, however, if it should be done in every machine that will use the application, then it can not be solved. I want to release my application to the big public of "common users", and if I need to do some extra stuff to use my application, then it does not make sense. It is already quite bad That we need the .NET Framework

Thank you.

You can try to pre-generate the original image using NGEN, which The app will use .NET when loading.

You can find more information here -

These are dependent on the platform and are usually not transferable, so you will need to do this on each machine.

arrays - cant understand why arraylist hasElement method not working in java -


Repeated items should not be added to the list in the text file, but this is output to each word from the program list The element method is not working. I need to create a program object called MTFencoder.java and it should accept the name of a text file as the argument of a command line such that if there is a text file called story.txt, your The program can be implemented with the following command:

java mtfencoder test.txt

This should produce a line of output for each word in the input file, such as when someone The word is the first thing encountered: output is:

0 words

And if the word has been encountered before, then output is a word that is the word in the list of known words The indicator of the order has been ordered according to the most recently used (MRU order).

  import java.util. *; Import java.io * *; Class windmakes {public static zero main (string [] args) {scanner scan = null; Scanner scan 1 = faucet; Word list = null; String s; Int count = 0; {Scan = new scanner (try new file (arguments [0]); Scan1 = new scanner (new file (args [0]); while (scan1.hasNext ()) {scan1.next (); count + +;} System.out.println ("number of words:" + count); word = new word list (count); while (scansheseind ​​()) {s = scan.next (); if (word.hasElement (s) == true) {System.out.println ("element is");} other {word.add (s);}} Word.showlist ();} hold (exception e) {System.err.println ("file Unable to read from ");} Finally close the {// stream (scan! = Zero) {scan.close ();} If (scan1! = Null) {scan1.close ();}}}}   

Bidlist program

  import java.lang. *; Import java.util. *; Public class wordlist {public string data []; personal count; personal int MAX; public word list (int n ) {MAX = n; data = new string [max]; calculation = 0;} adds x to set // if it is not already public zeros (string x) {if (count   

Your content will not contain any elements, it has been created, Which sets everyone in 0, and then you see that there are words in it, of course it will never happen. In addition, both scanners point to the same file, so each word that exists from one will be present in the other, and all words will be found in the first place to make it semi-redundant.

iOS long-running background timer with "location" background mode -


I want to implement a long-running background timer that sends the location periodically to the user's location.

To do this, I have set location mode for UIBackgroundModes , and call startBackgroundTaskWithExpirationHandler when the application is in the background And for CLLocationManager , I use the startupdatingLocation method (I do not want to use significant changes, because I need a high precision location).

But for about 26 minutes the app goes back to the background, it stops sending the server to the location. But the app has not crashed, so after I bring the app to the foreground, it can resume its timer.

26 minutes is with experiments, with iOS 6.1, iPhone 5.

Here are some questions,

  1. I do not understand why this 26mins is not suspended after 10mins, which is the time limit for background work

  2. Before 16mins, backgroundTimeRemaining methods get double maximum value return. But after 16mins, it decreases from 600 , so it is suspended after 10mins, background work is suspended.

    I have already tried to call BackBackgroundTaskWithExpirationHandler inside the end of the handler, but no use.

    If there is someone who has a clue for this problem, then it will be greatly appreciated.

    Use this code. You can set the time interval you want to call. I have tried to do many codes, but I found this the most accurate and least battery issue It's also great for background location service :)

python - webapp2 route containing regex does not work -


To enable feedback content formatting, I want to use the following regex in some of my routes: < Pre> redirectRoute (r '/ mypath / & lt ;: | json | xml & gt;', handler = myhandler, handler_method = 'mymethod', name = 'myhandler = mymethod', methods = ['post'] Post / MyPath Return HTML

  • / Li>

    Router class support regular expression Try out all internal variables

      redirectRoute ('/ mypath & lt; format: | / xml | / json' ;, handler = myhandler, handler_method = 'mymethod', name = 'Myhandler = mymethod', methods = [ 

    name format: 'POST'], strict_slash = true)

    The slash strip has to be leading from the value obtained in the requirement. requires a variable because I had an bad request error in case of / mypath / (with the termination of the slash) if it is empty (& Lt; :) Request The error occurs when the webpage tries to make the URL for the redirect to code / mypath as the password_slash = true. I think you had the same error.

  • java - .Jar File Compatibility -


    If I compile the Java source files on a Mac in a .jar file, then the same .jar program on a Windows machine Will run Thanks for your help, sorry, if this is a noob question.

    Yes, this is the complete thing to run once: -)

    A minor issue: You compile the Java source code in the bytecode (class files). The JAR file only packs the bytecode (and some other nifty things like digital signatures, compression, etc.)

    pointers - How does dynamically allocating a struct in C work? -


    Recently there was an assignment where I had to allocate memory to a structure for dynamic. I used this method:

      myStruct * struct1 = malloc (sizeof * struct1);   

    It just worked fine. However, I do not understand how. I think that the struct1 indicator has not been started at that point and therefore should not have anything to do with why malloc (sizeof * struct1) how to assign Does memory of a valid quantity return?

    sizeof operator does not evaluate operands in C. It looks just like the type, for example:

      #include & lt; Stdio.h & gt; Int main (zero) {int i = 0; Printf ("% zu \ n", Size I ++); Printf ("% d \ n", i); Return 0; }   

    If you run the above program, you will see that i is still 0.

    Then, in your example, * structure1 is not evaluated, it is used only for type information.

    ajax - can't get json return in codeigniter -


    I have a login page, which sends an AJAX request to the server when someone tries to log in. AJAX, the server goes on, I have been able to confirm due to the logging they have. But the problem is that my jacose is not getting JSON

    My controller has a function:

      public function login () {$ this- & Gt; Load-> Model ('users_model'); If ($ !! -> it-> Input-> Post ('email')) || ($$$ -; -> Input-> Post ('password')) {$ ret = $ this- & gt; User_model- & gt; Login ($ this-> Input-> Post ('email'), $ this-> Input-> Post ('password')); Echo json_encode (array ('position' => gt; "OK", 'msg' = & gt; 'log in!')); // also tried to return} and {echo json_encode (array ('condition' => gt; 'FAIL', 'msg' = & gt; 'invalid email or pass')); }}   

    and the AJAX function is:

      & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("# login") .jaxform (function (jason) {alerts (js); if (jsn.status == true) {warning (JSON.mms); // Window.location = '& lt ;? php echo base_url ();? & Gt;';} Other {warning ("problem"); $ (". Error_msg"). Html (json.msg);};}) ;}); & Lt; / Script & gt;   

    If I warn the json variable, it is empty, and if I do json.msg, then it is undefined. So ... what do I have to do to give a callback, a Jason object, or any kind of object? Please explain it, so I understand this problem, not to fix it. Thanks a lot!

    Edit: Here's the form:

      & lt; Span class = "error_msg" & gt; & Lt; / Span & gt; & Lt; / Br & gt; & Lt; Form id = "login" action = "& lt ;? php echo base_url ();? & Gt; user / login" method = "POST" enctype = "multipart / form-data" & gt; Email: & lt; Input name = "email" type = "text" / & gt; & Lt; / Br & gt; Password: & lt; Input type = "password" name = "password" & gt; & Lt; / Br & gt; & Lt; Input type = "submit" / & gt; & Lt; / Form & gt;    

    Ah, I think I understand.

    Is this plugin used?

    In that case, submit AJAX , not ajaxform .

    In other examples, do something like this online:

      $ (document) .ready (function () {$ ('# login'). Submit (function () { $ ("# Login"). Ajax submit ({success: function (json) {alert (Json); if (json.status == true) {warning (json.msg); //window.location = '& lt ;; Php echo base_url ();? & Gt; ';} Other {warning ("problem"); $ (". Error_msg"). Html (json.msg);}}}); return false;}); });    

    ruby - undefined method `searcher' for Gem:Module -


    जब मैं bundle exec rake db: initial_setup चला रहा हूं, तो एक त्रुटि आती है:

    रैक गर्भपात!

    मैं इसे कैसे ठीक कर सकता हूं?

    और यहां बंडल एप रेक डीबी की आउटपुट है: initial_setup --trace < / P>

      रैक निरस्त कर दिया! रत्न के लिए अपरिभाषित विधि `खोजकर्ता ': मॉड्यूल /होम / जेसे / वर्कस्पेस / कैनवास / लिब / टास्क / हियर_ट्रिगर.राक्य :: & lt; शीर्ष (आवश्यक) & gt; /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:171:in `लोड '/usr/local/lib/ruby/gems/1.9। 1 / रत्न / सक्रिय-समर्थन-2.3.17 / lib / active_support / निर्भरताएं। आरबी: 171: `लोड_वि_एन__एनसीस्टैंट_मार्किंग 'ब्लॉक में /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.17/lib /active_support/dependencies.rbitter47:in_new_constants_in '/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:171:in_load_with_new_constant_marking' /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.17/lib/tasks/rails.rb:14:in_ में & lt; शीर्ष (आवश्यक) & gt; /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.17/lib/tasks/rails.rb:14:in 'प्रत्येक' /usr/local/lib/ruby/gems/1.9। 1 / रत्न / रेल-2.3.17 / लिब / कार्य / रेल। आरबी: 14: `& lt; शीर्ष (आवश्यक) & gt; / Home / jesse / workspace / canvas / rakefile: 10: में `आवश्यकता '/ घर / जेसे / वर्कस्पेस / कैनवास / रैकफ़ाइल: 10: में` & lt; शीर्ष (आवश्यक) & gt;' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/rake_module.rb:25:in `लोड '/usr/local/lib/ruby/gems/1.9। 1 / रत्न / रेक-0.9.6 / लीब / रेक / रैके_म्यूल.आरबी: 25: `लोड_रेकफाइल '/ यूआरएसआर / लोकल / लिब / आरयूबी / गेम्स / 1.9.1/ गेम्स / रेक -1.9.6 / लिब / आरके में /application.rb:604:IN` raw_load_rakefile '/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:89:IN' लोड_रेकफ़ाइल में ब्लॉक ' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:160:in 'standard_exception_handling' /usr/local/lib/ruby/gems/1.9। 1 / रत्न / रेक-0.9.6 / लीब / रेक / एप्लिकेशन.आरबी: 88: `लोड_रेकफ़ाइल '/ यूआरएसआर / लोकल / लिब / आरबी / जीम्स / 1.9.1/ गेम्स / रेक -1.9.6 / लिब / आरके में /application.rb:72:IN 'रन में ब्लॉक' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:160:in 'standard_exception_handling' /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:70:IN 'रन' /usr/local/lib/ruby/gems/1.9। 1 / रत्न / रेक-0.9.6 / बिन / रेक: 37: `` शीर्ष पर (अपेक्षित) & gt; / Usr / local / bin / rake: 23: `लोड '/ usr / local / bin / rake में: 23:` & lt; main & gt;   

    कोई सलाह?

    धन्यवाद!

    < P> यह इसलिए है क्योंकि मणि .searcher नापसंद हो गया, ऐसा लगता है कि आपने हाल ही में रूबी रत्नों को अपडेट किया था
      $ gem -v   

    कमांड का उपयोग करते हुए आप अपने पुराने संस्करण की जांच कर सकते हैं

     < कोड> $ rvm rubygems 1.8.24    

    ajax - How do I use my ".selectedIndex;" value from select box as my index in my PHP request? -


    I have a select box that uses "onchange" so that the user can choose the value based on the choice.

     Select  // Add function var Select Town = function (option) {var _dom_element = document.createElement ("select"); _dom_element.id = 'Selection Menu'; (Var i = 0; i & lt; options.length; i ++) for {var _option = document.createElement ("options"); _option.value = option [i]; _option.innerHTML = Option [i]; _dom_element.appendChild (_option); _dom_element.onchange = function () {var checkValue = document.getElementById ('Selection menu'). SelectedIndex; // Alert (option [check value]); }; } This.getDomElement = function () {return _dom_element; I menu selected value (hopefully made):  
      var _getWeatherInfo = function (ntown) {dojo.xhrget ({url: "PHP / weather.php? Ntown =" + ntown , Handle: "Jason", Timeout: 5000, Weight: Function (response) {_refreshWeatherList (response);}, Error: function (error_msg, response) {_handleError (error_msg);}}); }   

    There was some confusion due to my last question, if you need more information or have been better explained then please ask me for any help!

    You have to call _getWeatherInfo within the online function as function ! _dom_element.onchange = function () {var checkValue = document.getElementById ('selection menu'). SelectedIndex; _getWeatherInfo (checkValue); };

    SQL syntax error but copied from MYSQL -


    I have a SQL query that I have copied from MYSQL and I have removed the quotation, but it does work Does not seem to be.

      conn = connect (); SelectStatement = "Update Student Set Item? = ?, Type? =? Where ID =?";;; Println (selectStatement); If (conn! = Null) {readyStatement = conn.prepareStatement (selectStatement); ReadyStatement.setString (2, id); ReadyStatement.setInt (1, place); ReadyStatement.setInt (3, place); ReadyStatement.setString (4, type); ReadyStatement.setString (5, userId); ReadyStatement.executeUpdate (); Back true;   

    I'm not sure why this does not work because this exception is thrown

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error Is your SQL syntax; To use near '1' = 'Sadness', check the manual related to your message SQL Server version for the correct syntax, type 1 =' edid 'WHERE id =' student1 '' on line1 < / Div>

    Finally it worked

      conn = connect (); SelectStatement = "Update item of student set" + location + "` = ',' type '+ location + "` =' WHERE id =? ' ;; Println (selectStatement); If (conn! = Null) {readyStatement = conn.prepareStatement (selectStatement); ReadyStatement.setString (1, ID); ReadyStatement.setString (2, type); ReadyStatement.setString (3, User ID); ReadyStatement.executeUpdate (); Back true; }    

    Resettable timer in python repeats until cancelled -


    I have copied the code from this web address

    to create a resetable timer, and this Works well but ends once it is finished. I would like to start it again, but I'm new and how to do it, it could not work.

    I got tired of creating a new instance of the self in the lower part of the run () function after line:

      print "time:% s - the timer is over! " % Time.asctime ()   

    But the dragon did not like it.

    The code made by Eddie Jacob has been pasted:

      Threading import thread, event, timer import time DEF timer reset (* AGR, ** quad) : "" Global Function for Timer "" "Returns _TimerReset (* Args, ** Quarges) Class _TimerReset (Thread): Call a function after the specified seconds: T = TimerSet (30.0, F, Argos = [ ], Quad = {}) t. START () T.CANEL () # Stop the action of timer if it is still waiting for "def" __init __ (self, interval, work, logic = [], kwargs = {}): thread .__ init __ ( Self). Self.interval = interval self.function = function self.args = args self.kwargs = Kwargs self.finished = Event () self.resetted = Cancel true def (self): "" "If it is not finished Turn off the timer "" self.finished.set () def run (self): Print "Time:% s - Running timer ..."% time.asctime () while auto-resetting: Print " Time:% s - Waiting for timer in% .2f for timeout ("Self."): Self (self.interval) Self-dependent (): Self. Function (* self.args, ** self.kwargs) self.finished.set () Print "Time:% s - The timer is over! "% Time.asctime () def reset (self, interval = none):" "" reset timer "" if interval: print "time:% s - reset timer% .2f ..."% (time. Asctime (), interval) self.interval = interval Other: Print "time:% s - timer reset ..."% time.asctime () self.resetted = True self.finished.set () self.finished.clear ( )   

    I started using my timer:

      tim = timer reset (10, adblock) tim.start ()   

    The AddBlank function does something, but I have to call the timer again, but it will end Only then will it be. In fact, appreciate this with help, I understand the duplicate code without understanding it, that it is bad behavior, but in reality I want to do a simple resetter to call the function repeatedly to do a reset And it almost does this.

    run function:

       

    This will be the reason for running indefinitely until this finished is set.

    html - Image map not working in Internet Explorer 10 -


      & lt; img src = "चित्र / imagemap.png" width = "600" height = "100" सीमा = "0" usemap = "# नक्शा" / & gt; & Lt; नक्शा नाम = "नक्शा" & gt; & Lt;! - # $ -: GIMP छवि मानचित्र प्लग-इन द्वारा बनाई गई छवि मैप फ़ाइल - & gt; & Lt;! - # $ -: मॉरीशस रिजक द्वारा जीआईएमपी इमेज मैप प्लग - & gt; & Lt;! - # $ -: कृपया "# $" - & gt; से प्रारंभ होने वाली लाइनों को संपादित न करें & Lt;! - # $ संस्करण: 2.3 - & gt; & Lt;! - # $ AUTHOR: एरिक - & gt; & Lt; क्षेत्र आकार = "रीकटक" कॉओज = "2,2 9, 9 7" onclick = "scrollto1 ()" शैली = "कर्सर: सूचक;" / & Gt; & Lt; क्षेत्र आकार = "रीसेट" कॉओज = "102,3,202,95" onclick = "scrollto2 ()" शैली = "कर्सर: सूचक;" / & Gt; & Lt; क्षेत्र आकृति = "रीकटक" कॉओज = "208,3,307,95" ऑनक्लिक = "स्क्रॉलटो 3 ()" शैली = "कर्सर: पॉइंटर;" / & gt; & Lt; क्षेत्र आकार = "रीकटक" कोऑर्ड = "315,5,409,98" onclick = "scrollto4 ()" शैली = "कर्सर: पॉइंटर;" / & gt; & Lt; क्षेत्र आकार = "रीकटक" कॉओज = "413,6,502 9 7" onclick = "scrollto5 ()" शैली = "कर्सर: पॉइंटर;" / & gt; & Lt; क्षेत्र आकार = "रीक्टीट" कॉओज = "507,4,597,97" onclick = "scrollto6 ()" शैली = "कर्सर: पॉइंटर;" / & gt; & Lt; / नक्शा & gt;   

    इमेज मैप इंटरनेट एक्सप्लोरर 10 को छोड़कर सभी ब्राउज़रों में क्लिक करने योग्य है। मैं सोच रहा हूं कि इंटरनेट एक्सप्लोरर में काम करने का कुछ तरीका है।

    मैंने आपके कोड को अद्यतन किया है, अब इसका काम कर रहा है:)

    आपके पास क्षेत्र स्वयं समापन नहीं है, और आप गायब हैं href = "#" और शैली बिल्कुल जरूरी नहीं है):

    बेला की जांच करें यदि आप देखना चाहते हैं

      लिंक: http : //jsfiddle.net/MarmeeK/bD4s7/ & lt; img src = "http://images5.fanpop.com/image/photos/30600000/Template-800-x-100-pippy-and-jezzis-world-of -पर्दी-दिमाग -30664157-800-100.jpg "चौड़ाई =" 600 "ऊंचाई =" 100 "सीमा =" 0 "usemap =" # नक्शे "alt =" "/ & gt; & Lt; नक्शा नाम = "मानचित्र" & gt; & Lt; क्षेत्र आकार = "रीकटक" कॉओज = "2,2 9, 9 7" onclick = "scrollto1 ()" शैली = "कर्सर: सूचक;" & Gt; & Lt; क्षेत्र आकार = "रीकटक" कॉओज = "102,3,202,95" href = "#" & gt; & Lt; क्षेत्र आकार = "रीकटक" कॉओज = "208,3,307,95" href = "#" & gt; & Lt; क्षेत्र आकार = "रीक्ट" कॉओर्स = "315,5,40 9,98" href = "#" & gt; & Lt; क्षेत्र आकार = "रीक्ट" कॉओज = "413,6,502,97" href = "#" & gt; & Lt; क्षेत्र आकार = "रीकटक" कॉओज = "507,4,597,97" href = "#" ऑनक्लिक = "जावास्क्रिप्ट: अलर्ट ('हाय');" & Gt; & Lt; / नक्शा & gt;    

    caching - How to Cache SOAP Requests and Response in java -


    SOAP is a mechanism to cache requests and feedback in order to improve performance ....

    We can reduce the unnecessary identical requests to the server to achieve the same response.

    The way of using XIS 2 for webservice with XIOM.

    The realization of your answer.

    As far as I know there is no mechanism to do this in axis But you can always rebuild your own custom cache using a simple map or

    sql server - Error using BCP and hidden path to export data from SQL -


    जब मैं \\\ twn-a110093 \ s $ \ SNData1.csv , यह काम नहीं करता है।

    त्रुटि संदेश:

    [माइक्रोसॉफ्ट] [एसक्यूएल मूल क्लाइंट] बीसीपी होस्ट डेटा-फाइल को खोलने में असमर्थ

    शायद '$' चर पहचान नहीं पाई है? मैं इस समस्या को कैसे ठीक कर सकता हूं?

      Exec master..xp_cmdshell 'bcp' चुनें sfm.dbo.tblSNDataDetail से "queryout" \\ twn-a110093 \ s $ \ SNData1.csv "- सी-टी, -टी-एस TWN-SQL-01 '   

    बस आप कर सकते हैं बीसीपी डेटा सीधे यूएनसी पथ के लिए नहीं, दोहरी हॉप की समस्या होगी, आपको 2 सर्वरों के बीच विवश प्रतिनिधिमंडल स्थापित करना होगा आपको अपने स्थानीय ड्राइव में पहली बीसीपी की जरूरत है, फिर यूएनसी पथ पर फ़ाइल को कॉपी / कॉपी करें, जो वास्तव में आपसे सीधे बीसीपी को यूएनसी पथ से तेज है, यहां तक ​​कि आप इसे सही ढंग से सेट अप करते हैं मानो या न मानो, इसे आज़माएं

    iphone - Strange behaviour in UIView Animation -


    I am facing a strange behavior in UIView animation. I am developing an iPad app that shows some UIView animations is using.

    All animation duration is set to 0.5. All the animations are working fine on the initial application. But after some continuous use, no animation is happening, all UIVView changes are happening quickly, as the duration has not been set in the animation.

    I am not sure why this is happening. Is anyone else facing such a problem?

    In this way I am using many animations, but after some time no animation is happening, but all the codes inside the animation block are working properly < Pre> [UIView animateWithDuration: 0.5 Animations: ^ {Temple Label Set Font: titleFont.font]; [TempLabel Set Transform: CGAffineTransformMakeRotation ((- 90 * M_PI / 180)); TempLabel.frame = CGRectMake (2,03,330); }];

    You feel that the problem every time you apply the change for the first time, control But there is no change, but you have a change, in this case the next change can not work as you want. You have some options to solve this, so I have not tried this code can work

      tempLabel.transform = CGAffineTransformIdentity;   

    Put the above code before applying any changes, it will reset any applied changes and your new change will be applied immediately or you

      tempLabel can transform = Cegifine Transcens Concrete (tempLabel.transform, your transform);  

    Thanks

    / html>

    android how to get all video uploads by another user using youtube data api v2? -


    I am trying to upload all the video by a specific user. I tried this URL, but only got the first page video list.

    There are about 250 videos uploaded by this user, but I am only getting some. On the website we get more video while loading the "Load more" button but I do not know how to get it with the API.

    Can anyone help me for this? Thank you

    You will also need to send and gdata api to find the next 25 (maximum 50) results Because Gatata API Returns by default only Fist 25 Results

    For example, to get the next 25 results:



    cocoa touch - Properties on a Class Not Changing -


    OK, I have 2 squares.

    One

      switch (_allProperties.switchNumber) with one and all of the properties {case 0: CCLOG (@ "Saving Information");  

    In the square with all the methods. CCalog (@ "Furnamber =% d", number A); CCalog (@ "secondnumber =% d", number B); // I get the exact number on the DBG _Liproperties: IFirstNumber = numberA; _allProperties.secondNumber = numberB; CCalog (@ "Properties first number =% d", _lotest properties; first number); CCLG (@ "Properties SecondNumber =% d", _ All Properties. Second Number); // I'm getting 0 on both of these logs. break;

    Thus, I have all methods on class

      @property (strong) multiplier class _allProperties for all * properties;   

    And here's how. First number and amp; .SecondNumber Properties is added toClass

      @property (nonatomic, assigned) int firstNumber; @property (nonatomic, assigned) int secondNumber;   

    What am I missing? Why is not the property getting ??

    Thank you for your time, guys are a good day!

    Now I see, you still declare property properties and assign to this class Do not and do not invoke. Before using _allProperties, you should allocate and invoice it: _allProperties = [[attribute class alloc] init];

    c# - NHibernate and SQLite - very slow transaction commit -


    यहां कोड है:

      का प्रयोग (var सत्र = NHibernateSessionFactory.OpenSession ()) // 0ms {(विभिन्न लेनदेन = सत्र। बेनिफ्रेंसैक्शन ()) // 0ms {session.Save (नया टेस्ट) ({text = "..."}); // ~ 2ms लेनदेन.संचार (); // 100-150 एमएमएस !! }}   

    लॉग आउटपुट:

      ... 2013-06-20 17: 45: 48,857 [DEBUG] [NHibernate.Impl.SessionImpl] - लेनदेन पूर्ण होने से पहले 2013-06-20 17: 45: 48,98 9 [डेब्यूग] [NHibernate.Transaction.AdoTransaction] - IDbTransaction प्रतिबद्ध ...   

    ऐसा क्यों इतने समय लगता है? PostgreSQL परिणामों के साथ ~ 5-10 एमएमएस में एक ही कोड ...

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



    Ruby on Rails Devise -- Redirect after edit profile -


    How to use Ruby on Rails after editing my information I use the gem to edit the user page ?

    I thought how to do this.

    First, make a registration controller my_devise in a new folder named in your app / controllers

    Transfer the code> folder, and the newly generated registration controller to that folder.

    Next, open registration controller , and change the content to

      class MyDevise :: Registration Controller & lt; Devise :: RegistrationsController protected def after_update_path_for (resource) user_path (resource) and end   

    Now, app / view / devise / registrations Code in a new folder named App / View / my_devise / registration > Folder, but Sessions Sessions and Shared Skip Folders Code> Folder

    Then, in the config / routes.rb file, line devise_for: users to devise_for: users,: controllers = & Gt; ; {: Registration = & gt; "My_devise / registration"}.

    And that's it! I think I have covered it all.

    java - Guava's expireAfterAccess cache on collection-view -


    expireAfterAccess विधि के लिए javadoc कहते हैं:

    निर्दिष्ट करता है कि प्रविष्टि की सृजन के बाद एक निश्चित अवधि समाप्त हो जाने के बाद प्रत्येक प्रविष्टि स्वतः कैश से हटा दी जानी चाहिए, उसके मूल्य का सबसे हाल ही में प्रतिस्थापन, या उसकी अंतिम पहुंच। प्रवेश समय सभी कैश पढ़ने और लिखने के कार्यों द्वारा रीसेट (कैश.एएसएप () सहित) प्राप्त करें (ऑब्जेक्ट) और कैश.एस्एप ()। डाल (कश्मीर, वी)), लेकिन संग्रह के दृश्य पर संचालन द्वारा नहीं कैश.एएसएपी

    मेरे पास निम्न कोड है:

      कैश & lt; स्ट्रिंग, स्ट्रिंग & gt; कैश = कैशइल्डर। एनईयूब्लूल्डर () .इन्फ़ैरएफ़ेटर एविज़ (2, टाइम यूनेट। एसईसीएनडीएस)। बिल्ड (); समवर्ती मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; Map = cache.asMap (); Map.put ("a", "12345"); System.out.println ("प्रथम पहुंच:" + map.get ("a")); System.out.println ("दूसरा पहुंच:" + map.get ("a")); Thread.Sleep (1900); // 1.9 सेकेंड सिस्टम। आउट.प्रिंटएलएन ("तीसरा पहुंच:" + map.get ("a")); Thread.Sleep (1000); // 1 सेकंड सिस्टम.आउट.प्रिंटलाइन ("चौथा एक्सेस:" + map.get ("a")); Thread.Sleep (1500); // 1.5 सेकंड सिस्टम। आउट.प्रिंट ("फिविथ एक्सेस:" + map.get ("a"));   

    और इसका आउटपुट है:

      पहले पहुंच: 12345 दूसरा पहुंच: 12345 तीसरा पहुंच: 12345 चौथा पहुंच: 12345 फिविड् एक्सेस: 12345   

    इसलिए, जैसा कि हम देख सकते हैं कि एक्सेस का समय रीसेट किया गया है, जब हम संकलन-दृश्य पर कार्रवाई करते हैं। जवाडोक में क्या बोल्ड शब्द का अर्थ ऐसे मामले में है?

    संग्रह के संचालन-कैश के दृश्य .asMap

    से < कोड> हैं keySet () , मान () , entrySet () । इनमें से किसी पर फेरबदल तक पहुंच का समय रीसेट नहीं किया जाएगा, और न ही Map.Entry के माध्यम से entrySet () प्राप्त होगा div>

    css - Getting different figure types with Google Web Fonts -


    [Raleway] is a display face and download both features old style and lining points, standard and discretionary ligature, a very complete spectrum set, as well as stylistic alternative Inspired by more geometrical sense-serif typefaces, its neo-bizarre default character set is inspired.

    (emphasis my)

    The default "old style" ("onum") for the digits, which is used in the headlines Ideally, I want to be able to use the "table" version ("LNUM") with "tabulated" ("tinum") kerning (as opposed to proportional - "PNUm").

    I tried to use the following block of announcements, to no avail:

      font-feature-settings: turn off, "off", "off" off, "Lnum" on, "tinam" on; -moz-font-feature-settings: "onum = 0, pnum = 0, lnum = 1, tnum = 1"; / * Firefox * / -webkit-font-feature-settings: "off" off, "off" off, "lnum" on, "tnum" on; / * WebKit * / -o-font-feature-settings: "off" off, "off" off, "lnum" on, "tnum" on; / * Opera / /   

    Any ideas? If I want to download full font and want to re-export it as a web-font, how will I do this when I get my embrace data?

    Thank you!

    From this page:

      .lnum {font-variant- Numeric: lining-nums; -Mo-font-feature-settings: "LNUM" 1; -moz-font-feature settings: "lnum = 1"; -ms-font-feature-settings: "lnum" 1; -o-font-feature-settings: "lnum" 1; -webkit-font-feature-settings: "lnum" 1; Font-feature-settings: "lnum" 1; }   

    For now only. Works with OFF files, not with font embedded by Google webfonts. Safari is not supported Here you can test other typeface features and browser support:

    java - How to debug a db4o database running on an Android app -


    I have an Android app that uses a DB4O database, and when I run my application this database I want to query. I have already installed the OME (Object-Manager Enterprise) plugin on Eclipse, but I do not know how to connect it to your Android DB4O database.

    Is anyone able to do this successfully? I do not even know that the program is running, while there is a way to access my Android app's data.

    I'm scared, there is no direct way to do this. You need to copy your machine from your Android emulator and copy it to your machine and then OA.M.

    Adding path to image in jQuery code in Wordpress -


    I am adding a jQuery script to add a full screen image background to a page via backstrech ().

    The problem I am facing is correcting the path of images, because I am using Wordpress.

    This is what I have so far received:

        

    I started url at & lt ?? Php bloginfo ('template_directory')? & Gt; I tried to use , but I believe it does not work in jQuery. How can I go about using the URL linking the image in this case?

    Thank you.

    Jason, I believe that you have a very classic challenge with WordPress and Javascript properties Are running. You need a PHP variable (or some type of PHP processing) for your Javascript, and of course, JavaScript can not parse PHP!

    Some comments suggest inspection of the path (this has just happened to get your directory) but I am not a fan of that approach because it believes that your theme path is always the same Will happen. (And if you can change the name of your theme folder, change the theme, or just change your folder structure, then this can change.)

    I usually use & lt; Head & gt; This is a very simple JSON object of all my subjects, to name-space (to keep the global scope clean).

      & lt; Script & gt; // Bootstrap Page Level Code for var YOURSITENAME = {"isFrontPage": & lt ;? = (Is_front_page ()? 'True': 'wrong'); ? & Gt ;, "iPad": & lt ;? = (Is_page ()? 'True': 'wrong'); ? & Gt ;, "PostName": '& lt ;? = Get_post_name (); ? & Gt; ',' TemplateURI ':' & lt;? = Get_template_directory_uri ();? & Gt; '}}; & lt; / script & gt;   

    last item entitled "TemplateRie" See in your JavaScript Now you can access this value at any time by using the named JSON object:

    or in your specific example: var imagePath = YOURSITENAME.templateURI + "/library/images/image.jpg"; JQuery (document) .ready (function ($) {$ ("Primary-Container"). Backstretch (Image Path );});

    Of course, YOURSITENAME Change in some more meaningful namespace for.

    Have fun!

    javascript - Bookmarklet window gets blocked if I try to do anything besides open a new window -


    I am trying to write a bookmark that takes the user current site, does some parsing and ajax Request, and opens a new window with that information as an absolute

    Here's what I found:

      & lt; A href = "javascript: (function ($) {var a, http, options, request, st, u; u = document. Lunation hostname; a = u.split ('.'); St = a [a. Length - 2]; path = 'http://ajax.googleapis.com/ajax/services/feed/ search: callback =? & Amp; vm; v = 1.0 & amp; q =' + st; $ .ajax ({type : 'GET', url: path, async: false, datatype: 'json', success: work (data) {var targ = data ['responseData'] ['entries'] [0] ['url']; window .open ('http: // localhost: 3000 / bmfeed? Targ =' + targ, 'menubar = 1, resizable = 1, width = 350, height = 250');}});}) (jQuery) Gt; NewWindows & lt; / A & gt;   

    This finds the correct URL, but the new window has been blocked by the popup blocker.

    Instead of this I just

      and   

    This opens a new tab that is not created without any difference. I think the difference is that I am doing some parsing in the first example, which the browser does not like.

    Is there any way to make my cake and eat it? Thanks a bunch!

    I think the difference is that I'm doing some parsing the first example

    No, the problem is asynchronous AJAX. The browser tries to determine whether a user's action has started a new window or not, or before deciding to block it. To open a new window without blocking it, there should be a "straight line of action" between user clicks and window opening. Async ajax breaks that straight line (synchronous ajax can work, i am not sure.)

    Is there any way to make my cake and eat it?

    The right solution, but what you have now, is to create a pop-over deviation on the page that is and lt; A href = "http: // localhost: 3000 / bmfeed? Targ =." Target = "_ blank" & gt; Click here to open a new window & lt; / A & gt; .

    javascript - Button 'onclick' doesn't work in Internet Explorer -


    I am testing web applications with spring MVC 3 and I'm facing an error that I can not do. / P>

    I have a controller who gives me a list of data from DB which is handled with a forEach statement in JSP Also, first I have a form Which will be displayed in the jquery-ui dialog after clicking on a button.

    My JSP looks like this:

      & lt; Html & gt; / ** * * ** / & lt; C: forEach item = "$ {listaFecha}" var = "fec" & gt; & Lt; TR & gt; & Lt; Td> & Lt; C: out value = "$ {fec.id}" /> gt; & Lt; / Td> & Lt; Td> & Lt; C: out value = "$ {fec.NOM_ASUNTO}" /> gt; & Lt; / Td> & Lt; Td> & Lt; Fmt: formatDate value = "$ {fec.FEC_INICIO}" pattern = "dd-MMM-YYYY" /> gt; & Lt; / Td> & Lt; Td> & Lt; Fmt: formatDate value = "$ {fec.FEC_FIN}" pattern = "dd-MMM-YYYY" /> gt; & Lt; / Td> & Lt; Td> & Lt; C: Out value = "$ {fec.PERIODO}" /> gt; & Lt; / Td> & Lt; Td> & Lt; Button ID = "faqIE $ {fec.id}" value = "$ {fec.id}" onclick = "changeFec ($ {fec.id})" & gt; Editor & lt; / Button & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; Div id = "edit-form $ {fec.id}" square = "edit" style = "text-line: center;" Title = "editor fade" & gt; & Lt; / Br & gt; & Lt; Form name = "fechasE" method = "POST" target = "_ parent" action = "& lt; c: url value =" / management / insertaForm "/> id =" form2E $ {fec.id} "& Gt; & lt; label style = "margin-right: 133 pixels;" & gt; Tipo de nullitize: & lt; / labels & gt; & lt; / br & gt; & lt; input type = "text" class = "Fields" name = "asE" value = "$ {fec.NOM_ASUNTO}" disabled />  
    Label style = "margin-right: 158 pixels;" & gt; Fecha Encyclical: & lt; / labels & gt; & lt; / br & gt; & lt; input type = "text" class = "fields" name = "date1E" value = "& lt; Fmt: formatDate value = "$ {fec.FEC_INICIO}" pattern = "dd-MMM-YYYY" /> / & Gt; & Lt; / Br & gt; & Lt; Label style = "margin-right: 165px;" & Gt; Fecha Final: & lt; / Label & gt; & Lt; / Br & gt; & Lt; Input type = "text" class = "fields" name = "date2E" value = "& lt; fmt: formatDate value =" $ {fec.FEC_FIN} "Pattern =" dd-MMM-YYYY "/> Gt; gt; & lt; / b & gt; & lt; / form & gt; & lt; / div & Gt; & lt; / c: foreach & gt; / ** * * ** /

    I'm trying to configure JRBell

    Dev environment description:

    • JBoss 6.0.1 - running out of eclipse (the same machine, not remotely)
    • Debugging: Remote, all Hotspending Functions of
    • Anti script is that: Zebus prepares war, deploys and lifts

      I have not used JRBEL before, the configuration guide flows It sounds easy, but I'm having trouble with my special case.

      All sources (including .jsps and images) are being compiled in the project's bin folder.

      Ant script creates warfare which is separately placed inside a dedicated jar in JSP, style, property files and compiled application sections with libraries in / web-inf / lib /. The script lift the war generated by Jebus and runs the server.

      Give me your rebel. Xml (Where should I place in my project's bin folder ?!) And what should I write for this? Code change has changed within jarb inside Jarbill in Jabbal server.

      I provided the Jbys run script with the required Jebel VM arguments.

      Thanks in advance!

      rebel.xml to web-INF / your application Squares If you have dependency in the WEB-INF / lib folder, then each archive should have its own dedicated rebel.xml configuration file.

      If you deploy Eclipse to use WTP, it is ok to put it into the source folder but if you are using the ant to build a war So, you have to make sure that your ant script will detect the revolting XML and copy it to the correct location.

      The path in the rebel should be pointing to the Xml folder where the compiled squares, that is the place where your IDE compiles these sections.

    javascript - Flexible Font Size for fixed width and height -


    मुझे अपने प्रत्येक & lt; p & gt; को निश्चित चौड़ाई के साथ लचीला फ़ॉन्ट आकार और ऊंचाई।

    वर्तमान कोड

    सीएसएस

      पी {width: 500px; ऊँचाई: 100px; पृष्ठभूमि रंग: # f0f0f0; मार्जिन: 10px; गद्दी: 5px; font-size: 24px; }   

    एचटीएमएल

      & lt; p & gt; उत्तरदायी विज्ञापन ड्यूस फायरटा क्वेस्ट्स फोर्ट्स लार्नेट सबसे महत्वपूर्ण बात यह है कि, इस तरह के रूप में एक ही स्थान पर आ रहे हैं इस वेबसाइट पर विज्ञापन दें ड्यूस फायरटा क्वेस्ट्स फोर्ट्स लार्नेट सबसे महत्वपूर्ण बात यह है कि, इस तरह के रूप में एक ही स्थान पर आ रहे हैं अर्धशतक ड्यूस फायरटा क्वेस्ट्स फोर्ट्स लार्नेट निचले स्तर के रंगों के साथ, फॉसीबस साइट एंट और एसी के साथ, विभिन्न प्रकार के एआरओ। & Lt; / p & gt; & Lt; br & gt; & lt; br & gt; & lt; br & gt; & Lt; br & gt; & lt; br & gt; & lt; br & gt; & Lt; p & gt; विज्ञापन के लिए विज्ञापन ड्यूस फायरटा क्वेस्ट्स फोर्ट्स लार्नेट नीचे दिए गए शब्दों के बारे में बताएं, फ़ॉज़िबस एट एट, एफ़ एसी, एल्ग्स एडी, एफआईसीबीएस एट एसी, एफआईसीबीएस एट एएसी, एफएआईआईडीएडी एआरओ। & Lt; / p & gt; & Lt; br & gt; & lt; br & gt; & lt; br & gt; & Lt;! - यह एकदम सही है - & gt; & Lt; p & gt; विज्ञापन के लिए विज्ञापन ड्यूस फायरटा क्वेस्ट्स फोर्ट्स लार्नेट निचले स्तर के रंगों के साथ, फॉसीबस साइट एंट और एसी के साथ, विभिन्न प्रकार के एआरओ। & Lt; / p & gt;   

    कोड को jsfiddle में देखें

    और यह वह आउटपुट जिस पर मैं पहुंचना चाहता हूं

    सामान्य विचार को अतिप्रवाह: छिपी प्राप्त करना है, तब तक टेक्स्ट को सिकुड़ते रहें scrollHeight offsetHeight से कम है। जैसे: <प्री> []। ForEach.call (document.getElementsByTagName ('p'), फ़ंक्शन (पी) {p.style.overflow = "hidden" var; f = 24; (एफ & gt; 6 & amp; amp; पी। स्क्रॉल हेइट & gt; पी। ओफ़सेट हैइट) {एफ--; p.style.fontSize = f + "px";}});



    javascript - Uncaught ReferenceError: $ is not defined -


      & lt; script type = "text / javascripts" src = "try / jquery-1.9.1 / jquery min.js "& gt; & lt; / स्क्रिप्ट & gt; & Lt; script src = "slider.js" & gt; & lt; / स्क्रिप्ट & gt; & LT; स्क्रिप्ट & gt; Var स्लाइडर = नया स्लाइडर ($ ('div.slider ul'), ('# slider-nav')); Lider.nav.show () खोज ('बटन')। पर ('क्लिक करें', फ़ंक्शन () {slider.setCoordinates ($ (this) .डेटा ('dir'));}); & Lt; / स्क्रिप्ट & gt; & Lt; / body & gt; & Lt; / html & gt;    

    टेक्स्ट / जावास्क्रिप्ट सही माइम प्रकार नहीं है एक स्क्रिप्ट फ़ाइल टेक्स्ट / जावास्क्रिप्ट है अधिकांश ब्राउज़र खराब MIME प्रकार को अस्वीकार करेंगे और स्क्रिप्ट को नहीं चलाएंगे।

    Android imageview image quality matter? -


    I am writing an Android app that needs to display some high quality pictures (taken from professional DSLR) . The problem is that it can not be displayed from the gallery.

    I first select a photo in the gallery. Target photo 2464 * 1632 JPEG, approximately 4.5 m;

    Then I need to do it in 800 * 600 seconds and display it in image view:

      image.setImageBitmap (this.bmp);   

    The thing is that I have tested the second image that I downloaded the Internet (actually low quality), and it works without problems, can anyone tell me Why can not it be displayed? Due to the fact that large images are difficult to handle due to limited memory, I / O>

    Use:

    • Use a webview (this allows you to use pinch and zoom functionality to use those extra pixels
    • Decoding the image downwards Make a display and then put it in an image view and changing the bitmapops and inSampleSize . You are having difficulty in it, consider using it which only needs fixed width and height.

    java - How to serialize List collection object in Hadoop? -


    Is Serial Java Storage in Hadop?

    Writeable Interface is for Java primitives only. I have class features.

      Private string keywords; Private listing & lt; Status & gt; Tweets; Private long query time = 0; Public Tweet Status (String Keys, List & lt; Status & gt; Tweets, Long Query Time) {this.keywords = keys; This.tweets = Tweets; This.queryTime = queryTime; }   

    How can I sort the list object?

    Write-able interface is only for Java primitives.

    In fact, you need to break your object in the sequence of objects, which you can serial.

    So, from the first principles, to sort the inventory to sort the list size and then to list each element. In this way, when you need to deserialize, you need to know how many elements deserialize.

    You should meet something like writing (Hydro!) Track:

      class TweetStatusWritable implies writeable {private string keyword; Private listing & lt; Status & gt; Tweets; Private long query time; // Add getters for the above three areas Public Zero ReadField (DataInput in) {this.keywords = in.readUTF (); Int size = in.readInt (); This.tweets = new list & lt; Status & gt; (); (Int i = 0; i & lt; size; i ++) {status status = // an example of status tweets deserialize.add (status); } This.queryTime = in.readLong (); } Public Zero write (data output out) {out.writeUTF (this.keywords); Out.writeInt (this.tweets.size ()); For (Int i = 0; I & lt; this.tweets.size (); i ++) {// Serial Tweets [I] Outside} Out Write long (query time); } Public TweetStatusWritable (string keyword, list & lt; status & gt; tweets, long query time) {this.keywords = keywords; This.tweets = Tweets; This.queryTime = queryTime; }}    

    ajax - my php curl script works i now need to send users:pass in array -


    यह प्रश्न एक सटीक डुप्लिकेट है: < / P>

    • ठीक है, यहाँ हम यहाँ मेरी कर्ल स्क्रिप्ट है

        & lt;? Php // फ़ंक्शन फ़ाइल में शामिल हैं ('func.php'); // चेक फंक्शन के लिए डेटा $ user = "उपयोगकर्ता नाम यहां जाता है"; $ Password = "पासवर्ड यहां जाता है"; // सीमा के लिए डेटा $ ऊपरी_बाउंडरी = "999.99"; $ लोअर_बाउंडरी = "0.00"; // लॉगिन स्क्रिप्ट चेकक्यू ($ उपयोगकर्ता, $ पासवर्ड); // चेक स्क्रिप्ट $ html = जांच ('https: //example/home.aspx'); $ Dom = नया DOMDocument (); @ $ Dom- & gt; loadHTML ($ एचटीएमएल); $ Xpath = नया DOMXPath ($ dom); $ Value = $ xpath- & gt; क्वेरी ('// लेबल [@ id = "ctl00_ctl00_PageContainer_MyAccountCpuContainer_symPercent"] / निम्न- sibling :: text ()') - & gt; आइटम (0) - & gt; nodeValue; // मूल्य की जांच और परिणामों को प्रतिध्वनित करें यदि (($ value & gt; = $ lower_boundary) & amp; amp; ($ मान & lt; = $ upper_boundary)) {$ result_string = "चेक किया गया" $ उपयोगकर्ता ":"। $ पासवर्ड "सीपीयू कूलिंग चूहा:"; गूंज "लाइव - $ result_string $ value"; // मिटा कुकी सामग्री साइनआउट (); } Else {checkcpu ($ उपयोगकर्ता, $ पासवर्ड); // चेक स्क्रिप्ट $ html = जांच ('https: //example/home.aspx'); $ Dom = नया DOMDocument (); @ $ Dom- & gt; loadHTML ($ एचटीएमएल); $ Xpath = नया DOMXPath ($ dom); $ Value = $ xpath- & gt; क्वेरी ('// लेबल [@ id = "ctl00_ctl00_PageContainer_MyAccountCpuContainer_symPercent"] / निम्न- sibling :: text ()') - & gt; आइटम (0) - & gt; nodeValue; अगर (($ value & gt; = $ lower_boundary) & amp; amp; & amp; ($ मान & lt; = $ upper_boundary)) {$ result_string = "चेक किया हुआ" $ उपयोगकर्ता ":"। $ पासवर्ड "सीपीयू शांत दर:"; गूंज "लाइव - $ result_string $ value"; // मिटा कुकी सामग्री साइनआउट (); } Else {गूंज "डाय - $ उपयोगकर्ता $ पासवर्ड $ मान"; }}? & Gt;   

      मैं डेटा की एक सरणी भेजना चाहता हूं जिसे मैं कॉपी और एक टेक्स्ट बॉक्स में चिपकाता हूं जैसे कि

        उपयोगकर्ता: पास उपयोगकर्ता: पास उपयोगकर्ता: पास उपयोगकर्ता : पास उपयोगकर्ता: पास उपयोगकर्ता: पास उपयोगकर्ता: पास उपयोगकर्ता: पास उपयोगकर्ता: पास उपयोगकर्ता: पास   

      मुझे यह एआरएक्स चाहते हैं कि मेरी एफ़एक्स फ़ाइल को एजेक्स का उपयोग करके भेजा जाए ताकि यूजर को उपयोगकर्ता नाम मेरे कर्ल स्क्रिप्ट पर जाता है और पासवर्ड में जाने के लिए पासवर्ड यहां जाता है तो फिर मेरे परिणामों को सरणी में 1 1

      आपकी पोस्ट आपको यह नहीं बताती कि आप jQuery का उपयोग कर रहे हैं या नहीं, लेकिन मैं इसे अत्यधिक अनुशंसा करता हूं। इसके साथ आप ऐसा कुछ कर सकते हैं:

      HTML फाइल

        
      
      
      
              

      Question: I am receiving "strange" character output. I am thinking that one How to obtain regular outputs seen in potty session

      "funny" I mean I should see this:

        testfile.txt   

      And I'm looking into this:

        [01; 32mtestfile.txt [00m   

      This is similar to the answer, the problem does not satisfy my need. Answer: To call the channel set, set is setPty (false) , Which completely removes the "pseudo-terminal", but in real time I should have the output of the channel shell. Here's an example of what I'm doing:

        ChannelShell channel = (channel shell) session.openChannel ("shell"); Channel.setOutputStream (new printstream (New BytereOnputStream), true, "UTF-8") {@ Override Public Wide List (Byte [B], int, off lane] {super.written (b, off, lane) ; String output = new string (b, off, lane); system out. Print (output); sendNextCommand (output); // next command depends on the output executed, this is why I do not need it .}}); PipedInputStream = new pipe inputtream (); ChannelInput = New PipedOutputStream (in); (In) channel.setInputStream; Channel.connect (); While (! Channel.isClosed () & Channel WaitRetries ++   

      sendNextCommand method is to see that Basically, when I look at something like this: [user @ server ~] $ then execute it: ls should return it: testfile.txt but instead return it Yes: [01; 32mtestfile.txt [00m (Note: I can not copy and paste the first character, but this is a box, four of 27 code which I think is an escape character ).

      Now I will usually just get rid of this kind of thing, but I want to get it properly, and it also seems that there is a number of variants for the variants, so I am here I hope you can help :)

      Note: I will call it my Windows machine I am running through my IDE (an eclipse rip) through the medium, but I have tried debugging and variable outputs. In fact, "funny" character shows I just want to make sure that this is only the IDE I have also tried to show it in JOptionPane.messageDialog to ensure that it is still not a letter. Thanks!

      Yes, these are ANSI escape sequences, in the case of ls

      ls has a - color = never option, which should resolve specific ls < P> Calling ChannelShell.setPtyType ("dumb") can also help (untested). You may have to look around to find a terminal type that disables the escape sequence.

      For any particular reason, you can fire ls instead of using Java methods to check directory contents?

    java - How to write Unit test with Mockito -


    I have a simple controller, which I want to write a Mokto unit test. Here's the code:

      Personal End User Controller userCtl; Get public string (last model model) {return.userCtl.getLoginForm (model); }   

    This is my test:

      @ mock private model model; Private DefaultControllerImpl Suite; @ Before public zero setup () {this.ctl = new DefaultControllerImpl (this.userCtl, this.authService, this.org service, this.riskSpaceService); This.ctl.setMessageSource (this.messageSource); } @Test Public Zero TestGate () {Final String View = this.sut.get (this.model); AssertThat (see) .isEqualTo (UserController.LOGIN_PATH); }   

    However, this test always gives blank. How can I go about writing a proper unit test for this controller?

    You can not say what is null But I believe that you do not have any mask, so you have to declare the following runners on your test class:

      @RunWith (MockitoJUnitRunner.class)   < P> However, I can not see the test. For example you are not asking to return anything  usrCtl  to getLoginForm (...) , so it By default  null  will return - maybe this is the The reason is that you are seeing  null   
      given (userCtl.getLoginForm (model))  

    usrCtl copy To return, return the value you want: .willReturn (UserController.LOGIN_PATH);

    For more information and examples, if you have not already done so, then you should take a look.

    xslt - XSL 2.0 Transform XML files while preserving folder structure -


    I have a XSL Transformation functioning to change a bunch of XML files from one format to another, though I now have two unresolved problems:

    1) First, when I change the files, I need to adjust my parameters in style sheets to target only files with more than 7 characters for;

    2) Secondly, I should be able to change all the files while preserving the folder structure of source files. I was thinking that there is no way to preserve the same folder structure from the source folder. All files are located in named folder based on the alphabet, such as A, B, C, D, F .... so I have to convert all the files in folder A and put them in the new folder named A. The files are also named after alphabetical order.

    Here is my style sheet:

       & Lt; Xsl: Ultimate name = "files" select = "archive ('../dit./b.??list==.data; rears = yes')" /> & Lt ;! - & lt; Xsl: variable name = "filename" select = "concat ($ files, status (), 'subject')" /> - & gt; & Lt; Xsl: template match = "node ()" & gt; & Lt; Xsl: copy copy-namespaces = "no" & gt; & Lt; Xsl: apply-select template = "node ()" /> & Lt; / XSL: Copy & gt; & Lt; / XSL: Templates & gt; & Lt; Xsl: template match = "/" & gt; & Lt; Xsl: each selection = "$ files // theme" & gt; & Lt; Xsl: if test = "string-length length (files) & amp; 10;" Gt; & Lt ;! - Not working, its purpose is to drop all the files whose length is less than two letters - & gt; & Lt; Xsl: select value = "text ()" disable-output-escaping = "yes" /> & Lt; / XSL: If & gt; & Lt; Xsl: result-document href = "output DITNEU / B / {title / text} | title / b / text ()} .diet" & gt; & Lt; Glossentry id = "{concat ('test', generate-id ())" & gt; & Lt; Glossstorm id = "{conat ('test_title', generated-id ())}" & gt; & Lt; Xsl: Select Value = "Title" /> & Lt; / Glossterm & gt; & Lt; Glossdef> & Lt; Xsl: each-select = "body" & gt; & Lt; XSL: implemented-templates / & gt; & Lt; / XSL: for-each & gt; & Lt; / Glossdef> & Lt; / Glossentry & gt; & Lt; / XSL: Results-Documents & gt; & Lt; / XSL: for-each & gt; & Lt; / XSL: Templates & gt; & Lt; / XSL: stylesheet & gt;   

    Thanks.

    (A) Choose = *. Dita is actually a regular expression that has a mask in the form of a globe, and you select = [A-Za-z0- 9] {7,}. Dita should be able to use something like . / P>

    (B) function Documents-Yuri () The input file applied to a file returns the URI if known, and requires you to require the output file name.

    sql server 2012 - Stored procedure: take rows with summary resilts and place them in output parameters -


    एक साधारण क्वेरी ले

      SELECT SUM (Field1), FieldName से TableName GROUP BY फ़ील्ड 2   

    मेरे मामले में मुझे पता है कि फ़ील्ड 2 (1-5) के लिए मैक्स 5 अलग-अलग मान हैं, इसलिए यह क्वेरी अधिकतम 5 पंक्तियां वापस देगी (कम हो सकती है, यदि उदाहरण के लिए, फ़ील्ड 2 मान = 2 के साथ कोई रिकॉर्ड नहीं है।)

    मैं किस चीज़ में दिलचस्पी है, वह SUM (field1) से OUTPUT पैरामीटर, Field2 मान के आधार पर होता है। वर्तमान में मैं यह संग्रहीत कार्यविधि (सरलीकृत) से करता हूं:

      SELECT @ PRM1 = SUM (फ़ील्ड 1) से तालिका नाम WHERE फ़ील्ड 2 = 1 SELECT @ PRM2 = SUM (फ़ील्ड 1) से तालिका नाम WHERE Field2 = 2 SELECT @ Prm3 = SUM (फील्ड 1) से तालिका नाम WHERE फ़ील्ड 2 = 3 SELECT @ PRM4 = SUM (फ़ील्ड 1) से तालिका नाम WHERE फ़ील्ड 2 = 4 SELECT @ PRM5 = SUM (फ़ील्ड 1) से तालिका नाम WHERE Field2 = 5   < P> क्या इस को प्राप्त करने का एक बेहतर तरीका है?  

    संपादित करें: यह संग्रहीत कार्यविधि 10 से अधिक क्वेरी निष्पादित करती है और उनमें से प्रत्येक से सारांश प्राप्त करती है मैंने ग्राहक से 10 + विभिन्न प्रश्नों को अलग से निष्पादित न करने का फैसला किया है, लेकिन उन्हें एक संग्रहीत कार्यविधि में रख दिया है और फिर आउटपुट पैरामीटर के माध्यम से परिणाम लौटाता है। उन प्रश्नों को केवल एक बैच के रूप में, उन्हें अकेला फोन करने का कोई उद्देश्य नहीं होगा। हालांकि, अगर आपको लगता है कि यह एक अच्छा विचार नहीं है, तो मैं आपकी बहस को सुनूंगा।

    आप यह सशर्त SUM ()

      SELECT @ PRM1 = SUM के साथ किया जा सकता है (मामले में फ़ील्ड 2 = 1 THEN फ़ील्ड 1 ELSE NULL END), @ PRM2 = SUM (मामले में फ़ील्ड 2 = 2 THEN फ़ील्ड 1 ELSE NULL END), @ PRM3 = SUM (मामला जब फ़ील्ड 2 = 3 THEN फ़ील्ड 1 ELSE NULL END), @ PRM4 = SUM (मामले में फ़ील्ड 2 = 4 THEN फ़ील्ड 1 ELSE NULL END), @ PRM5 = SUM (मामला जब field2 = 5 THEN फ़ील्ड 1 ELSE NULL END) से तालिका 1   

    यहां डेमो

    asp.net - Linq check if value exists otherwise set default value -


    अरे मेरे पास निम्न क्वेरी है

      public int GetDefaultCurrencyFor ऑर्गनाइजेशन (स्ट्रिंग संगठनआईडी) {वापसी (_dataContext.allocations में से जहां a.organizationId.Equals (organizationId) एक क्यूरीआईडीआईडी ​​चुनें) .SingleOrDefault (); }   

    जो कई कंपनियों के लिए कुछ भी वापस नहीं लौटा सकता है, और यह मैं वापसी के लिए 4 का मान सेट करना चाहता हूं। बस सोच कर कि मैं ऊपर कैसे जोड़ सकता हूं?

    कोशिश करें DefaultOfEmpty (4) निर्दिष्ट करने के लिए SingleOrDefault के बजाय एक मान:

      सार्वजनिक int GetDefaultCurrencyFor ऑर्गनाइजेशन (स्ट्रिंग संगठनआईडी) {वापसी (_dataContext.allocations में से) जहां a.organizationId.Equals (organizationId) एक क्यूरीआईआईडीआईडी ​​चुनें।) डीफॉल्ट IFEmpty (4) एक(); }   



    javascript - Place PHP results inside HTML page -


    I have a PHP file that has code to echo some HTML, I want to provide a PHP file to some end users I can be done this way:

      & lt; Php include 'file.php'; ? & Gt;   

    Unfortunately for my users the example index.html and this will not work. I do not want to tell my users to change the HTML file in PHP. Another way is to modify the .htaccess file:

      & lt; Files index.html & gt; AddType application / x-httpd-php .html & lt; / Files & gt;   

    I do not want to ask them about it too. So what are my other options? Is it possible to show resonant results in HTML file? Maybe with the help of some javascript?

    You can do this with AJAX. It may seem a bit daunting, but compared to a lot of thinking it is very simple. In fact, it is very easy.

    Ajax goes into your Javascript code, and looks like this:

      $ ('# stselect'). Change (function () {var sel_stud = $ (this) .val (); // Alert ('You chose:' + sel_stud); $ .ajax ({type: "post", url: "your_php_file.php", Data: 'theOption =' + Sel_stud, success: function (whatigot) {warning ('server side response:' + whatigot);} / / END success fn}); // end $ .jax}); // END dropdown change event   

    Note that the data of the PHP file comes in your HTML document in the success of AJAX calls , and Wherever should be dealt with, this is where this is where you put the data in the DOM.

    For example, suppose that there is a DIV with your code in the HTML document id = "myDiv" to insert data from PHP into the HTML document, change the line : Warning ('server side response:' + whatigot); with:

      $ ('#myDiv') HTML (whatIgot).   

    Presto! Your DIV now has the resonant data from the PHP file.


    Ajax can be started with a control value (as in the example given above), or simply on document load:

      $ (Function () {// warning ('document is ready'); $ .ajax ({type: "post", url: "your_php_file.php", data: 'iemsending =' + this_var_val, success: function (whatigot) {// Alert ('server-side feedback:' + whatigot);} / / END success fn}); // END $ .jax}); // END document.ready   

    Look at the ideas on how it works.

    Note that the above examples use jQuery, and therefore tags for this reference are required for your page: