Monday 15 June 2015

c# - How do I get a DataRow from a row in a DataGridView -


I am using a database of Windows Forms DataGridView . How do I get a user from the selected row in DataGridView from DataRow to DataTable ? What is its source?

  datetime line = (DataRowView) DataGridViewRow.DataBoundItem) .Rao  < / Pre> 

Assume that you have made a simple DataTable .

  MyTypedDataRow line = (MyTypedDataRow) (DataRowView) DataGridViewRow.DataBoundItem). Row  

assuming that you've forced a typed dataset.

See for more information.


java - Data-driven tests with jUnit -


What do you use to write data-driven tests in jUnit?

(My Definition) Data-driven Examination is an examination that reads data from some external source (file, database, ...), per line / file / whatever executes a test, and Displays the results in a test runner as you have different tests - the result of each run is displayed separately, not in a huge total.

In JUnit4 you can use teststars to perform data-driven tests.

This is not very well documented, but the original idea is annotated with a static method ( @Parameters ) that gives collection of object arrays. Each of these arrays is used as a logic for the test category creator, and then the normal test methods can be run through the set field in the constructor.

You can write code to read and parse the external text file in the @Parameters method (or get data from another external source), and then you can test You can add new tests by editing this file without recreating them.


why am I getting 'could not find gem rails locally...' when trying to upgrade InstantRails2.0 to rails 2.3? -


Full error message "Could not get rail gem locally or in the repository" About Rail Upgrade Have read and there is no information about this error. I'm running on WinXp Rail Wiki said that I should first update_rubygems, and it appears that I was able to do this successfully. My Ruby version is 1.8.6. I forgot this special mistake and I am convinced that gems are included in gem sources. Rubyonrails.org, which does mine.

Any suggestions? What other environmental information do I need to provide?

If I have problems, then is there any way to download and install the latest version of Rail?

I am not very familiar with the tracks immediately, but it seems that the Rail 2.0 has not been updated. is.

There is a problem here, whose railway from Gitul finally resolved it.

If that does not work, it's been a while since I've developed the railways on windows, but if you update your version of Ruby Gems (described in the link) So the rail should work to install and update the following:

  Installed Rail Rail  

If this does not work, I will uninstall and install it on the basis of it. This will get you setup to create a suite of built-in window and server window that comes with the rail (WEBrick or mongrel if you install the gem). Whether you do not need a server for the development of heavyweight DBS and developers - just a hassle.

If you want to use Windows as a server platform then some things may be a bit complicated. I did this for a while some years ago, but it was such a pain that Why I learned Linux, and it was worth good when I did it on Windows, so I used to install my own SQL and Apache.


Is there any open-source library that can be used to search the Deep Web? -


Is there an open-source library that can be used to search?

Metadata is the Open Archive Initiative Protocol for Harvest that uses HTML on XML. You can find it here:

Apart from this, deep web (also called the DeepNet, invisible web, dark web or hidden web) refers to the World Wide Web content, the surface of the web Not part of indexed by standard search engines.

Commercial search engines have started looking for alternate methods to crawl deeper web. Sitemap protocols (previously developed by Google) and Mod OE systems allow search engines and other interested parties to search deep web resources on particular web servers. Both systems allow web servers to advertise URLs that are accessible on them, allowing automatic search of resources which are not directly connected to the web. Google's deep web surfing system prepares presentations for each HTML form and combines the resultant HTML pages into the Google search engine index. Results of front results for one thousand queries per second for deep web content In this system, submission is pre-computed using three algorithms:

(1) Accepting Keywords Select input values ​​for text search input,

(2) Identify the information only for a specific type of value (e.g., date), and

(3) less input By selecting combinations, the web search index Switch to generates the appropriate URL for inclusion.


actionscript 3 - Type cast error in dispatchEvent -


I have three sections: A, B, C Class A transmits an event, square B handles it and then it will send it. However, I found this strange type of casting error in the transmission function of B, which looks like this:

  Public function handler (Event: some avent): zero {removeEventListeners (); DispatchEvent (event); }  

If I change it to the following, I do not get any errors:

  Public function handlers (Event: SomeEvent): Zero {removeEventListeners (); Var newEvent: SomeEvent = event.clone (); // Send a clone of yourself Event (new event); }  

Can anyone help me on this? Thank you.

Are you using a custom event? If you are, you need to define the clone method. When you "redirect", Event Flash automatically clones the event and sends the clone. This is the reason why you change your code to event .clone () This works. So, in a nutshell, your second implementation is right.

If you do not want to write that extra bit code, you should apply the clone method. Documents of EventDispatcher.dispatchEvent () show this:


.net 3.5 - Visual studio 2008 - Referenced project dll -


I've got a project named by my project name. And in this project I refer to another project named MyProject.Models.

MyProject.Models is a reference to MySQL.Data.dll. In the reference option, the local copy is set to true.

My problem is that manually MySql.Data.dll must be added to the project in MyProject.Views. Which I think is not a great idea, I would just like to add that dll project to MyProject.Models because it requires the project which is dll ...

This means that MyProject.Models is highlighting something in its public interface, which has some reliance on MySql.Data.dll - for example, a class that MySql.Data.dll is derived from some, or a type of property defined in MySql.Data.dll if you are using MyProject , You see the compiler error you receive. The reference to the scenes MySql.Data.dll should help you track down what the dependency is: I think it tells you what's happening in MySql.Data, but it should be expected that you have the model project You can give an idea about it, depending on it.


.net - Team Foundation Build - resolving cross solution project references -


We have a shared project referenced in many solutions, that is when TF faces built-up reasons:

'Error MSB3202: Project file "...... \ trunk \\\ sharedproject.csproj" did not get' '

In the form of directory structure on the build server, it is fine that the source control Is not mirrored. Is it possible to modify the build file to search in a specific location for this project?

Perhaps you consider adding a DLL reference to a shared project instead of a project reference, and After that, include Dell in your source control. If this is not an option, you can always create another solution file that refers to the correct path of the Share Project file on your build server, and that build is a solution on your server uses it. I am bowing down to the DLL reference, however, the option is difficult to maintain for two long periods.

Hope it helps.

/ Klaus


assembly - Complete x86/x64 JIT Assembler for C Language -


Do you know just a few things, but are embeddable in the C program?

  • And compiled module with dlopen ing - it works everywhere!

  • How to get jQuery UI to work from a Firefox extension -


    I have tried to connect with jquery and jquery ui communities (email list, IRC) other than Google and more experienced Colleagues, but nothing has proven useful. I've found stackoverflow useful in the past, so maybe someone will have to face it first.

    My problem is this: I want to include the jQuery UI in my extension.

    This is not as easy as self service page scripts because I need to provide specific context for UI widgets.

    jQuery can be started with a specific reference that the JQuery UI can not do. Thus, I wrapped the UI code with the function that takes the example of a correctly referenced jQuery .

    Issue: Whenever the UI code creates a jQuery instance, such as $ (""), this.element that newly created element has been overwritten.

    this.element should be, for example, when the slider div creates the slider widget initialization handles, then this. Element is still considered the slider div, not handle ... to handle. Correctly raises an error in itself.

    "This" widgets may be messed up ... jQuery UI or jQuery can directly reference themselves directly elsewhere, and thus using the relevant jQuery I do not use everywhere Is doing this ... jQuery UI can not be re-entered or something like this ... I have no idea.

    I would be very grateful for any help you can give me. I'm learning a lot from debugging this problem ... but I'm definitely ready to get this work done and I'm already moving forward.

    I posted the relevant code snippet in the post for the mailing list of the jQuery Uses

    ps - Suppose we can not fix this problem. what will you do? Right now I just want to work on the sliders. Not sure about the future, as the effect? Datepicker?


    java - hibernatetemplate clear ehcache? -


    <पूर्व> & lt; ehcache & gt; & Lt; cache name = "query.ContactInfoList" maxElementsInmemory = "200" अनन्त = "सच" ओवरफ्लो टोडिक्क = "झूठी" समयओएडलेसेकंड = "300" समयओटोस्वाइसेकंड = "600" / & gt; & Lt; / ehcache & gt; सार्वजनिक सूची getContactInfoList () {हायबरनेट टेम्पलेट। सेटकैच प्रश्न (सत्य); hibernateTemplate.setQueryCacheRegion ( "query.ContactInfoList"); सूची सूची = हाइबरनेटमेटलेट.फ़ीड ("एडीओकॉन्टेक्टइन्फो से जहां सक्रिय = 1"); hibernateTemplate.setCacheQueries (गलत); वापसी सूची; }

    हो सकता है कि मैं saveupdate कॉल करने के दौरान query.ContactInfoList के लिए साफ़ / रिफ्रेश कैश कैसे कर सकता हूं <

      हाइबरनेट टेम्पलेट .getSessionFactory ()। EvictQueries ("query.ContactInfoList");  

    उस कैश क्षेत्र को साफ कर देगा आप कैश किए गए क्वेरी डेटा को मैन्युअल रूप से रीफ़्रेश नहीं कर सकते;

    कैच क्षेत्र फिर से पॉपुलेटेड हो जाएगा (यदि सक्षम है)।


    php - preg_replace - array of individual replacements -


    I am trying to get the following:

    $ subject = 'ab A ';
    $ search = 'A';
    place of $ = '1';

    Desired Results:

    Array
    (
    [0] = & gt; 1 BA [1] => 1) )

    Is there any way to get it with preg_replace?

    preg_replace ('/ b'. $ Search. '(? = \ S + | $) / u', instead of $, array (subject $);

    )

    Cheers

    I think this is not possible . You can specify the limit of replacement in the optional fourth parameter, but it always starts from the beginning.

    It may be possible to achieve what you are looking for. All you have to do is split your strings on all the patterns of your search pattern, and after that you have to mess them together. If your search pattern is just a simple string, you can get it with explosion () If you need help locating this approach, then I would be happy to help.

    Edit : See that this works for you:

      $ theme = 'now A'; $ Pattern = '/ a /'; $ Place = 1; // We split the string on all our matches and receive matches, even $ parts = preg_split ($ pattern, $ theme); Preg_match_all ($ patterns, $ theme, $ match); $ NumParts = count ($ parts); $ Result = array (); ($ I = 1; $ i  gt; & amp; $ value), if {if ($ index! = $ I & amp; $ index! = 0) $ Value = $ matches [0] [$ index - 1] $ Value; } // Bring it back together now $ result [] = implode ('', $ partsCopy); } Print_r ($ result);  

    Note: this has not been tested yet. Please report that this works.

    Edit 2 :

    I tested it with your example, now decided some things and it works now (at least that Examples).


    c# - ASP.net fileupload realy slow -


    We are currently building an online music store for administrators who want to upload songs and previews on the website Allows The problem is that uploading songs to our website takes about 3 or 4 minutes. Is this normal? Can anyone tell me that I can ask the website's hosts to tell this because our customers are not really happy to upload 100-200 songs, whose website is about 300-800 minutes, 5 -13 hours: OP.

    Here we have that. Webf.config is kept in:

      & lt; HttpRuntime maxRequestLength = "20480" Execution Time = "240" />  

    thanks

    The first step is to check the host bandwidth limits is . Is it described in a service agreement or similar? Ask them. If you have access to the host server, you can use a variety of speed test devices or simply transfer files independent of your application.

    The other thing is that the bandwidth of the client bandwidth ISP's bandwidth (downstream and upstream), any limit or throttling, whether the speed during the day (or night) varies at different times? This is going to be fastest as the fastest link in the series, and if it includes DSL / cable, remember that these are often asymmetric, and if this happens then it is very slow on the upstream compared to the downstream .

    If host and client bandwidth are OK, then start seeing the configuration of the application.


    jquery fails while page loads with xmlhttprequest -


    How do I apply jquery to php page filled with XML? I have tried to do this, but when the php page is loaded with xml, then what should i do that jquery can work after the page is loading.

    If you load an excerpt on the page, you only do that: the content of that page Load if the scripts are loaded in the page, they will not be executed which you want here.

    So in fact, the best advice I can give here is the architecture. Is it possible that you have a loaded script in the page which is loading the Xhore instead of the target page? A terrible idea will have to be parsed xhr.responsetext and to eval them to find script blocks. A dirty solution, but one that is widely used for performance reasons, is to send a xhr separately for javascript files, and eval () them.


    networking - How can I find all locally bound IP addresses in Java? -


    I have an array of locally bound IP addresses, basically java.net.InetAddress. I know that I can call InetAddress.getAllByName () with the host name, but I was wondering if there is another direct method in which the knowledge of the DNS and / or host name is not included.

    java.net.NetworkInterface.getNetworkInterfaces () An enumeration will allow you to invite getInetAddresses () on each network interface to get the addresses associated with this interface.


    sql - Select `n` last inserted records in table - oracle -


    Unfortunately, the sequence used to generate the key for some other tables is the primary key generated in sequence in the table. (I did not design it and I can not change it).

    What is the fastest way to enter the last n , what is the order in Oracle, ordered by ID (placed on top) in descending order?

    n is a relatively small number - the number of records displayed on the page - probably not greater than 50

    The table now has 30.000.000 records

    edit:
    In response to a comment: This question was inspired:

    With the execution plan for the query:

      Select from the MyTable order based on priority  

    The execution plan was:

      - ------------------------------------------- - | ID | Operation | Name | --------------------------------------------- | 0 | Select Command | | | 1 | Sort order by | | | 2 | Table access complete. Mitebab | ---------------------------------------------  < / Ex> 

    I was surprised that Oracle wants to scan and sort the entire table when it has an index on the sort field.

    Uses the query index from the accepted answer and sorts.

    Editing 2:
    Comment again APC: was the part of the trim, which surprised me I expected the Oracle to retrieve the rows in the expected order Will use. Execution plan for query: Choose from

      * (choose * from arh_promjene command to promjena_id desc) x where rownum & lt; 50000000  

    The full table uses index instead of access and sort (notice status rownum <50.000.000 - this table and recorded in Oracle Knows more than the number that he should get all the records from the table). This query returns all the rows as the first query, but with the following execution scheme:

      | ID | Operation | Name | -------------------------------------------------- ----- | 0 | Select Command | | | * 1 | COUNT STOPKEY | | | 2 | See | | | 3 | Table access by INDEX ROWID. Mitebab | | 4 | Index Full scan designing. SYS_C008809 | Retrospective information (identification by operation ID): ----------------------------------------- ---------- 1 - Filter (ROWNUM & lt; 50000000)  

    It was unusual for me that Oracle was making separate execution plans for these two questions Set which are essentially returning the same results.

    Edit 3: Remarks of Amok:

    Oracle does not know that 50M is more than the number of rows, of course, there are statistics in it , But they can be old and wrong - and Oracle does not allow himself to give wrong results because only the figures are wrong.

    Are you sure? In Oracle editions, it was recommended to manually update the data from time to time up to 9. Oracle updates statistics automatically since version 10. If Oracle does not use it for query optimization, then what is the use of data statistics?

    Use ROWNUM :

      Select * to (choose from foo order * by bork) x where ROWNUM < = N  

    Note that rownum applies before sorting for a subquery, that is why you have two nested queries If needed, otherwise you will only get the random rows.


    import - how to reference python package when filename contains a period -


    I am using django and I have a model named models. Admin.py and I want to model the following ideas. However, I get a syntax error for double quotation marks: Py:

    ad.example.com.

    But if I do not just give any modules by name of the models then I get "importError: Module named Administrator"

    What to import from a Python file Is the way (there is a duration of its name)?

    Basically, you can a module with an invalid name Import But you have to use it for, eg Assuming that the file has been named models.admin.py , you can

      import with import ('models.admin.py', 'Rb') as FP: Models_admin = imp.load_module ('models_admin', fp, 'models.admin.py', ('.py', 'rb', imp.PY_SOURCE))  

    But read the docs and before you start using it.


    caml - SharePoint field not showing in Display/Edit/New pages -


    I have written a schema for a list which will only add one column to the default custom list, which is a number field. The area called is shown on the default view and is actually built on the list. This list is autopopulated with values ​​that are set correctly. The problem is that the field does not appear on display / editing / new pages, it can be set through datasheet view. I do not understand why I'm not showing this especially when setting in schema.

    Lots of suggestions will be preferred.

      & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; List xmlns: ows = "Microsoft SharePoint" title = "review duration" folder credential = "wrong" direction = "$ resource: instructions;" URL = "Listings / Review Duration" type the content enabled = "true" baseipip = "0" & ​​gt; & Lt; Metadata & gt; & Lt; CONTENTTYPES & gt; & Lt; ContentTypeRef id = "0x01" & gt; & Lt; Folder target name = "item" /> & Lt; / ContentTypeRef & gt; & Lt; / CONTENTTYPES & gt; & Lt; Fields & gt; & Lt; Field id = "{B99EB797-4057-4a75-90BF-B40D0F89A9D9}" type = "number" decimal = "0" min = "0" max = "100" percent = "wrong" name = "month" required = "TRUE "Group =" SEED "DisplayName =" month "static name =" months "Show INDISplayForm =" TRUE "ShowInEditForm =" TRUE "ShowInNewForm =" TRUE "& gt; & Lt; / Field & gt; & Lt; / Fields & gt; & Lt; View & gt; & Lt; View BaseViewID = "0" type = "HTML" WebPartZoneID = "Main" DisplayName = "Default View" DefaultView = "True" SetupPath = "pages \ viewpage.aspx" ImageUrl = "/ _ Layout / Image / General" URL = " AllItems.aspx "& gt;  

    ... hidden stuff ...

      & lt; Viewfilled & gt; & Lt; FieldRef Name = "LinkTitle" & gt; & Lt; / FieldRef & gt; & Lt; FieldRef name = "month" & gt; & Lt; / FieldRef & gt; & Lt; / ViewFields & gt; & Lt; Query & gt; & Lt; OrderBy & gt; & Lt; FieldRef name = "title" & gt; & Lt; / FieldRef & gt; & Lt; / OrderBy & gt; & Lt; / Query & gt; & Lt; / View & gt; & Lt; / View & gt; & Lt; Form & gt; & Lt; Form Type = "DisplayForm" Url = "DispForm.aspx" SetupPath = "pages \ form.aspx" WebPartZoneID = "Main" /> & Lt; Form Type = "EditForm" Url = "EditForm.aspx" SetupPath = "Page \ form.aspx" WebPartZoneID = "Main" /> & Lt; Form type = "newform" url = "newform.expx" setuppath = "page \ form.expx" webpages = "main" /> & Lt; / Form & gt; & Lt; / Metadata & gt; & Lt; / List & gt;  

    The issue is that you add fields to the list, but at the same time the content Enable the type and specify that the item (0x01) is to use only the content type, in which the field is not included, then you are adding / editing the item and then you do not get the field.

    There are two solutions:

    1. Do not enable content types (and still
    2. Create a new content type with the field and instead of adding that content type, the item

    linux - How to make this sed script faster? -


    I have inherited this Sid Script snippet that tries to delete some spaces:

      s / [\ S \ t] * | / | / Gs / | [\ S \ t] * / | / Gs / [\ s] * $ // gs / ^ | / Null | / G>  

    that runs on the file which is about 1 GB big This script runs on our Unix server for 2 hours Any idea how to speed it?

    The note that \ s stands for one place and stands for one tab, the actual script uses the actual space and tab and not the symbol

    Input file is a pipe delimited file and locally not on the network 4 lines sed -f

    In the file executed with

    I, this script was:

      s / [\ s \ t] * | [\ S \ t] * / | / Gs / [\ s \ t] * $ // s / ^ | / Null | /  

    In my tests, it ran approximately 30% faster than your SAD script. The increase in functioning comes from the combination of the first two regensons and the addition of the "G" flag, where it is not needed.

    However, there is only a slight improvement by 30% faster (it's still one hour and one half to run the above script on your 1GB data file) I want to see that I can do better I am

    Finally, there was no other method I did not try (other methods with AJAX, Pearl, and SAD) except for any better performance, of course - expecting a plain ol ' The code is a bit different for posting here, but if you want a program that is probably faster than any other method, you might want to.

    In my test, about 20% of the implementation of C takes it for your sed script, so it can take about 25 minutes to run on your Unix server.

    I did not spend too much time in optimizing C implementation. There is no doubt that there are many places where the algorithm can be improved, but clearly, I do not know whether it already It is possible to distinguish a significant amount beyond the receipt. If anything, then I think that definitely you can expect from other methods (SAD, AJK, PRL, Python, etc.) but have an upper limit.

    Edit: There was a minor bug in the original version, as a result of which it might be possible to print the wrong thing at the end of production (for example "blank" to be printed) Could not be there). I had some time today, to see it and decided that I have also optimized the call on strlen () which gives it a little bit performance.


    iphone - Is there a function that triggers UIImagePickerController to take a photo? -


    I would like to trigger the camera with a non-standard button

    Which functions do I trigger for the camera?

    When you use the UIImagePickerController's overlay visual property to specify your own scene, You can use the -PicturePicture method to trigger the camera to take a picture is a reference, hope it helps


    Detect in Xcode iPhone project whether I'm building for simulator or device? -


    Can I compile conditionally in my app, based on whether I made it for simulator or device Am I (My app has a hook on an external server: If I'm running on the device, I want to connect to the local host; if I'm running on the device, then I want to go to my production server.)

    I'm looking for some #ifdef variables that I know, or anything at runtime ... does not matter.

    Thank you.

      #if! (TARGET_IPHONE_SIMULATOR)  

    Or, alternatively,

      # (TARGET_OS_IPHONE)  

    will tell you whether You are running on the device. To make this work, you must include the

    # "TargetConditionals.h"

    file that you can find.


    ruby on rails - Mysql query optimization -


    I am working on a rail project and am killing a display problem. Here is the simplified database schema

     table gaming_platforms (~ 5 rows) ID table game (~ 10k rows) ID gaming_platform_id winner (Black or White or N / A) black_id => online_players.id white_id => online_players .id table online_pair (~ 1 rows) id gaming_plamat_id user name 

    is now given a username, I want to display those players whose names match the input, without any They have played, have won or have lost

    I have made 3 ideas to avoid the problem of 1 + n

     or as the place of online_player_games Please select online_player_id online_players.id, counting (*) as the game left the game from joining online_players at games.gaming_platform_id = online_players.gaming_platform_id and (games.black_id = online_players.id or the game .white_id = online_players .id) group by online_players.id; Or as online_player_id form, the online_players.id selection count (games.id) online_player_won_games left the game from online_players as a place to play games.gaming_platform_id = online_players.gaming_platform_id and ((games.winner = 1 more games. Black_id = joining the game at online_players.id) or (games.winner = 2 and games.white_id = online_players.id)) group by online_players.id; Or, as the online_player_id form, online_players.id selection count (games.id) online_player_lost_games left the game from online_players as a place of view games.gaming_platform_id = online_players.gaming_platform_id and ((games.winner = 2 more games. Black_id = joining the game at online_players.id) or (games.winner = 1 and games.white_id = online_players.id)) group by online_players.id; 

    takes 20 seconds to query against those views, without using any index. The query looks complex I'm not sure what indexes should I make. Any opinions or suggestions are very welcome.

    I think there are some general scalability problems with your design. As you add your winning count / loses will be enough work for your database from the perspective of an I / O.

    I recommend creating a table called player_record which is only player ID, win, loss, then create a stored procedure that is said to be when the game ends ( Like spGameFinished (game_id, winner, ..); ) That is why the stored procedure will be responsible for performing any tasks required for a game that is completed, and from those tasks One is that the player_record to update On which the winner is called based. I am convinced that when the game starts, you play games with 2 player IDs, but if you do not, then you will have to take the stored procedure along with the completion of those games.

    Once this happens, the queries that are needed to gather information about the loss of win / loss are small, it also allows you to manage the storage needs of the game different from players' records. (I.e. you can actually leave the old game without affecting users)


    c# - Access Enumerator within a foreach loop? -


    I have a list class, and I have to return my code to GetEnumerator () Override Counters Class This nominator class has two additional properties which will be updated as an analytics.

    For simplicity (this is not the right business case), assume that these properties were CurrentIndex and runningtotal .

    I can manually manage these properties within the foreground loop, but I will assign these uses for reuse, and the enumerator is considered to be the right place. / P>

    Problem: foreach hides all annamter business, so there is no such way, which is within a pre-statement statement, enter the current anneater so that Can I retrieve my properties? Or will I have to use the dirty old loop for the future, and the calculator has to manipulate itself?

    Strictly speaking, I would say that if you really want to do, You will need to call the gatenator and then manually control the calculator with some loops.

    Business is required without knowing too much about yourself, you can take advantage of an Iterator function, such as something:

      public stable IEnumerable & lt ; Decimal & gt; Unconscious value (list & lt; decimal & gt; list) {decimal move total = 0 m; Foreach (decimal value in the list) {// If the value is less than 1% of the ongoing number, ignore it if (current total == 0m> value> gt = 0.01M * running total) { RunningTotal + = value; Yield return value; }}}  

    Then you can do this:

      list & lt; Decimal & gt; Payment = new list & lt; Decimal & gt; () {123.45 m, 234.56 m, .01 m, 345.67 m, 1.23 m, 456.78 m}; Foreign currency (Daimler big payments in IgnoreSmallValues ​​(payments)) // Keep large payments so that I can remove all small payments in my small bank account. Mwahaha! }  

    updated:

    OK, so here is my follow-up with what I have said as a "fishing hook" solution . Now, I will add a disclaimer that I can not really think of a good reason to do something like this, but your situation may be different.

    The idea is that you simply "fishing hook" is the object (reference type) that you pass in your iterator function, the iterator function connects your fishing hook object, and whenever you have your own If there is a reference outside the code, then its visibility is what is happening to you:

      public class phishing hook {public index index}; Set; } Public Decimal Runtingtotal {get; Set; } Public Func & lt; Decimal, Bullet & gt; Criteria {receive; Set; }} Public stable IEnumerable & lt; Decimal & gt; Fishing hook artation (INN Merebel & lt; Decimal & gt; List, Fish hook hook) {hook.index = 0; Hook Wild Total = 0; Foreign currency (decimal value in the list) {// Hook object can define a benchmark representative, // which determines whether to leave the current value or not (hook.cremitia == faucet) hook Criterion (value)) {hook = Value; Yield return value; Hook.Index ++; }}}  

    You will use it like this:

      list & lt; Decimal & gt; Payment = new list & lt; Decimal & gt; () {123.45 m, .01 m, 345.67 m, 234.56 m, 1.23 m, 456.78 m}; Fish hook hook = new fish hook (); Decimal minimum = 0; Hook Classification = x = & gt; X & gt; Minute; // Leave any value equal to the minimum / minimum value of fixed foreach (decimal value in fishing hooks (payment, hook)) {// Minimum Update if (Price & Minimum) Minimum = Values; Console.light line ("index: {0}, value: {1}, running total: {2}", hook. Index, value, hook, running.); } // Results: Output Output: // Index: 0, Price: 123.45, Running Total: 123.45 // index: 1, value: 345.67, Running Total: 469.12 // Index: 2 Value: 456.78, Running total: 925.90 / / we have implemented what is left of the values ​​.01, 234.56, and 1.23  

    essentially, fish Pakdnehuk object that gives you some problems iterator. I received this question impression was that you need a way to access the inner workings of the iterator so you're in between can manipulate while running it again, when you run, but if it is not the case, So this solution can be exaggerated for your needs.


    asp.net - how can i redirect the page with AJAX? -


    I am using Infragistics controls in my application. If the user was removed from my application, then I want to redirect the user to authorize the page. I'm using the HttpContext method for redirecting the page but it is not working. I tried to replace the windows through java script, but it is not working well. Can someone help me to redirect the page to AJAX?

    Thank you for your help in advance.

    Are you using a button click event (or something similar) in your code?

    If so, then the reaction. Will Redirex (URL) work according to a non-AJAX request?


    sorting - Short Circuiting sort -


    मैं समझता हूं कि:

      head (मैप (2 **) [1 .. 999999])  

    क्या वास्तव में 2 ** 1 का मूल्यांकन करेगा, बाकी का कोई भी नहीं, लेकिन जो पुस्तक मैं पढ़ रहा हूं वह कहती है:

      head सॉर्ट सोमेलिस्ट)  

    सूची में सबसे छोटी वस्तु को खोजने की आवश्यकता होगी, क्योंकि इसका इस्तेमाल किया गया है। यह कैसे काम करता है? जहाँ तक मैं बता सकता हूं, यह सॉर्टिंग एल्गोरिदम मुझे पता है (जैसे बुलबुला सॉर्टिंग) के साथ असंभव होगा।

    एकमात्र तरीका मुझे लगता है कि यह काम करेगा अगर सॉर्टिंग एल्गोरिदम को पूरी सूची छोटी वस्तु की तलाश में है, और फिर उस आइटम के बिना सूची पर अवशेष। मेरे लिए, यह वास्तव में धीमी गति से लगता है।

    क्या यह फ़ंक्शन काम करता है, या फिर एक और सॉर्टिंग एल्गोरिदम है जिसके बारे में मुझे नहीं पता है, जो कि कम सर्किटिंग की तरह इसे करने की अनुमति देगा?

    यह:

    सूची में सबसे छोटी वस्तु को खोजने की आवश्यकता होगी, क्योंकि यह सब प्रयोग किया जाता है।

    ... वास्तव में यह कहना चाहिए कि फंक्शन को केवल कम से कम काम करने की आवश्यकता है कि सॉर्टिंग एल्गोरिथ्म की आवश्यकता को खोजने के लिए सबसे छोटा तत्व। उदाहरण के लिए, यदि हम अपने अंतर्निहित सॉर्टिंग एल्गोरिथ्म के रूप में त्वरित रूप से उपयोग कर रहे हैं, तो head Quicksort इष्टतम (!) चयन एल्गोरिथ्म के बराबर है जिसे '' के रूप में जाना जाता है, जो सबसे बुरी स्थिति वाली रैखिक है इसके अलावा, हम के - केवल चयन करके ले जा सकते हैं k Quicksort

    विकिपीडिया अपने एल्गोरिदम पर चयन एल्गोरिदम पर आलेखों को नोट करता है (मेरा जोर):

    क्योंकि सॉर्टिंग के लिए भाषा समर्थन अधिक सर्वव्यापी है, सरलीकृत दृष्टिकोण गति में इसका नुकसान होने के बावजूद अनुक्रमण के बाद सॉर्टिंग को कई वातावरण में पसंद किया गया है। वास्तव में, आलसी भाषा के लिए, यह सरल दृष्टिकोण आपको सबसे छोटी जटिल / सबसे बड़ी सॉर्ट (अधिकतम / न्यूनतम विशेष मामले के रूप में) के लिए संभवतः सबसे अच्छी जटिलता प्राप्त कर सकता है यदि आपकी तरह आलसी पर्याप्त है।

    Quicksort इस परिदृश्य में अच्छी तरह से काम करता है, जबकि Haskell (मर्ज सॉर्ट) में डिफ़ॉल्ट सॉर्ट बहुत अच्छी तरह से मेल नहीं करता है, क्योंकि यह क्रमबद्ध सूची के प्रत्येक तत्व को वापस करने के लिए कड़ाई से आवश्यक नहीं है । जैसा कि नोट्स:

    आलसी क्विकस्रॉर्ट

    O (n + k log k) कुल समय [1] में पहले के सबसे छोटे तत्वों के बैच का उत्पादन करने में सक्षम है [ P>

    जबकि आलसी विलय की आवश्यकता

    O (n + k log n) कुल समय [2]

    अधिक के लिए आप पढ़ना चाहें।


    javascript - close fancy box from function from within open 'fancybox' -


    Hi I want to be able to close fancyBox when all is open from within.

    I have tried the following but have not used any benefits:

      Function closeFancyBox (html) {var re = /.Element is inserted! / Gi; If (html.search (again) == 0) {$ .fancybox.close (); // warning ("foo"); }}  

    Fu will open in the dialog but will not stop any signals?

    Try it: Parents $ Fancybox.close ();

    See.


    compiler construction - Which most common extensions are there (or used) to ANSI C? -


    You can insert a link to the list of available matrix or extension for the main compiler. If none of these are available, you can write a list of extensions used in your favorite compiler.


    Concatenating Variable Names in C? -


    Is it possible to add variable names in C? Specifically, I have a struct that contains 6 similar variables, which are called class1 , class2 , class3 Say etc.

    I want to run a loop to assign a value to each variable, but I do not need to see that somehow adding variable name with the value of the loop counter How to do

    How can I do this?

    When you add yourself an integer suffix to the variable name, it seems that I should use an array

      struct mystruct {int class [6]; }; Int main (zero) {struct mystruct s; Int i; For (i = 0; i & lt; 6; ++ i) {S class [i] = 1000 + i; } Return 0; }   Note:  due to  class  a C ++ compiler will override this if you use this code in C ++ If you plan to compile in the form, then you have to understand a different name for that area. 


    C# library to clean up html -


    I was wondering if there is a library. To clean HTML and remove unrelated tags in an HTML document?

    HtmlTidy!

    For more details see the URL below:

    The source of the download / project is:

    I gave other links because it has information about a pure cover and hope to set everything, it helps!


    monitoring a range of cells inside of excel 2007 with C#/VSTO -


    I have a line in excel, I want to translate into an objectionable selection in C # for binding / event purposes. Therefore, all the accessor classes know that they are getting the latest data from the source axle sheet, how will this be done? Explanation: I am using an Excel add-in project, not a workbook project, so I'm not sure whether the XMLMappedRange control is an option or not. You have a few options by using

    1. From the class, you can access this event. . From the
    2. class, you can do this event (which uses the Microsoft.Office.Interop.Excel.DocEvents_ChangeEventHandler representative, which you have used in another comment).
    3. NamedRange class supports simple, only databasing through property, one example of which is shown in the discussion.
    4. Another possibility is control, which also supports the database.

    A good primer can be found here: using NamedRange and XmlMappedRange.

    I hope it helps ...

    Mike


    Finding definitions/references to C++ class members in Vim -


    I am using Vim for a C ++ project on which I have started working and I Spending time lately browsing through to the existing code to hang it. To make browsing easier, I have setup CTAg and CiscoP in VIM to jump in definitions and find references.

    However, I know that none of them is intelligent, to know which square is a member of the variable / function. For example:

      class squares; ... Square A; ... a.rotate (); The attempt to find the definition of the definition of   

    rotate () will also lift member functions from other sections, such as triangle i g] To bring a list of and fortunately ctags lists the affiliated class for each entry. However, when the same members are 200 squares with work, it can be tedious to hunt the right tags.

    In addition, if I am in the function definition:

      square :: rotate () {...}  

    < Try to find all calls to code> rotate () to use cscope, call triangle and other classes, 'Rotate function'

    For this reason, I jumped myself into the Visual Slide and then found to find the definition or reference of a member function or member variable. Can anyhow I complete it in good old insurance ?

    Maybe you need plugins. Try it


    iPhone game copyright and licensing -


    iPhone games that require special permission (copyright, trademark, etc.) by repeating the exact functionality and rules of popular ownership board games Prior to submission to the App Store for approval, relevant companies (Mattel, Hasbrow, Parker Brother, etc.)

    Like many things related to intellectual property and legal system, its not an easy answer Is not.

    Strictly speaking, you can not do copyright game mechanics. However, despite the trademark or copyright infringement in the form of the game or presentation, it can be difficult to 'clone' many games in this recognizable fashion. This is differentiating the other ethical views of cloning from existing games.

    As long as it is not really clear actually , the apple will probably accept it, though, if it is adequately recognizable, then it is possible that you can clone Conflicts and distractions from the IP owner of the game that do it.

    Therefore, making a game with a mechanism of monopoly that is identifiable as a monopoly clone is asking for a SmackDown to make some obscure board game games from a long time business company "secure "It is not possible, however, that someone is going to spend money to sue on a suspicious opportunity to win.


    antlr3 - Looking for Antlr 3 / C sample main() -


    I see some sample main (floating) for C, e.g. And

    This dereference seems aust I do not know what it is, and - Please forgive me - I do not want to if I can escape from it.

    I just want to define the instruments & amp; Grammar (for modem AT commands) and main () auto generated, or cut / pasted from anywhere.

    The slightest twist is that most of the examples read from the file, while I'm getting a series of input (AT command) as the string passed in the parameters.

    Can someone point me at a simple main (), which I can optimize (and possibly suggest to customize it to HO?) Ask a lot, sorry.

    AST is a "abstract syntax tree", and you do not need one for AT commands.

    In fact, ATNLR is overkill for parsing AT commands. Why not just check "AT", and then parse the command by hand? The modem command set is probably sufficiently simple that compared to ANLR, it would be as easy as doing it if you have never done it before.

    If you are implementing a complete AT command set, "++" escape sequence, time is also a factor that you will not be able to use alone ATRR.

    Answer to comments:

    It is advisable to see the ANLR as a tool to reduce bugs. In response to your questions, "Do you want to read it or have the codes prepared? And who you want to keep?", The answer is "It depends." I use both ANTLR and hand coded parser on the basis of reference; This is a reference where I will choose hand coded parser for some reason: perhaps an embedded application, relatively straightforward (not equal to many command complexity), a comics protocol you have a different context and clearly have its own reasons in which Includes "try it out"

    So, to answer your second question about a main topic: Yes, you can use one on the ANLR wiki. To read from a piece of memory usage, AntelR 3 NACCI String Inflestream () or AntelR3 NACCI String Copystream () (as appropriate) 3 ASCIIFileStreamNew () .


    Why is "-8+etch15" appended to this customer's PHP version string? -


    मेरे पास एक ग्राहक रिपोर्ट थी जिसमें PHP- # 38146

    P> मैंने var_dump (phpversion ()) किया और मुझे मिल गया:

      स्ट्रिंग (14) "5.2.0-8 + etch15"  

    क्या है -8, और + etch15, डेबियन संबंधित PHP के कुछ प्रकार का एक्सटेंशन? कठोर PHP या कुछ से संबंधित? क्या इसका मतलब यह है कि वे मूलतः 5.2.0 बिल्ड चल रहे हैं?

    डेबियन के दस्तावेज का यह खंड कुछ जवाब दे सकता है आपके प्रश्नों का: (उद्धरण ):

    पैकेज का संस्करण संख्या। प्रारूप है: [युग:] अपस्ट्रीम_वर्जन [-डिबियन_विवियन]

    और (उस पृष्ठ पर अधिक है, केवल इसके कुछ हिस्से उद्धृत) < / Em>:

    अपस्ट्रीम_वर्जन
    यह संस्करण संख्या का मुख्य भाग है। यह आमतौर पर मूल ("अपस्ट्रीम") पैकेज की संस्करण संख्या है, जिसमें से .DEB फ़ाइल बनाई गई है, यदि यह लागू है। आमतौर पर यह उसी प्रारूप में होगा जैसा कि अपस्ट्रीम लेखक (ओं) द्वारा निर्दिष्ट है;

    debian_revision
    संस्करण संख्या का यह हिस्सा अपस्ट्रीम संस्करण के आधार पर डेबियन पैकेज के संस्करण को निर्दिष्ट करता है। इसमें केवल अल्फ़ान्यूमरिक और वर्ण + हो सकते हैं ~ (प्लस, पूर्ण स्टॉप, टिल्ड)

    आपके मामले में, "5.2.0-8 + etch15" के साथ:

    • " 5.2 .0 "upstream_version
    • और" 8 + etch15 "debian_revision

    जिसका अर्थ है, जैसा कि आपने अनुमान लगाया है , कि आप PHP 5.2.0 चला रहे हैं।


    properties - Class-behaviour with private fields -


    I have behaved weirdly in a library (at least for me);

    I have this method:

      public class Lib {private string field = "field"; Public String Field {Get Return Field; }} Add Public Zero (Lib Lib) {string field = DoSomething (lib); Console.WriteLine (area); } Secure string DoSomething (Lib Lib) {return lib.field; }}  

    So, if I say a program to a program using a library:

      lib lib = new Lib (); Lib Libib 2 = new lib (); Lib.Add (lib2);  

    The console gives me the "field" as the output ... Now, I did not understand why this is why I used the area as private Announced, why can a class reach the private property of other classes and it does not give me an exception about access restrictions ?!

    In my comprehension, a Lib can access its fields in any way, but when I give the law another example of Lib , Then it should not be possible to enter the private sector for the first time because .. OK, because this is another example and private!

    It is by design, private access type with access modifier There is a limit No type of type Nessted type also has access to the private sector of the private type.

      class MyType {private string secret; Public MyType (String Secret) {this.secret = secret; } Public Zero Some Method (MyType myType) {// Works related to the Private Modifier type, not the Example Console.WriteLine (myType.secret); } Public category MyNestedType {Public MyNestedType (MyType myType) {// Also works because we are in the nested type of MyType Console.WriteLine (myType.secret); }}}  

    relevant link:,


    sql server 2005 - How to make a Winforms application with remote sql -


    I have written a simple program (Winforms.NET), which is a random word from a dictionary (DB table) When DB fixes its engagement, but if I want the program to take data from remote server

    I think I have to keep the IP address of the SQL Server host in my connection string , But if the host allows remote connections.

    Or will I do a webserver that sends data and consume my desktop app webserverview? Will it be the right approach

    If so, how to consume consumer service from any webmaster service

    If using winforms and accept server remote connection , Then in fact you only place the SQL Server instance name or IP address in the connection string Will not. Using a web service is a benefit that lets you access your data from other environments that do not support direct database connections, such as Silverlight applications; But if you are using just the WiFi formats, then I want to stay straight from the database connection to keep things simple.


    activex - Dump the interface exposed by a COM object -


    I want to find a tool that can see all the interfaces, in which the methods, properties, , Events or ActiveX) component is such a tool available?

    If component is typed in (if sent in resources or separately) you can use OLE scene that comes with Visual Studio. You should use "View Typilab", not "Bund to File".


    ambiguity - JOINT MySQL Query -


    If I have tables like:

      table_1: 1, 'hello is my name 'Table: 2:', '2009: 11: 02 08:42' Table 1: 2, 'Hello My name is Dave', '2009: 11: 02 08:30' Table 2: 1, 2009: 11: 02 09:42 ' 

    And think that all the table columns have the same col_names

    Is there any way I have a different lines You can do a query to return results in the selection

    with some of the lines:

      SELECT SELECT * table_1, table_2 ORDER BY dateReg DESC  

    My return will look like this:

      1, 'Ima all because of Twitter #', '2009: 11: 02 09:42' 1, 'Hello my name is Hal,' 2009 : 11: 02 08:42 '2,' hello my name is Dave ',' 2009: 11: 02 08:30 ' 

    When I try to run the above question, I have ambiguous errors (Obviously ... DUH ..: D) But there is a way that we can do this in PHP rather than using PHP code in PHP.

    Any thoughts? Thank you in advance

    You can use UNION (or UNION ALL) Can use ) to combine results from multiple queries: Select

      from SELECTEL1 table_1 UNION ALL SELECT * from Table_2  

    (Simple UNION will remove duplicates; Unius All all return results.)


    visual studio - Corrupt files when debugging into .NET framework -


    When debugging in the .NET framework using Visual Studio 2008 Professional, the source files are in some way corrupted, For example, a source file may start like this:

      // Copyright (c) Microsoft Corporation All Rights Reserved. Ï ¿namespace system. Web.mc {using system; Using System.Collections.Generic; Using System.Diagnostics.CodeAnalysis; Using System.Globalization;  

    Any ideas?

    This is really annoying and I can not find a solution on Google.

    It looks like you had a Unicode (UTF-16) encoded file that was either UTF-8 or ANSI was opened in the form of.

    To save your source file as UTF8.


    mysql - Subquery to String? -


    I have a table with a country:

      ID country ------- ----- 0 Monaco 1 Mongolia 2 Montenegro 3 Morocco 4 Mozambique 5 Myanmar  

    I have a sub-question that looks like this.

      (SELECT country from country where id & lt; 10) such as 'trip'  

    I think that subquery is such a string Is formatted as:

    'Monaco, Mongolia, Montenegro, Morocco, Mozambique, Myanmar'

    Is it possible?

    You can use the function:

      SELECT group_concat ( Country, ',') WHERE id & lt; 10  

    prototypejs - prototype newbie, Element.identify(element) vs Element#(identify) -


    I have the following in my code and want to add them to droppubs, using Droppables.add, which means Is that I need the ID of each of the elements

       

    Reading my prototype documentation is that the following should be interchangeable and both should return the 'sewing 1' string:

      $ ('seating1') .  

    and

      element. Identity ($ ('seating1'))  

    I've reduced what I really do, because I can clearly just droppables.add ('seating1') . What I'm actually doing is $ $ ('.Unbooked') and then by identifying the elements in finding the ID but only the second form works. I like to use the first form because it is more friendly.

    When I run it from the Firebug console, the first form returns the function. The second form expects me to 'seating 1'

    What am I missing?

    As always, any help or insight is appreciated.

    Thanks, Hubert

    should be:

     < Code> $ ('seating1'). Identity ()  

    Therefore, the complete code will be something like this:

      $$ ('unbooked'). Each (function (L) {$ (L). ID (); // or even ... $ (L) .ID;});  

    .net - PowerShell: an elegant way to create closures -


    told me that I have to call the method to create closer from block.

    Is there a great way to make closures from blocks? (E.g. a wrapping function, surname?, ...)

    Example:

      {block} $ {close} #  

    You can create a function that takes a script block, calls GetNewClosure and returns the closure. It is important that you call this function like dot operator:

      function => ($ Scriptblock) $ _ sb_) {$ _sb_.GetNewClosure ()} function A ($ block) {b (. = & Gt; {host-host 2; & amp; $ block})} function B ($ block) {Write-host1; And $ block} A {Write-host 3}  

    Not sure that it is much better to call GetNewClosure () on the script block yet. Note that you can choose some other names for the function. I was going to some things like C # Lambdas.


    java - Hadoop: intervals and JOIN -


    I am very new to Hadop and I am currently in the data of two sources Trying where the key is a interval (say [date-start / date-end]). For example:

    Input 1:

      20091001-20091002 A 20091011-20091104b 2008-0111-20091103C (...)  

    Input 2:

      20090902-20091003D 20081015-20091204E 20040011-20050101F (...)  

    I should get all the records Key1 Key 2 overlaps Is it possible? Where can I find an example of implementation?

    Thank you.

    A solution was given on biostar:


    windows - Can I use C++ templates to generate Unicode/ANSI variants of a function, rather than using the preprocessor? -


    We've got a bunch of inheritance code that does not support Unicode, so in our code we use a transitional pattern To move the function to the .inl file, change char to CHAR_TYPE , and then wrap it like this:

      #define CHAR_TYPE wchar_t #define STRING_TYPE std :: wstring #define MyFunctionName MyFunctionNameW #include "MyFunction.inl" #undef CHAR_TYPE #define CHAR_TYPE Characters #undef STRING_TYPE #define STRING_TYPE std :: string #undef myFunctionName #define MyFunctionName MyFunctionNameA #include "MyFunction.inl"   

    ... where MyFunction.inl then defines MyFunctionName , using the macro to generate both 'A' Version and a 'W' version.

    This is icky, but unfortunately it is necessary unless we get all the code changed to support Unicode.

    Is there any alternative way I can do this with templates? I think something good would be like the following:

      typedef MyFunctionName & lt; Wchar_t, std :: wstring & gt; MyFunctionNameW typedef MyFunctionName & lt; Char, std :: string & gt; My function name << / code> 

    Is this possible?

    Roger Pattay is absolutely correct about the interface, do not bother you with A and W suffix needed. However, it still leaves the problem of implementation as you thought, the templates are the right solution and since you do not need different names, you can leave type-pff. You now have

    templates & lt; Typename TSTRING & gt; Zero MyFunctionName (TSTRING const & amp;);


    c++ - operator/ overloading -


    For the purpose of learning, I am creating a bigger integer class in C ++: 2 files are:

    < / P>

    big_int.h

      #ifndef BIG_INT_H #define BIG_INT_H #include square big_int {public: big_ant (zero); Big_int (four *); Big_int (QString); ~ Big_int (); Big_int operator + (big_int); Big-operator- (big_nint); Big_int operator * (big_int); Big_int operator / (big_int); }; #endif // BIG_INT_H  


    big_int.cpp

      #include "big_int .h "big_int :: big_int () {} big_int :: big_int (qstring str) {} big_int :: ~ big_int () {} big_int operator + (big_int b) {return big_int (); } Big_int operator- (big_int b) {return big_int (); } Big_int operator * (big_int b) {return big_int (); } Big_int operator / (big_int) {return big_int (); }  

    Qt creator returns: C: / documents and settings / admin / admin / my document / calculator_1_0 / big_INPCPP: 31: error: big operator / (big_net) should take exactly two arguments. But operator / takes only 1 parameter what is wrong?

    This is a typo, you have forgotten the name of the class:

     < Code> big_nint big_nint :: operator + (big_it b) {return big_int (); } Big_int big_int :: operator- (big_int b) {return big_int (); } Big_int big_int :: operator * (big_int b) {return big_int (); } Big_int big_int :: operator / (big_int) {return big_int (); }  

    By the way, you should take contant context instead of values:

      big_int big_int :: operator / (const big_int and v) {// .}  

    javascript - How do I do ajax navigation on pageload? -


    I have several reports that have been created through AJAX calls. I am prototype.js framework on this page for some function functions.

    Links to each report are # anchors / tags such as Report 1, # Report 2, etc., which are lots of onClick functions to create reports through Javascript.

    I would like to do this, if a user bookmarks a page with a link or navigates directly with an anchor / link in the url for my page to load the report.

    So if the user goes: It should load the page and go to another report.

    Anyway in my paglod can I see the anchor / link onlcick for that anchor? I was thinking that I can make a big case / what the statement is to do, but maybe it was a simple way.

    It all depends on you how Ajax calls are really structured. I do something similar to open the right tab. The code will start in this way, if you see how your Ajax events have been tilted, then I should be able to show you the rest.

      document.observe ("dom: loaded", function () {if (window.location.hash) {var report = window.location.hash.replace ("#", " );}});   

    Edit

    By looking at your code, you want to better switch on (IMV) an irrelevant method where you get the element eg

      $ ('ele'). Inspect ('click', dust stop.bindseuse listener ($ ('ele'));  

    This enables you to connect the same functionality easily with one click or a pageload, but does better practice anyway and prevents code repetition etc. Obviously this is missing in large amounts but hopefully what you want me


    c++ - Boost: how to build Boost under MacOSX -


    I try to make Boost's MacOSX universal binaries (I need at least i386 / ppc => macosx10.3) I am doing

    I tried many different methods and options and versions and all of them have failed at the end of this accident:

    I think That Buddha Boost Build due to this accident.

    With Boost -1.41.0, I think that whatever I tried the right, these were:

      ./ bootstrap.sh & amp; Sudo ./jj architecture = United Mokox-version = 10.4 install  

    I recommend To install Boost that you use, MacPorts will be automatically created for you.


    java - Generating simple crud applications in Spring based off existing database or hibernate configurations? -


    I am trying to learn Spring MVC, but have been screwed by Grails. When I'm working on a basic web application, I was wondering if there was any device that could do some work to create a crude app through a database of data or a hibernate data model? I've found so far that only one I'm not sure how to take the generated code and make it for the process of making either maven or ant to convert.

    "post-less" itemsprop = "text">

    I've never tried to do this, but it seems that you allow it to be done through Maven. For the reverse engineer from the database, there is a MVN interface: gene-model command and MVAN apfus: gene is to create remaining scapholds.

    I think that they must be run from within a project built with one of the Ephesus Maven archipedes. You can find Quick Start Guide to set up.

    There are some good scaffolding in it, but there is no reverse engineering from that database that you are still searching for.

    Before you can take advantage of scaffolding with that structure, your persistent object must be annotated as a @ Ruentt object.

    java - Dynamic JComboBox Size -


    I have JComboBox that has long been in string s I only need to see their full length during selection, therefore, I want to be JComboBox full size and otherwise small.

    The following code works, but since I am very java, I am thinking that there is a better or more standard way of doing this.

    Thank you.

      import java .awt *. Import javax.swing *; Import javax.swing.event. *; Public Category DynamicJComboBox {Create Private Static Zero and Create ShowuI () {// and set up Window JFrame Frame = New JFram (); Frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); Frame.setLayout (New Flow Layout ()); Frame.setSize (250, 100); JComboBox box = new JComboBox (); Box.addItem ("Actually Long Line Number One"); Box.addItem ("Actually Long Line Number Two"); Box.addItem ("Actually Long Line Number Three"); Box.addItem ("Actually Long Line Number Four"); Box.setPreferredSize (new dimension (100, 30)); Box.addPopupMenuListener (New PopupManuListener) {@Override public void popupMenuCanceled (PopupMenuEvent e) {} Override public blank popupManualWebback Exploreable (popup menuewit E) {box.setSize (100,30); @ Override public empty popupManualWebbackWebBox (PopupMenuEventE) {Box.setSize (200,30);}}); Frame.add (box); Frame.setVisible (true); } Public static zero main (string [] args) {try} {UIManager.setLookAndFeel ("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); } (Exception Ex) {} SwingUtilities.invokeLater ((- -> gt; createAndShowGUI ();}); }}  

    The following code seems to work

    Not really because you change the size of the combo box which will overwrite the combo box on any of its component display on its right side. In addition, the combo box is drawn in the middle of the Arrow combo box.

    Check out. This solution also uses popupmenulist (so you were on the right track), but it only increases the width of the popup when not displayed, even the combo box is displayed.


    SML Compund Function -


    I am trying to write a function, compound, which will return the function f which moves with variable n x times . It's strange to understand, here's an example

    funny = n + 1x = 2n = 2f (f (n + 1)) will return

    this is my Code is:

      Musical compound NFX = 0's xx => F n | X = & gt; F (mixed nf (x -1));  

    Although I get a type of test error,

    I get a type of error int -> ('a -> a) -> int -> Int type int -> (a '-> a') -> 'a -> a

    I am very new to SML and I do not know what I am doing.


    jquery - multiple ajax requests very slow mvc -


    I have an ASP MVC4 application that loads the dashboard of widgets. Each widget returns an async ajax call on the server and returns a partial.

    For some reason these widgets are taking aprox 50 seconds to change the content with partial. Ajax request is instant and the database query is executed on the database basis immediately. Most of the time it works fine but I think it may be related to high usage of the site.

    Can anyone recommend me to debug this issue or identify obstacles?

      $ Ajax ({cache: true, type: 'post', async: true, url: '/ observation / getBillingWidget /', success: function (result 3) {if (result3 == '') {$ (' Replacewith ('');} Other {$ ('widget-billing'). Html (result3);}}, error: function () {}}); $ .ajax ({cache: true, type: 'post', async: true, url: '/ observation / GetQueryWidget /', success: function (result 3) {if (result3 == '') {$ ('. Html (result3);}}, Error: function () {}});  

    I had the same problem as an application in the same dashboard, and this commentary suggests the problem of session locking. By default, when a controller action is called a session, it is locked until it is done If this happens, then when any call arrives, then It does not have to wait until it is released.

    However, with some smart coding, you can avoid the session completely, preferably by storing and reading data in the database. The controllers are only reading session variables (or not using them at all), you can add this attribute to the top of your controller class:

      [the location of the session (System .Web.SessionState.SessionStateBehavior .ReadOnly)]  < / Pre> 

    It should solve your locking issues that you can experience with your parallel AJAX calls to your controllers.


    C Programming - Segmentation fault when Manipulating Array of Strings -


    I am struggling with a partition fault that occurs when the DNS variable changes from size to size 10 goes. I believe the announcement is mainly making an array of DNS 10 stars in the DNS, and then when there is an array of 32 strings to increase from 32.

    So when the 10-shaped DNS variable is executed, I get the output of 4 directories. The name starts with the name D. This is expected output.

    If I increase the DNS variable in 32, then I still get 4 directory names and there is a segmentation mistake immediately after that.

    It has been very long since coding and I am sure that I am violating memory somewhere

    Any help is greatly appreciated.

    Thanks,

    Donations.

      void ld_dirs (char * string []) {Int count; DIR * DP; Struct dirent * ep; DP = opendir ("/ tmp / sysinfo / inputs"); If (dp! = Null) {count = 0; While (ep = readdir (dp)) {if (ep-> d_name [0] == 'D') {strings [count] = malloc (80 * sizeof (char)); Wire [count] = EP- & gt; D_name; Count ++; }} Monkey (DP); } And lies ("could not open the directory"); } Int main () {four cwd [120]; Integer number, count 2; Four * DNS [10]; Four * paths; If (getcwd (cwd, sizeof (cwd)) = NULL printf ("\ n current work directory:% s \ n \ n \ n", cwd); Other error ("getcwd () error"); Ld_dirs (DNS); Calculation = 0; ("List of valid inputs: \ n"); While (DNS [count]! = Null) {puts (DNS [calculation]); Count ++; } Printf ("% d valid input \ n", counting); Return 0;  

    The problems I have:

    1. Size of the array

      You have declared:

        four * DNS [10];  

      You do not have any code in ld_dirs to make sure that you can not use string , which Can hold it legally.

    2. You have not initialized items from dirs to NULL , yet you are relying on the value of the items In the NULL the following while the loop.

        while (DNS [count]! = Null] {puts (dns [count]); Count ++; }  
    3. You can fix these problems by:

      1. DNS Ho NULL .

          char * dns [10] = {0};    
      2. Pass the size of the array with ld_dir and make sure that you legally agree that you do not use any more Are there.

        Change the function interface to:

          zero ld_dirs (four * strings [], integer size)  

          ld_dirs (DNS, size (DNS) / size (* DNS);  

    knockout.js - "object is not a function" error when try to get value by calling WebAPI in KonckoutJS -


    I'm working with KnockoutJS to create an online tool. Inside the visual model there is a calculated property that a WebAPI tells to get the remote counting values; My approach is trying to call the web API via jquery .ajax, as shown below the code snippet

    This "item generates no function on the spot" error where I try to move the parameters, which is the one inside the same visual model Tax for Vebapi.

    Please show me a way to do it right, thank you

      & lt; Input id = "interestRate" type = "text" data-bind = "value: interestRate" /> & Lt; Input ID = "zodiac living withdraw" type = "text" data-bind = "value: zodiac biweeddrawan" /> & Lt; Strong id = "calculatedFee" data-bind = "text: calculate result (). CalculFee" & gt; & Lt; / Strong> & Lt; Strong id = "adminFee" data-bound = "text: calculate security (). Interest" & gt; & Lt; / Strong>  
      on apiUrl = "/ API / calculator" var calculatorModel = function () {this.interestRate = ko.observable (7.5) ; This.amountBeingWithdrawn = ko.observable (10000); ApiUrl, type: 'obtaining' datatype ':' json ', data: {interestRateContracted: this.calculateResult = ko.computed (function () {$ .ajax ({url returned this.interestRate (), // error: Uncaught writing error: The object is not a function AmountBeingWithdrawn: this.amountBeingWithdrawn () // Error: Uncaught TypeError: Object is a function}, the success is not: function (result) {return {fee: result.CalculatedFee, interest: result. interest };}}}}}}. Extension ({async: true});} Var calculator = new calculator model (); $ (document) .ready (function () {ko.applyBindings (calculator);}); < / Code> 

    The problem is that this is something different, as you did not tell it anything, you have two options first, the on the external object Place the context of this and use it within the calculation:

      var calculator model = function () {// keep it in the context of the original "this" hanging around you Is = this; this.interestRate = ko.observable (7.5); This.amountBeingWithdrawn = ko.observable (10000); , ApiUrl type :: this.calculateResult = ko.computed (function () {$ .ajax ({url return 'received', datatype: 'json', data: {// Here we use the variable itself, which is still there // Rectify the right object InterestRateContracted: self.interestRate (), AmountBeingWithdrawn: self.amountBeingWithdrawn ()}, success: function (result) {return {fee: result.CalculatedFee, interest: result.Interest};}});} ) .extend ({async: true}); }  

    Or, secondly, use the fact that it can be beaten:

      this.calculateResult = ko.computed (function () {return $ .ajax ({url: apiUrl, type: 'received', datatype: 'json', data: {InterestRateContracted: this.interestRate (), AmountBeingWithdrawn: this.amountBeingWithdrawn ()}, success: function (result) {return {Charges: Results .CalculatedFee, Interest: result.Interest}}}})}}, this) .extend ({async: true}); // Note to calculate this parameter on the above line / calculation  

    spring-xd work with xml payload -


    Is it possible to work with XML payloads in the Spring-XD runtime? I have the following which I am trying to execute the stream:

      create stream - name test XML - definition "file --dir = / tmp / sample.xml --outputType = Application / xml | Splitter --expression = // item | log " 

    My goal is to split it on a given XPATH expression (supported by spring integration).

    "simple" splitter (an XPath splitter - instead of XD currently does not have an XPathSplitter module) When using, you need to use these expression.


    Files with commas in c++ -


    How to read in a text file with a comma and write it in a new file without any commas?

    The file has nine columns - the first month is the next date and a comma, then the year is 6 columns of those numbers that represent the dollar with comm, for example 17,751.24

    I need to create a new text file from which there is no comma.

    I was trying to use double variables for each callum, but comma forced me to use string variables, then I tried to read it with a loop for a while: Gt; & Gt; Date & gt; & Gt; Years & gt; & Gt; Open & gt; & Gt; High & gt; Less & gt; Close & gt;

      While (infile> gt; gt; & gt; adj) {...}  

    Side note: File some stock Exchange is about cheese.

    How do I create a new one? There should be no comma except the text file with the same content.

    This is for the initial C ++ class, so please do not use advanced material in the answer.

    Thanks in advance.

    Maybe it's too early now, That's it can help you go in.

    The simple question is:

    How to read and write with a comma in a text file for a new file without any commas?

    This simple question is comprehensive (in many ways), but you can consider the following:

      // to use: // Example with an I / O redirection // Example with the executable name t160 // and some file named 'inputFile': // // t160 & lt; Input File & gt; NoCommaFile // int t160 () {int commaCount = 0; Do {int kar = 0; Car = std :: cin.get (); // read the single char from cin if (std :: cin.eof ()) {break; } // When we end, we end (std :: cin.bad ()) {// file I / o error std :: cerr & lt; & Lt; "ERR: std :: cin.bad ()" & lt; & Lt; Std :: endl; break; } If (',' == car) {commaCount + = 1; to continue; } // // found a comma ^^^^^^^^ loop release: coma std :: cout & lt; & Lt; Four (tax); // no commas, so car quotes} while (1); // Simulation for testing: // std :: cerr & lt; & Lt; "Commount =" & lt; & Lt; Commacount & lt; & Lt; Std :: endl; Return (0); }  

    This code reads one letter at a time, and writes anything one or the other at a time.

    When a comma is found, then it is 'abandoned'.

    You can decide later that you want to change the comma with space (it can be canceled) Instead)

    I can think that you might decide to behave differently from commas-digit (",") with commas-digit (as in "123,456").

    This simple loop should support those decisions, and many more.

    Good luck.


    ruby on rails - Cannot install state_machines gem in Windows environment -


    I'm new to rail and want to see how the ecommerce solution looks before optimization. That's why I am installing ruby ​​with Ruby Installer, Devkit, Rail, Spree etc.

    state_machines appears during the installation of the gem below error and the gem is not finally installed.

      C: \ & gt; GEM installed state_machines error: while executing the gem ... (Errno :: EINVAL) invalid argument @ rb_sysopen - C: / dev / ruby ​​/ lib / ruby ​​/ gem / 2.1.0 / gem / state_m achines-0.2 .2 / test / unit / node_collection / node_collection_after_being_copied_test.rb  

    The spree project has the effect of bundle install on it later:

      erro :: inviol: invalid argument @ rb_sesopen - c: / dev / rub / lib / rb / js -2.1.0 / gem EMS / state_machines -0.2.2 / test / unit / node_collection / node_collection_after_being_c opied_test.rb State_machines (0.2.2) Established when an error has occurred, and bundler can not continue. Ensure that the gem is successful before establishing state_machine -5 '0.2.2' bundling.  

    The current Ruby version is installed: Ruby 2.1.5p273 (2014-11-13 Amendment 48405) [i386-mingw32] + devkit

    Rail version 4.2.0

    I am running on a Windows environment without any possibility of going to Linux.

    I also ran into this.

    It seems that state_masters have some test case files that have a new line in their name, I am sure the issue is the cause. I have submitted a bridge request here: Meanwhile, there is no problem in my branch:

    Specific improvements (for the moment, unless accepted for pulling) is:

      git clone https://github.com/jeff-hamm/state_machines CD state_machines bundle gem state_machines rack install  

    After doing this, install 'gem install Spree_core 'worked just fine on windows

    Keep in mind that I am not planning to keep my branch up to date ( The request has been accepted, I will delete it), hence, cloned URLs will not stop for a long time

    / div>

    Python returns length of 2 for single Unicode character string -


    पायथन 2.7:

      में [2]: utf8_str = '\ xf0 \ x 9f [3]: प्रिंट [/ 3]: प्रिंट (यूटीएफ 8_स्ट्रैक) 👍 में [4]: ​​यूनिकोड_स्ट्रिक = utf8_str.decode ('utf-8') में [5]: प्रिंट (यूनिकोड_स्ट्रैथ) 👍 में [6]: यूनिकोड_स्ट्र आउट [ 6]: यू '\ U0001f44d' में [7]: लेन (यूनिकोड_स्ट्रैक) आउट [7]: 2  

    चूंकि unicode_str केवल एक यूनिकोड कोड बिंदु (0x0001f44d), len (unicode_str) 1 के बजाय 2 क्यों करता है?

    < P> आपका पायथन बाइनरी UCS-2 समर्थन (एक संकीर्ण बिल्ड) के साथ संकलित किया गया था और आंतरिक रूप से बीएमपी (बेसिक बहुभाषी विमान) के बाहर कुछ भी उपयोग किया जाता है।

    इसका अर्थ है ऐसी कोडपॉइंट्स को 2 अक्षरों के रूप में दिखाया जाता है जब लंबाई की मांग करते हैं।

    आपको अपने पायथन बायनरी को फिर से कंपैले करना होगा, यदि यह मामला ( ./ कॉन्फ़िगर करें --अन्य-यूनिकोड = Ucs4 इसे सक्षम करेगा), या पायथन 3.3 या नए में नवीनीकृत करें, जहां पर यू एक चर-चौड़ाई वाला यूनिकोड प्रकार जो कि एएससीआईआई, यूसीएस -2 और यूसीएस -4 के बीच स्विच करता है जैसे कि निहित कोडपॉइंट्स के लिए आवश्यक है।

    पायथन संस्करण 2.7 और 3.0 - 3.2 पर, आप यह पता लगा सकते हैं कि आप किस तरह का निर्माण करेंगे निरीक्षण करना; यह एक विस्तृत यूसीएस -4 निर्माण के लिए एक संकीर्ण यूसीएस -2 निर्माण, 1114111 == 0x10FFFF के लिए 2 ^ 16-1 == 65535 == 0xFFFF होगा। पायथन 3.3 और ऊपर में इसे हमेशा 1114111 पर सेट किया जाता है।

    डेमो:

      # संकीर्ण बिल्ड $ bin / python -c 'आयात सिस्टम; प्रिंट sys.maxunicode, len (u "\ U0001f44d"), सूची (यू "\ U0001f44d") '65535 2 [u' \ ud83d ', u' \ udc4d] # वाईड बिल्ड $ अजगर -सी 'आयात सिस्टम; प्रिंट sys.maxunicode, len (u "\ U0001f44d"), सूची (यू "\ U0001f44d") '1114111 1 [u' \ U0001f44d]]  

    java - Gaussian elimination for a boolean system of equations using XOR -


    I am looking for a way to calculate the solution of a Boolean system equation by using the XOR operation. I got like this, but it did not show a way to calculate.

    Gaussian eradication always seems to you like you only have to think, and I do not know how I can make a program do this. Especially for a system in which there are many solutions I will be fine now if I get an algorithm that finds a solution, but it would be good to be able to find all solutions.


    nio - Android - Netty - RejectedExecutionException -


    I'm back with a difficult question.

    I have our Android has written a Netty server for the project but have some time when I tried to send some of the connected clients, I get a few Aksekyusn exception.

    03-17 22: 07: 49.938 21708-22346 / htlhallein.at.serverdatenbrille_rewritten E / AndroidRuntime: Deadly saveing ​​Thread -9824 process: Actielacelar.a.as.as.arwardetainbrel_uaraitiant, PID: 21708 Java ULL.ConCentrant. Published Execution Express: Event Executor Terminated Iio.netty at Io.netty.util.concurrent.SingleThreadEventExecutor.execute (Single ThreadEventExecutor.java: SingleThreadEventExecutor.java Month 99) at io.netty.util.concurrent.SingleThreadEventExecutor.addTask But use.concurrent.SingleThreadEventExecutor.reject (SingleThreadEventExecutor.java:707) 690) io.netty.channel.AbstractChannel at $ AbstractUnsafe.register (AbstractChannel.java:421) io.netty.channel.SingleThreadEventLoop.register (Single ThreadEventLoop.java) : 60) io.netty.bootstrap.AbstractBootstrap.initAndRegister (Abs on Io.netty.channel.SingleThreadEventLoop.register (Single ThreadEventLoop.java:48) on io.netty.channel.MultithreadEventLoopGroup.register (multithreadEventLoopGroup.java:64) tractBootstrap.java.35) on io.netty.bootstrap.AbstractBootstrap.doBind (AbstractBootstrap.java:271) on io.netty.bootstrap.AbstractBootstrap.bind (AbstractBootstrap.java said 67) on io.netty.bootstrap.AbstractBootstrap.bind ( AbstractBootstrap.java: 242) on htlhallein.at.serverdatenbrille_rewritten.server.DatenbrillenServer $ Server.run (DatenbrillenServer.java:172) at java.lang.Thread.run (Thredkjawa: 841)

    I do not believe what event I want to execute? After running the server exception went to remove a line (log. D. (Datinbrilnsservrkclasktstring), "Stop on the server ...");)

    Does anyone have Idea , why does this happen?

    Thank you very much!

    This is done when you try to do IO after calling shutdown () Make sure That you are done with all Io before calling it


    javascript - linkedin js api - "get my connections" issue -


    We have a problem here:

    We make an app using Linkin JS API. We are getting the connection of the person who logs on to the site at:

      IN.API.Connections ("me"). Field ("id", "formattedName", "pictureUrl", "public profile URL", "site stand-upprofile fix") results (work (results, metadata) {});  

    This is working fine while testing - we have tested it for five different people, but with one (my main part) we have a problem () . And the real difference is that I have around 200 connections, but my tester- only around 20-50

    The response gives us only the amount of contacts with __ digits, but by console apg we get the list.

    This can not be an exact answer but according to it

    You can "browse the connection." That is, you can only get the connection of the user who gave access to your application. You can not get the connection of that user's connection (second division connection).

    Then your app can only display its own delivery connection


    java - How to write a point object to a text file -


    I am trying to write a list that contains a list of digits in the text file. I have been successful in writing AA method to save the point in the text file However, I'm getting some additional characters in the output

      try {FileOutputStream fileOut = new FileOutputStream (path); ObjectOutputStream Out = New ObjectOutputStream (FileAut); For (int i = 0; i & lt; pointList.size (); i ++) {string s = parseString (pointList.get (i)); Out.writeObject (s); } Out.close (); FileOut.close (); } Hold (IOException i) {i.printStackTrace (); } Private Static String Parasstring (Point P) {String Point = String.value (P.T.T.X)), "+ String.value (PGATT)" ; System.out.println ("string:" + point); Return point; }  

    This is a point list

      list & lt; Point & gt; Point list = new arrelist (); PointList.add (new point (100,200)); PointList.add (new point (300,500)); PointList.add (new point (400,200)); PointList.add (new point (100,500)); PointList.add (new point (400,200! [Enter image details here] [1]));  

    This writing method is the output of http: //i.stack .imgur .com / hqMDK.png

    I think how to get rid of the characters on the first line of production and how to understand t on each line

    > Thank you for < /p>

    object overputstream writes binary serialization data in the stream This human-readable output Do not have to produce.

    If you want to write human-readable, use something instead PrintWriter


    c++ - Why does reverse_iterator doubly define its nested types? -


    It appears that the itater adapter reverse_title defines its nested types in a special form From, which makes it public with std :: iterator iterator_category , value_type , inter_type , indicator and context . Except for iterator_category and value_type , all of these are clearly edited again in the definition of the typed 'class.

    24.5.1.1 Class Template Reverse_Eterator [reverse. Etter]

      Namespace CSS {template & lt; Square iterator & gt; Classic reverse_title: Public Iterator & Lt; Tippanam Iterator_trate & lieutenant; Iterator & gt; :: Iterator_grid, Typnim Iterter_tratt & lt; Iterator & gt; :: value_type, typename iterator_traits & lt; Iterator & gt ;: inter_type, typename iterator_traits & lt; Iterator & gt; :: indicator, typename iterator_traits & lt; Iterator & gt; :: References & gt; ; {Public: Type Iter Eater_type; Typedef typename iterator_traits & lt; Iterator & gt; :: inter_type inter_type; Typipip typename iterator_traits & lt; Iterator & gt; :: Reference Reference; Typedef typename iterator_traits & lt; Iterator & gt; :: Pointer Pointer; // ... the rest of the class};  

    Question : Why the definition of duplication? Is it only for the purposes of the exhibition, or is it more? And iterator_category and value_type

    for a while For, they are moving away from using the std :: iterator as the base code, and to specify that each interseer should define the correct type of names.

    When they specify the base class in the standard, then in the same way, the implementation of the class prevents the implementation, even if the only real intention was to specify that the iterator should define some names Required. Specifically, you can define is_base_of that the std :: iterator is the base class of a std :: reverse_iterator . No, there is no polymorph, so it is very foolish and meaningless to do this, but if you do this, then the current standard says that should return true.

    It (me) as if it is in the process of walking with at least one accidental halfway point (more or less accidentally) for which std :: iterator Is used as a base class, and should be defined in the std :: reverse_iterator by specifying the names (and also, along with other other iterators).

    In the history of those who care, this includes:


    They were provided for almost the same reason std :: iterator (i.e., only to provide some typographs in one derived class) so that the reason behind removing them is as the base class.


    python - Different results with scipy.optimize.curve_fit using list and array -


    To fit a set of 2D elements using a 3 parameter, scipy.optimize.curve_fit Exponential function, if I treat lists containing data in the form of list or numpy arrays , then I get wildly different results. MWE is below

    Last Fit parameter value, ABC are:

      Last ABC: [1.3 9 852692e-10 1.00000000 E + 00 1.39020816e-01 ]  

    for the function calculates using the list ( exp_3p ), and:

      FINAL ABC MMP: [0.00826326 0.18603007 -0.02641734]  

    For a function using a narrow array ( exp_3p_np ).

    I am quite sure that this is related to temporary point accuracy while using an Aurora, but if I can get confirmation (and possibly some other information) from someone with a more knowledge on it would be great.


    Add

    This is apparently a scipy 0.12.0 problem, which is installed in my system The version is when I tried to do it. I have upgraded to 0.14.0 , I run the code again and now the two functions give the exact same value.


    MWE

      import Apeepiapi (X, A, B, C): a Anpi.akspi * (b * x) + C DRF Akspifaipiapeepiananpi (X, A, B, C) return: * NP return to .exp (b * np.asarray (x)) + cx = [11.250861, 11.750861, 12.250861, 12.750861, 13.250861, 13.750861, 14.250861, 14.750861, 15.250861, 15.750861, 16.250861 , 16.750861, 17.250861, 17.750861, 18.250861, 18.750861, 1 9 .250861, 19.750861, 20.250861, 20.750861, 21.250861, 21.750861] y = [.045588760000000006, .046796000000000004, 0.05,56, 9, 35, 0.0634055 , .083095124999999992, .092670656249999997, .098264620000000011, .086176929999999999, 0.10626 9 6625, .124142703125, 0.13172655, .13762596999999999, .17699458749999999, 12:20 194234375, .19936675000000001, .24553768749999999, .28308924000000002, 0.3130, 945, .35024002999999998, 0.39341382000000003, 0.40971550000000 001, 0.40854391000000001] popt, pcov = curve_fit (exp_3p, x, y) print \ nFINAL abc : ', popt popt, pcov = curve_fit (exp_3p_np, x, y) print' \ nFINAL abc numpy: ', popt  


    c++ - LowLevelKeyboardProc and KeyboardProc -


    What is the difference between

    low levelkeypierpeak and KeyboardProc ? I'm starting at the win hook and only read the hook overview on the Microsoft site, please, I am being understood as posible: -)

    SetWindowsHookEx (WH_KEYBOARD_LL, ...); will capture the event directly from the keyboard driver or simulated keyboard event. I SetWindowsHookEx (WH_KEYBOARD, ...); Captures events after processing those OS

    An OS is the deadline for processing low level events and Microsoft recommends you to process at least the event And schedule any important work for a different thread so that the operation of the driver is not interrupted.

    High level incidents include repeat counting and there is no time limit for processing the event.


    java - What exactly does driver.get() do? -


    वेबड्राइवर driver.get () ऑपरेशन के लिए निम्न में बताता है:

    < Blockquote>

    ओएस / ब्राउज़र संयोजन सहित कई कारकों पर निर्भर, वेबड्राइवर पृष्ठ को लोड करने के लिए प्रतीक्षा कर सकता है या नहीं। कुछ परिस्थितियों में, वेब ड्रिवर पृष्ठ समाप्त होने से पहले नियंत्रण वापस कर सकता है, या शुरू भी कर सकता है, लोड हो रहा है

    क्या किसी भी परिस्थिति में स्पष्टीकरण दिया जा सकता है कि पृष्ठ समाप्त होने से पहले WebDriver को नियंत्रण मिलता है, या शुरू भी हो रहा है ?

    एक सरल रूप में, .get () नेविगेट करने के लिए आपको यूआरएल।

    क्या कोई पृष्ठ परिशिष्ट WebDriver पर नियंत्रण करता है, पृष्ठ के समाप्त होने से पहले, या शुरू भी हो रहा है, यह बता सकता है?

    इस तरह की स्थिति सुंदर है आजकल आम - वहाँ अधिक से अधिक पृष्ठों हैं कि असिंक्रोनस लोड करें सेलेनियम बकाया AJAX अनुरोधों या वर्तमान में चलने वाली स्क्रिप्ट की प्रतिक्रियाओं का इंतजार नहीं करेगा जो डॉम में मौजूद नहीं हैं, या अभी तक दिखाई नहीं दे रहे तत्वों तक पहुंचने की कोशिश करते समय अलग-अलग त्रुटियां पैदा कर सकते हैं, या वांछित डेटा प्राप्त नहीं कर सकते हैं

    और यह, वैसे, विशेष रूप से AngularJS अनुप्रयोग परीक्षण के लिए मौजूद होने के कारणों में से एक है - यह संकेत करने के लिए कोणीय के लिए सुनता है "ठीक है, मैं इस पृष्ठ के साथ हूं"।

  • >
  • डीओएम या दृश्यमान में मौजूद होना - यह दृष्टिकोण सबसे आम और सबसे विश्वसनीय है
  • यहां एक है जिससे चीजों को साफ करने में मदद मिलनी चाहिए।

    समस्या के कुछ महान स्पष्टीकरण के साथ संबंधित विषयों को भी देखें:

  • < / html>

    Azure: What is an "Affinity Group"? -


    The state of mangodibi to set a document. What is an affinity group in terms of Azure?

    A group of resources that are matched with each other. That is, the resources that you want to "close" each other in the form of optimization.

    MongoDebee may want an affinity group to be able to communicate with Mongo DB resources more efficiently with each other.


    python - Getting 501 Server Error: Not Implemented error when trying to backup Firebase from a remote server -


    I have a python script that pulls back the firebase db and saves it on the server. I execute it successfully from my machine However, when I run it on the server, I get the following error:

      Traceback (the most recent call last): File "somescript.py", line 58 , & Lt; Module & gt; Data = json.dumps (f.get ('/', none), sort_keys = false, indent = 4) file "/home/<username>/.local/lib/python2.7/site-packages/firebase / Decorators.py ", line 19, in the wrapped return f (* args, ** quarges) file" / home /<ususername>/.local/lib/python2.7/site-packages/firebase/firebase.py " , Line 274, get back to make_get_request (endpoint, ultimate, header, connection = connection) file "/home/<username>/.local/lib/python2.7/site-packages/firebase/decorators.py", line 19, wrapped in return (* args, ** kwargs), file "/home/<username>/.local/lib/python2.7/site-packages/firebase/firebase.py" line 42, make_get_request in response . Raise_for_status (), the file "/home/<username>/.local/lib/python2.7/site-packages/requests/models.py", raise_for_status in line 638, increased HTTP_ERROR requests.exceptions.HTTPError: 501 server error: Not applicable 2015-03-17 15:01:12 - Completed work took 4.00 seconds, return code was 1. Here is the rewrite NT part of the script:  
      def connect_firebase (configuration): firebaseUrl = configs.get ('Firebase', 'ProdFirebaseURL') firebaseSecret = Configs.get ('Firebase', 'FirebaseSecret') f = firebase.firebaseApplication (firebaseUrl, none) return f.authentication = firebase.firebaseAuthentication (firebaseSecret, "", admin = true) f ... f = connect_firebase ( Config) data = json.dumps (f.get ('/', none), sort_keys = false, indent = 4) just here  

    similar script The same parameter was running fine a few weeks ago by pythoneverywhere Using pip on both Sean and Server, has reinstalled request 1.1.0 and Python-Firebase and still can access it from me I'm capable of machine but pythoneverywhere with no idea what the server will do?

    If you can get the certification portion past, then connection should be done / not it Is a proxy problem.

    Maybe your ProdFirebaseURL check again is correct?

    I <<> Code> F.G.T. (& Lt; the-full-url & gt;) Just double check / make sure.