Sunday, 15 September 2013

asp.net - Attaching mdf file into sql server -


The first MDF file was in the AppData folder, and the application was working fine when I added the MDF file to the SQL server. I can execute the query but when I try to use it from the asp.net application it gives the following exception.

The user can not open the default database, login failed. User 'Domain \ Username'

So if I understand correctly, then you Do not specify but instead you have attached the database 'for real' to the existing SQL Server instance.

Because now you are not included with your own personal instance, your application has the appropriate credentials to connect to SQL Server example where you attach the database, the correct solution depends on many factors, but The possible answers are as follows:

  • Create a SQL Server login for ASP Ap Pool Identity and grant proper access to this database in the required database. Use to create login [domain user] from windows and create user [domain user]. For better credit, for an additional pool, add the API pool identity to a security group and give this security group the necessary permissions.
  • Change the App Pool identity to an uncertainty that has the proper permissions already approved
  • If ASP application uses impersonation and SQL Server frequency from ASP application on a different machine If so, make sure that your ASP application pool is allowed to do.

visual studio 2008 - Unit test sequence when running all tests in solution -


In a complex VS2008 solution I have three unit testing projects. As soon as they work on the same test database, It is important that the test projects are executed after the second one, it is not important that the project was done before only one other has expired before it started.

If I want to execute them all, there are several ways to do this, which give birth to different results:

  • I have a test list. If the Vsmdi file is ordered by the test project, if I open the list and execute the test from the test list editor, then everything is fine.
  • If I open the test view window then sort the tests by the projects and run them, then everything is fine.
  • However, if I run the menu by selecting 'Test -> Run -> All Test In Solution', then they are executed in random order, where some of them fail, because other tests One of the projects already tampered Test DB.

So the question is, what does the unit test sequence determine when using the third approach? What is a way to specify a default test list in .testrunconfig?

As a solution, the problem is not important at all but any idea is welcome thanks.

You are facing a test test odor called Interactive Test , described More specifically in the best, you are suffering from shared fixtures , which is another way to say that many of your tests use the same shared database, and that they are the result of the previous test run Depend on

This is an anti-pattern and it should be avoided by all prices. The book provides comprehensive guidance on how to deal with this situation.

I started by telling the reason that this is the reason why MSTE does not guarantee the order of the tests. Although the order (semi) seems deterministic, you can not trust it. Some other unit testing frameworks (xUnit.NET comes into mind) Even as long as you run the test suite run run tests in a random order, MSTest is not extreme, but there is no way By which you can test your unit.

He said, if you are running a Visual Studio Team Suite or (I believe) Team Test, then one type of test is called an ordered test Execute all tests (including unit tests) in a specific order that you can use to specify.


python - How to print number with commas as thousands separators? -


I'm trying to print an integer in Python 2.6.1 , because thousands For algebraic commas, for example, I want to show as 1234567 as 1,234,567 . How would I go about doing this? I've seen many examples on Google, but I'm looking for the simplest practical way.

It does not need to be location-specific to decide between period and comma. I would prefer something as simple as possible.

I found it to work:

<> & gt; & Gt; & Gt; Import locale & gt; & Gt; & Gt; Locale.setlocale (locale.LC_ALL, 'en_US') 'en_US' & gt; & Gt; & Gt; Locale The format ("% d", 1255000, grouping = true) '1,255,000'

Of course, you do not support internationalization, but it is clear, concise, and Uses an underlying library.

PS This "% d" is the normal% -style format you can have only one formatter, but whatever you can do in terms of this field width and exact setting.

P.P.S. If you can not find the locale to work, I suggest a revised version of the answer to Mark:

  def intWithCommas (x): if type ( X) Not in [Type (0), Type (0L)]: Increase type error ("Parameter should be an integer.") If x & lt; 0: returns '-' + intWithCommas (-x) result = '' while x & gt; = 1000: x, r = divmod (x, 1000) result = ",% 03d% s"% (r, result) return "% D% s"% (x, result)  
< P> Useful for recursive negative case, but according to each comma a recurrence takes me a little more.


Declaring arrays similar to C style (C++) -


A programmer in C can declare an array like this:

  unsigned Four fonts [2] [8] {[1] = {0, 31, 0, 31, 0, 31, 0, 31}};  

and element [0] is likely to have random bits. Is there any such way in C ++?

You can:

  unsigned char fonts [2 ] [8] = {{0}, {0, 31, 0, 31, 0, 31, 0, 31}};  

gtk - Fundamentals of Game Programming in C -


Over the last 2 months I have been trying to learn the basics of game programming. That's why I have coded some simple games in Java to know basics like Tetris, Checkers and PAC-Man.

Now I want to learn / improve my skills in C, so I have the idea of ​​writing this game in C to learn more about memory management, OOP etc. I've never done basic c programming but with graphics, so I do not know where to start from.

Which libraries should I use to write simple 2D games in C? GTK +? Cairo libraries? Can you recommend any tutorials? Graphics libraries?

Thanks

I recommend using SDL graphics libraries here There are very good tutorials and performances ... and here for the tutorial ... Hope it goes well!


html5 - What are situations with western languages where you'd use HTML 5's Ruby element? -


HTML5 is presenting a new element:; Here is the description of the W3C:

The Ruby element allows to mark one or more spanning content with Ruby annotation. Ruby annotations are short runs of text presented with the original text, mainly used as a guide for pronunciation in East Asian typography, or to include other annotations. In Japanese, this form of typography is also known as Furigana.

Then they go to give some examples of Ruby annotation in the use of Chinese and Japanese texts. I'm thinking: This element will only be useful for pre-Asian HTML documents, or in other western languages ​​like English, German, & lt; Ruby & gt; There are good sense applications for elements, Spanish, etc.?

As a linguist, I & lt; Ruby & gt; An example for marking linguistic instances with various theoretical informational conventions, which comes to mind, shows the level of tone in autozendable phonetics, can be seen in recent webkit / chromium (at least) Here's a quick example:

Currently, this type of notation is left for latex and friends, and if on the web, usually a Non-accessibility F-worthy image.


dojo - Browsers supporting event processing in dojox.gfx Surface -


Is processing events in dojox.gfx supported by browsers other than Firefox 3?

Say, I have a variable named Surface which is an example of the GFX surface, then I

surface.connect ("onclick", null, function (e ) {Console debug ("clicked on surface");});

It works in Firefox 3, but it is not in IE 8, Chrome 3, Agni Safari 4. I can do anything about it, or it is by those 3 browsers is not supported?

Thank you!

It should work everywhere but a surface is a container, not an object clicked on the shapes Try if you still want to use the container, then try clicking on the DOM node used to define your surface.


javascript - How to detect which row [ tr ] is clicked? -


In JavaScript, how can we find out which row the table is clicked on? What I am currently doing, I am complying with the method of running this way.

  onload = function (if (! Document.getElementsByTagName ||! Document.createTextNode) Return; Var rows = document. GetElementById ('my_table') GetElementsByTagName ('Toby') [ 0] .getElementsByTagName ('tr'); (I = 0; i & lt; rows.length; i ++) {rows [i] .onclick = function () {Warning (this.rowIndex + 1); }}  

[copied []]

But I do not like this view. Is there a choice? My problem is only to get an indicator of that line

  • Do not please any jQuery: D.

In fact, you add a click handler to your table. This handler reads the tag of the clicked element and takes the dot tree upwards. If that line is not found, if one row is found, then it works on it and returns. Some such (has not been tested yet, but you can give the idea):

  var table = document.getElementB YId ('my_table'); Table. Click on = function (e) {E = E || accident; Var Event EL = ESRC Element || E.target, parent = event alpherate node, isRow = function (L) {returns el.tagName.match (/ tr / i)); }; // The DOM can be reached till reaching the top (parent = parent.parentNode) {If (IRRO (original)) {// row meets, do something with it and return, e.g. Warning (parent.rowIndex + 1); Back true; }        }        return false; };  

What does it mean by C++ runtime? -


सी ++ रनटाइम द्वारा की जाने वाली सभी गतिविधियां क्या हैं?

यह आपके एप्लिकेशन के स्टार्टअप और बंद को संभालता है, और इसे चलाए जाने वाले मुख्य सेवाएँ - प्रारंभ करना जैसी चीज़ें स्टैक और स्थिर चर, और ढेर और डिफ़ॉल्ट मेमोरी आवंटन प्रदान करना।


asp.net mvc - How to configure url routing if I have duplicate controllers or views -


I am a newcomer of ASP.NET MVC Framework, I am just wondering how to configure in my case.

I would like to create a URL in my MVC application as the following:

1)

2)

3)

4)

If I configure 'Statistics' and 'Information' as Controllers, can I create a folder under 'Folder'?

I know that if I use the area 'MVC version 2 framework, but I would like to know that it is possible that MVC 1.0 should be used.

Thanks in advance.

Take a look at this.

Update:

You can consider two things: - View - View 1

Say that your URL for the first Local Host / Category / Insert

The second URL for me can be Local Host / V1 / Category / Direct

> You can then use ASP.NET when the URL In V1, the path to the scene 1 / ... can be used to check, then.


Jquery drag and drop plugin between tables -


I am looking for a jquery plugin that makes it possible to drag and drop between two separate tables. I have a search result table and I want to make it possible to draw each table in another table to add it to that table in each table. Anyone have an idea on how to do this?

As others have pointed out, tables are the best solution. However, you can try to use lists instead, then connect them via the YuriSortable.

By doing so, you will be able to easily remove the list listed by your user.

Maybe you are not really after that, but it's certainly worth it :)


text - Reading different data from a textfile delimited with semicolons in C -


How to read different records of different data with semicolons in an array in C?

From the text file: Text one; 12.25; Give the text; 5; Lesson three; 1.253

  For phpen ... (i = 0; i  

General advice is to read the entire lines and then parse it With Sscanf or strtok, or whatever you find it easy to lose your place directly from the file in the sscanf input file (i.e. the first time something does not match, you need to back it up, as long as you cancel it here Do not want to.)


How to create XSLT transformation for srcML? -


I have a question about XSL conversions. Takes an example (in SOML), which represents a typed EF in C:

   

C Edition:

  TypeFIFNAM FNM {Value0 = 0, value1 = SOMECONST, value2 = SOMECONST + 1, valutop} TSAMANM;  

For example, Value2 ?

to remove the line with & lt; Xsl: template & gt; How to define

& lt; to delete the previous row (with the ValueTop ), including the previous comma. Xsl: template & gt; How to define

This is a bit difficult due to the nature of the "intersection text" of your input XML Especially handling a comma is not trivial, and my proposed solution is probably wrong (even if it works for this particular input), the syntax is complex and I do not know much about srcML because I have a comma handling part I advise to give a lot of thought.

Still, my attempt is to do it.

  & lt; Xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" xmlns: src = "http://www.sdml.info/srcml/src" Xmlns = "Http://www.sdml.info/srcml/src" & gt; & Lt ;! - The identity template is all copied as - & gt; & Lt; Xsl: template match = "node () | @ *" & gt; & Lt; XSL: Copy & gt; & Lt; Xsl: apply-select template = "node () | @ *" /> & Lt; / XSL: Copy & gt; & Lt; / XSL: Templates & gt; & Lt ;! - Removes any matching element from empty template output - & gt; & Lt; Xsl: template match = "src: XPP [src: name = 'value2']" /> & Lt; Xsl: template match = "src: expr [last] ()]" /> & Lt ;! - This template handles comta after expression - & gt; & Lt; Xsl: template match = "text () [normal-location () = ',']" & gt; & Lt ;! - Select the following node, but only if it & lt; Expr & gt; Element - & gt; & Lt; Select xsl: variable name = "expr" = "following-sibling :: * [1] [self: source: expr]" /> & Lt ;! - Apply template for this, save result - & gt; & Lt; Xsl: variable name = "check" & gt; & Lt; Xsl: Choose Apply-Template = "$ expr" /> & Lt; / XSL: variable & gt; & Lt ;! - If something was returned, then this comma needs to be copied - & gt; & Lt; Xsl: if test = "$ check! = ''" & Gt; & Lt; Xsl: Copy / & gt; & Lt; / XSL: If & gt; & Lt; / XSL: Templates & gt; & Lt; / XSL: stylesheet & gt;  

was my input (I used the srcML namespace for example):

  & lt; Unit xmlns = "http: // www. Sdml.info/srcml/src"> & Lt; Typedef & gt; Typeface & lt; Type & gt; & Lt; Enum & gt; Anem & lt; Name & gt; Some anemm & lt; / Name & gt; & Lt; Block & gt; {& Lt; Expr & gt; & Lt; Name & gt; Value 0 & lt; / Name & gt; = 0 & lt; / Expr & gt ;, & lt; Expr & gt; & Lt; Name & gt; Value 1 & lt; / Name & gt; = & Lt; Name & gt; SOMECONST & lt; / Name & gt; & Lt; / Expr & gt ;, & lt; Expr & gt; & Lt; Name & gt; Price 2 & lt; / Name & gt; = & Lt; Name & gt; SOMECONST & lt; / Name & gt; + 1 & lt; / Expr & gt ;, & lt; Expr & gt; & Lt; Name & gt; Price type & lt; / Name & gt; & Lt; / Expr & gt; } & Lt; / Block & gt; & Lt; / Enum & gt; & Lt; / Type & gt; & Lt; Name & gt; TSomeEnum & lt; / Name & gt; & Lt; / Typedef & gt; & Lt; / Unit  

More results:

  & lt; Unit xmlns = "http://www.sdml.info/srcml/src" & gt; & Lt; Typedef & gt; Typeface & lt; Type & gt; & Lt; Enum & gt; Anem & lt; Name & gt; Some anemm & lt; / Name & gt; & Lt; Block & gt; {& Lt; Expr & gt; & Lt; Name & gt; Value 0 & lt; / Name & gt; = 0 & lt; / Expr & gt ;, & lt; Expr & gt; & Lt; Name & gt; Value 1 & lt; / Name & gt; = & Lt; Name & gt; SOMECONST & lt; / Name & gt; & Lt; / Expr & gt; } & Lt; / Block & gt; & Lt; / Enum & gt; & Lt; / Type & gt; & Lt; Name & gt; TSomeEnum & lt; / Name & gt; & Lt; / Typedef & gt; & Lt; / Unit & gt;  

windows installer - Custom uninstaller for a WIX generated MSI -


I have an MSI that is being generated from the WIX script.

My question is similar to this

I want to create a custom uninstaller instead of using the default MSI Uninstaller.

I'm thinking of adding a custom action that executes after PublishProduct or goes before InstallFinalize and modifies the registry entry that specifies the uninstall string to be used.

I am not concerned about compatibility with SMS or similar products.

What do you think about this method?

It is not easy for whatever reason, the ARP does not respect uninstallation on the MSI package. Then to change it you have to set ARPSYSTEMCOMPONENT and validate all the different upgrade and removal paths you would like to support at any time. Heath Stewart is related to this, which helps them calculate potential scenarios and common problems.

I believe this series was written in the MSI 3.x era, so it probably does not address any new concerns in Windows Vista or later, and MSI 4.5 patch-uninstall custom Could not take advantage of the action flag.


Calling Web-Service / Website from Java -


Writing some extra classes for an existing GWT project I need it:

  • A URL Request for
  • Read back in the webpage to perform the operation.

The back page is in very simple HTML, so parsing should not be difficult, I must first get the data.

How can I do this in Java? With the original Java API you can read using a URL. I / O

Here's a basic example:

  URL url = New URL ("http://www.stackoverflow.com"); URL Connection URL Connection = url.openConnection (); InputStream results = urlConnection.getInputStream (); BufferedReader Reader = New BufferedReader (New InputStreamReader (Results)); String line = null; While ((line = reader.readline ()) = null {} System.out.println (line); } Reader.close ();  

You can feed any DOM / SAX parser to your taste by InputStream . The average parser can take a InputStream argument as straight. One of the better HTML Parsons is.

: //www.stackoverflow.com ") .openStream ();

performance - WCF ChannelFactory and Channel caching in ASP.NET client application -


I am creating a series of WCF services that are being used by more than one app because of the WCF I'm trying to define a general library to access services.

To know that different users must use a different channel for each service request, I am thinking of the channel per-request cache ( HttpContext.Current.Items ) And ChannelFactory are used to create per channel ( HttpApplication.Items ) channel because I can create more than one channel from the same ChannelFactor .

However, in relation to closing channel fighter and channel, I have a question about this cache mechanism

  1. Can I use the channel at the end of the request After shutdown, or to close it, to fix it (?) When the reference to that request dies?
  2. What about ChannelFount? Since each channel is connected to the channelfactor, which is made, is it safe to maintain the same channelphiniter during the application process (App Doxane)?

To manage this I am using:

  Public class ServiceFactory {Private Stable Dictionary & lt; String, Object & gt; List unfolded channels [get {if (null == HttpContext.Current.Items [HttpContext.Current.Session.sidid + "_ListOfOpenedChannels"]) {HttpContext.Current.Items [HttpContext.Current.Session.SessionID + "_ListOfOpenedChannels"] = New Dictionary & Lieutenant; String, Object & gt; (); } Return (dictionary & lt; string, object & gt;) HttpContext.Current.Items [HttpContext.Current.Session.SessionID + "_ListOfOpenedChannels"]; } Set {HttpContext.Current.Items [HttpContext.Current.Session.SessionID + "_ListOfOpenedChannels"] = Value; }} Public Static T CreateServiceChannel & lt; T & gt; () {String key = typeof (T) .name; If (ListOfOpenedChannels.ContainsKey (key)) {Return (t) listoffocked channel [key]; } And {ChannelFlate & lt; T & gt; ChannelF = new channel factory & lt; T & gt; ("IUsuarioService"); T channel = channelF.CreateChannel (); ListoffApplied Channel Add (key, channel); Return channel; }}}  

Thanks!

Ideally close the channel as soon as you are done with it back into the channel pool So that it can be used by another worker thread.

Yes, the channel factory (expensive bit) can live in the lifetime of the application.


Update

.Net 4.5 is one of the caching options for factories as


r - How to assign from a function which returns more than one value? -


Still trying to enter R logic ... the "best" to open the results (on LHS) What is the way to return a number of values ​​from the function?

I can not do this apparently:

  R> FunctionReturningTwoValues ​​& lt; - Function () {Return (C (1, 2))} R & gt; Returning function value two () [1] 1 2R & gt; A, B & L; - Returning function two values ​​() error: unexpected ',' in 'A,' R & gt; C (a, b) & lt; - functionReturningTwoValues ​​() c (a, b) & lt; Error in functionReturningTwoValues ​​(): Object 'a' not found  

Should I really do the following thing?

  R & gt; R & lt; - Returning function two values ​​() R & gt; A & lt; - r [1]; B & L; - r [2]  

Or will the R programmer write something else:

  R> FunctionReturningTwoValues ​​& lt; - Function () {Return (List (first = 1, seconds = 2))} R & gt; R & lt; - Returning function two values ​​() R & gt; R $ first [1] 1 r & gt; R $ second [1] 2  

--- Edit to answer Shen's questions ---

Let me actually name the parts with the result value Do not need to. I am implementing a composite function for the first component and one second component ( min and max ), if it was the same task for both components, Will not need them).

(1) list [...] & lt; - I had a decade ago posted on it. It does not require a special operator but it is necessary that the list should be written on the left hand side like [...]

  # first run source command Displayed below or installed other and load gsubfn dev pkg (see note) list [a, b]  

Note: Recently list has been added to its development version and it can be obtained through the following:

  source ("https: // Raw.githubusercontent.com/ggrothendieck/gsubfn/ Master/R / list.R ")  

or install and load the gsubfn github development package (using devtools package):

  devtools :: install_github ("Ggrôndndieck / gsubfn") library (GSUBFN)  

If you only need first or second component Also do all the work:

  list [A] & lt; - functionReturningTwoValues ​​() list [A,] & lt; - Function Returning Value () List [, B] & lt; - Return function two values ​​()  
<(> if you only need one value then functionReturningTwoValues ​​() [[1]] or functionReturningTwoValues () [[2]] will suffice.)

See the quoted R-help thread for more examples.

(2) with If the intention is to add multiple values ​​later and return value is named, then with a simple option with :

  myfun & lt; - List of functions (a = 1, b = 2) [a, b]] and  / P> 
  attached (myfun ()) a + b  

Added: with and attached


redirect - Apache mod_rewrite - rewriting from subdomain to main domain -


I want to redirect a url abc.xyz.com/123 to xyz.com. Therefore, the file that will be delivered will be xyz.com's index.php. That index. FPP should be available for both ABC and 123 (hence 123 $ _SERVER ['PHP_SELF'], and ABC will exit from $ _SERVER ['HTTP_HOST'] to enable appropriate processing.

< P> abc.xyz.com already goes to xyz.com (though by my service provider's configuration), and ABC can be removed from $ _SERVER ['HTTP_HOST'] However, abc.xyz.com/123xyz In the root directory of .com, a folder named 123 is looking for, and it is showing a 404 error. No one can get it.

Please give me a line to enter in .htaccess to enable abc.xyz.com/123 to call index.php of Xyz.com. ($ 123 with $ $ _SERVER ['PHP_SELF'] can be available? I do not think so

Maybe doing some work For example:

  Reviving OnRyRightCound% {HTTP_HOST} .xyz.com [NC] Rewritable ^ (. *) $ Index.php? Param = $ 1 [L, QSA]  

So, basically, if the HTTP host has .xyz.com (dot in front) The presence of this ensures that it is only for the subdomain), then whatever is being attached to the index.php, the domain is attached as $ $ _GET ['param'].


Bitmap (of a signature) comparison in c# -


We are a fun project for which we need to compare two black and white bitmaps of two signatures and say that they Signature of individuals or not, because it is just two load bitmaps instead of data obtained from tablets, the approach for general signature recognition will be slightly different.

I'm thinking that the following steps will be required

  • just crop the bitmap into the signature
  • To make them rotate, Try to work on
  • Change the shape to make the crop / rotated bitmap equal
  • Analyze the signature inside (maybe breaking into a grid)

Do anyone have any ideas on this project? How to best perform rotation, comparison etc. Does anything look the same?

You might want to see: interesting pictures (for D) as well as image similarities Example of the method of comparison:

There are two main types of neural networks - supervision and unstable. SOMs are uncertain. Depending on your situation, you want to take a look at the supervised NN, and generally it is quite easy to implement for the most part.


c# - What is the .NET equivalent of java's System.getProperty("user.dir")? -


I am trying to get the full path of a file in my unit test which is in the folder in my project

  Directory.GetCurrentDirectory () has tried to use;  

But it returns to the directory that is running my tests. I want to put the directory of the project (or solution) over there without hard-code. Then I can add the last part of the file name.

   

in

= "Post -text "itemprop =" text ">
  path. Gate directory name (assembly Gate accidental status (location). Location)  

you unit running

to access a file in a project subfolder, Working Easy To mark relevant files as Build = Content and copy output directory = if new, copy . If you do so, whenever you build this project, they will be copied to the corresponding folder below the assembly folder.

  • You have & lt; Project Root & gt; \ TextData is a text file, for example:
    • \ Data1.txt .
    • When you create a project in debug mode, it will be & lt; Project Root & gt; \ Bin \ Debug \ TestData \ Data1.txt .
    • The physical path in your code will be path.combin (path.gate directoryname (assembly assembly. Assembly (location.), "Test data \ data1.txt") .

performance - Java threads: interpreting thread states of a running JVM -


The Java thread is always one of the following ten states:

  new: just start In the process of getting started, i.e. NEW_TRANS: analog transition state (not included, used for completeness) IN_NATIVE: Initial code running IN_NATIVE_TRANS: compatible transit state. IN_VM: VM is running IN_VM_TRANS: compatible transit state. IN_JAVA: Running in Java or Stub code. IN_JAVA_TRANS: Analog transition state (not included, used for completeness) was blocked: Blocked in VM Blocked / Grays: compatible transition status.  

Unused state ( uninitiated) ) has been omitted from the list.

While the definitions of states are given above I look for "rule-of-thumb" for the interpretation of the thread set for the ongoing accessory, and more specifically:

  • 100 threads: 35 blocked 113 threads: 35 blocked , 77 IN_NATIVE , 1 IN_VM , 65 IN_NATIVE
  • / code>
  • 52 thread: 38 blocked , 1 IN_JAVA , 6 IN_NATIVE , 7 IN_VM
  • 120 threads: 39 blocked , 1 IN_JAVA < / Code>, 80 IN_NATIVE < / Code>
  • 94 sources: 34 blocked , 59 IN_NATIVE , 1 IN_NATIVE_TRANS
  • Statistics for each thread of five - What can be estimated in relation to the overall JVM state? "In this scenario JWM looks useless waiting for requests", "Machine busy processing request", etc.

    The output of this level does not provide enough information to make such statements.

    For example, consider the blocked state: there are many things that can block the thread. Two of them are waiting for the data to come from the customer, and are waiting for the data to return from the database. In the first case, your application is useless, in the second it is overloaded.

    EDIT: Not seeing output from JSTAC, I think these two conditions can also be displayed as IN_NATIVE, however, in one comment it has been written: You do not Know what they are doing, so you can not make any statement about the entire application.


    functional programming - How to make Haskell compute the correct polymorphic type? -


    I realized how small-function might be useful.

    Ex:

    <<> Commandbill Lang = sort by (compare `current`)

    But unfortunately, Can be intuitive.

    Definition

      f on `g = \ xy - & gt; F (g x) (g y)  

    for an example

      (x = y)>  (Length x) == (length y)  

    But there are different types in both!

    In the first [a] - & gt; [A] - & gt; Boole while in the second, the more common type of [a] - & gt; [B] - & gt; Bool .

    It clearly denies the length of the correct word like (but (==)) [1, 2, 3] ["one", "b", "c"] (which should generate true , but still fails to type-checking).

    I know that this restriction comes because of the use, but how far is it? Can someone design an implementation on , which can deal with polymorphic works (using universal quantification / rank-N types) correctly?

      {- # LANGUAGE rank 2 type # -} at ':: (a - & Gt; a - & gt; b) - & gt; (Forall DCD -> A) -> Ce -> Cf -> Fgxy = f (gx) on B Gy)  

    The result of

     prelude> : at t '(==)  at (==) :: ( Eq a) => (Forall DCD -> A) -> CE -> CF -> Bull Prelude> : On T (==) Length: [E] -> gt; [F] -> On the other side, this signature also invalidates the  flag 'id , which is invalid Something less than desirable. 


      {- # LANGUAGE TemplateHaskell # -} Import Haskell.TH onE fg = dox & lt; - The new name "x" y & lt; - The new name "y" lamE [varP x, varP y] $ f 'appE` (g' api 'x) `Ape '(G`APE' veerie Y)  
    : Set -xtemplateHaskell prelude> $ (on | [| (==) |] [| length] ] [1,2,3] ["A", "B", "C"] True Prelude> $ (OnE [| (==) |] [| Id |]) 4 5 false 

    seo - Is "&" character inside url segment allowed? -


    "and" url is allowed in the character? What effect does the url have if it is illegal and is present? I am looking for an answer from an SEO approach.

    Example:

    rootdomain.com/Black&Decker/products

    It is allowed as part of the separation of parameters specified in GET (among other places).

      http://example.com / Query = a = 1 & amp; B = 2  

    defines a = 1 and b = 2 .

    Note that & amp; Under RFC3986 there is a reserved character See percent encoding for more details.


    What defines the availability of the DOM `document` property in the javascript global object? -


    I am new to JavaScript and trying to understand it that defines what kind of EcmaScript W3C DOM standard and JavaScript Interoperate. In particular, as I understand it I:

    ECMAscript provides standard defines the existence of the global object, which parseInt (string) functions such as and clear Form allows the presence of other underlying objects arriving through it, but their definitions are left to implementation.

    W3C DOM defines a set of standard objects and interfaces that correspond to the structure of an HTML document. One of these is the document object (uppercase D), which has methods like getElementById . Although this specification, as far as I understand it, does not define how an example of such an object representing the present document in the browser can be obtained.

    In fact, what I'm after - when this place is clearly stated that execute JavaScript in the web page, I document.getElementById ( "SomeId") (Notice lowercase D), and that the document property represents DOM in which the JavaScript is executed?

    Is this an especially implementation-specific extension? It should not be standardized somewhere? The closest I can get is Gecko DOM document that document and document Equivalent appears I thought JavaScript was the case sensitive? Or am I really getting anal about the interpretation of these things?


    Edit:

    After commented Jason HTML5 standard traveling through the work of the draft, I am that I see / is

    6.5.3.3 Creating a script

    ... The user agent must run the following steps:

    4 . Set the script's global object, script browsing context, script URL character encoding and script of the original URL

    6.5.3.1 State which global objects

    < P> "This is usually a window object. In Javascript, it corresponds to a global object."

    Next, 6.1 browsing context states

    "The main view through which a user interacts with a user agent primarily, the default view The AbstraSave object, which represents this view, must also implement the window interface, and it is referred to as the document's window object. Activate WindowProxy object The implementation of the document property as the object of the default view window Stavejh. "

    Since Abstrov interface Dom 2, it seems that it defines the existence of JavaScript global document properties.

    Despite this I have been steady for a decade, Nominated in the form of "DOM level 0" And it has never been standardized.

    , and it will be standardized in HTML5 (an upcoming W3C standard).

    For case-sensitivity: document is the name of an interface. This is a type of document document document is correct.

    HTMLDocument is another interface. An example of the document HTMLDocument is also true.


    JavaScript getElementByID() not working -


    इस सवाल का पहले से ही एक उत्तर है: < / P>

    • 6 जवाब

    क्यों refButton निम्नलिखित कोड में null मिलता है?

      & lt; html & gt; & Lt; शीर्ष & gt; & Lt; title & gt; & lt; / title & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; Var refButton = document.getElementById ("बीटीएनबटन"); RefButton.onclick = समारोह () {चेतावनी ('मैं क्लिक कर रहा हूँ!'); }; & Lt; / स्क्रिप्ट & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; form id = "form1" & gt; & Lt; div & gt; & Lt; इनपुट आईडी = "बीटीएन बटन" प्रकार = "बटन" मान = "मुझे क्लिक करें" / & gt; & Lt; / div & gt; & Lt; / प्रपत्र & gt; & Lt; / body & gt; & Lt; / html & gt;  

    इस बिंदु पर आप अपने फ़ंक्शन को बुला रहे हैं, बाकी पृष्ठ ने गाया नहीं है और इसलिए तत्व उस बिंदु पर अस्तित्व में नहीं है। अपने कार्य को window.onload पर कॉल करने का प्रयास करें ऐसा कुछ:

      & lt; html & gt; & Lt; शीर्ष & gt; & Lt; title & gt; & lt; / title & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; Window.onload = function () {var refButton = document.getElementById ("बीटीएनबटन"); RefButton.onclick = समारोह () {चेतावनी ('मैं क्लिक कर रहा हूँ!'); }}; & Lt; / स्क्रिप्ट & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; form id = "form1" & gt; & Lt; div & gt; & Lt; इनपुट आईडी = "बीटीएन बटन" प्रकार = "बटन" मान = "मुझे क्लिक करें" / & gt; & Lt; / div & gt; & Lt; / प्रपत्र & gt; & Lt; / body & gt; & Lt; / html & gt;  

    Multi-statement Macros in C++ -


    सी ++ में , क्या बहु-स्टेटमेंट मैक्रो नेस्टेड यदि बयानों के अंदर से नीचे की तरह की तरह? मैं इसे थोड़ी देर के लिए प्रयास कर रहा हूं और मुझे दूसरा मौका मिल रहा है अगर बयान ' प्रतीक ' को देखने में सक्षम नहीं है। शायद मुझे मैक्रो को आगे समझने की आवश्यकता है।

      # MATCH_SYMBOL परिभाषित करें (प्रतीक, टोकन) यदि (कुछ == प्रतीक) {if (symbol == '-') {} else if (symbol! = '-') {} अन्य कदम; }  

    बहु-लाइन मैक्रो के लिए आपको \ < / कोड> चरित्र को मैक्रो प्रोसेसर को अगली पंक्ति पर मैक्रो को पार्स करना जारी रखने के लिए आखिरकार आखिरी पंक्ति के अंत में वर्णित करें, जैसे:

      # परिभाषित MATCH_SYMBOL (प्रतीक, टोकन) \ यदि (कुछ == प्रतीक) {\ if (प्रतीक == '-') {\} और अगर (प्रतीक! = '-') {\} \ अन्य कदम; \}  

    अभी, यह इसे 1-लाइन मैक्रो के रूप में व्याख्या करने का प्रयास कर रहा है और फिर आपकी फ़ाइल के शीर्ष पर कुछ वास्तविक कोड है, जो कि आप क्या चाहते हैं:

      # MATCH_SYMBOL (प्रतीक, टोकन) // परिभाषित करें ... गलत तरीके से सोच रहा है कि यह अलग है ... अगर (कुछ == प्रतीक) {// प्रतीक कभी परिभाषित नहीं किया गया था, क्योंकि मैक्रो कभी नहीं था यहां इस्तेमाल किया! अगर (प्रतीक == '-') {} और अगर (प्रतीक! = '-') {} अन्य चरणों; }  

    linux - Weird Subversion permissions issue -


    I am trying to set up SVN on a CentOS 5 system so that many people can use a repository.

    • I created the repository on / var / svnrepository .
    • I have added a subversion user and group
    • I've ensured that all system users are in the subversion group.

    The problem I am facing is that when I commit a decision, the SVN apparently creates a file which is named db / current And has its own user name and group. Then say that my username is jimbo ...

      -rwxrwxr-x 1 jimbo jimbo 11 December 2 01:09 current  
    < P> After that no one else can check anything after that. They get permission denied error. There is a similar problem with the file named

    db / format .

      file / var can not open / svnrepository / contactdb / trunk / format: permission denied  

    Has anyone seen this? Know about a solution?

    All Repository Access S.S. is through.

    The strange thing is that I have set up SVN on Linux and have never done this problem. I do not know why I am doing this differently at this time.

    Note that this is usually setGID, set to the Subversion repository directory and their child directories:

      drwxr-sr-x svnowner svnusers 4096 2008-11-01.  

    By chmod 775 you unset this setGID bit and this is because there are problems:

    Setgid means: If you create a file, So group svnusers (in my example), not your primary group

    I'm sure you do not have a SetGID bit set, right?

    However, it is better to replace folders GID:

      chmod g + s  

    It is best that you see in the newly created repository to match the permissions.


    c++ - How to call erase with a reverse iterator -


    I am trying to do something like:

     for  (std :: List & lt; cursor :: and & gt; :: reverse_iterator i = m_CursorStack.rbegin (); i! = M_CursorStack.rend (); ++ i) {if (* i == pCursor) {m_CursorStack.erase (i ); break; }}  

    However erasing takes an iterator and not a reverse itater. Is there a way to convert a reverse itater into a regular iterator or another way to remove this element from the list?

    After some more research and testing I found the solution clearly [24.4.1 / 1] According to the relationship between i.base () and i is:

      & amp; * (Reverse_itreator (i)) == & amp; * (I - 1)  

    (from A):

    So you have to apply an offset if you get support (). The solution is therefore:

      m_CursorStack.erase (- (i.base ()));  

    Edit

    Update for C ++ 11.

    The reverse_ititor i is unchanged:

      m_CursorStack.erase (std :: Next (i) .base ());  

    The reverse_terator i is advanced:

      std :: advance (i, 1); M_CursorStack.erase (i.base ());  

    I find it very clear from my previous solution, use whatever you need.


    loops - PHP adding leading 0 to range -


    मैं इसे 1-9 के लिए अग्रणी 0 कैसे प्रदान करूं?

      & lt ;? Php foreach (श्रेणी (1, 12) $ माह के रूप में):? & Gt; & Lt; विकल्प मान = "& lt;? = $ माह? & Gt;" & gt; & lt;? = $ माह? & Gt; & lt; / विकल्प & gt; & Lt;? Php endforeach? & Gt;  

      & amp; php foreach (श्रेणी (1, 12) $ के रूप में माह):? & Gt; & Lt; विकल्प मान = "& lt;? = Sprintf ("% 02d ", $ माह)? & Gt;" & gt; & lt;? = Sprintf ("% 02d", $ माह)? & Gt; & lt; / विकल्प & gt; & Lt;? Php endforeach? & Gt;  

    आप संभवत: sprintf के मूल्य को एक चर में सहेजना चाहते हैं, इसे कई बार कॉल करने से बचने के लिए।


    wpf - Add User Settings at runtime in a c# application -


    I want to add new settings to user.config at runtime for the C # application (WPF). These settings will be linked to the independent module, so I do not know what they will be in advance.

    View most examples:

      configurationconf = configurationManager.OpenExeConfiguration (ConfigurationUserLevel.No.);  

    But it only allows you to access application settings and you can not save it in any way because it does not mean that it should be modified.

    I do something like

      settings. Default.ed ("something", "an object"); Settings. Default. Save ()  

    After that this setting will be available the next time, when this specific user will start the application.

    It is possible, but this is a lot of code.


    java - What is InputStream & Output Stream? Why and when do we use them? -


    कोई मुझे समझाता है कि InputStream और OutputStream क्या हैं?

    मैं दोनों InputStream और OutputStream के लिए उपयोग मामलों के बारे में उलझन में हूँ।

    यदि आप जाने के लिए कोड का एक स्निपेट भी शामिल कर सकते हैं आपके स्पष्टीकरण के साथ, यह महान होगा InputStream और OutputStream

    > इनपुट और आउटपुट के अलग-अलग तरीके हैं: चाहे स्ट्रीम एक फ़ाइल है, कोई वेब पेज , या स्क्रीन को कोई फर्क नहीं होना चाहिए । सभी मामलों में यह है कि आपको स्ट्रीम से जानकारी प्राप्त होती है (या उस स्ट्रीम में जानकारी भेजती है।)

    InputStream का उपयोग कई चीजों के लिए किया जाता है जो आपने पढ़ा है।

    < P> आउटपुटस्ट्रीम का उपयोग कई चीजों के लिए किया जाता है जो आप लिखते हैं।

    यहाँ कुछ नमूना कोड है यह मानता है कि InputStream instr और OutputStream osstr पहले से ही बनाया गया है:

      int i; जबकि ((i = instr.read ())! = -1) {osstr.write (i); } Instr.close (); osstr.close ();  

    c# - pushing to live asp.net web application. Security Exception -


    I would like to help with the following asp.net error, after deploying my app for my living now < / P>

    Description : Attempted to not allow any action by security policy, please contact your system administrator to grant this application permission, or Change the trust level of the application in the configuration file

    Max Ansh to edit the post web config file and adds to allow the Trust. I read it but I am not really able to understand it.

    If it helps clarify things, then it helps to clarify things. I can connect to the database and recover the results using LINQ.dbml DataContext. However, when I try and assign the results of the object, say for example. Data reference is an external project that is compiled in DLL and puts it in bin folder.

      DataContext db = new DataContext ("connection string"); Var Bank Users = (From DB.Bankers in U. where U.BinkerEmail == TXT_user.Text and & u.banker_password == TXT_pass. Select Text U). Single ();  

    It throws the error posted above.

    I have access only through the control panel, so any changes will have to be in web.config. I have made this project my own application pool

    Hi, In your web configuration,

    P>

    try it & lt; Trust level = "full" /> and we'll see what happens ... just try it ...

    source


    .net - Issue in resizeing an image to thumbnail size -


    I have an image where I am changing the image to thumbnail size, if I am using image size So this works fine [700 (width) * 600 (height)] The size of the origold reveals that I have a figure of 10 size

    But if I measure the size of an image [ 1100 * 1200] Origal size , its size changes, the image in the thumbnail but does not match the size of the image of other thumbnails

    The image that is shown in the control of the view All images that are shown in size [700 * 600] in a shape

    Image which is [1100 * 1200] In size, appears in a shape [slightly smaller than other images]

    So when I display the image in the list view control, it shows that all 10 The images are shown in a shape, but an image is shown in smaller sizes

    and some images are loaded properly some times

    but some images are not shown only for some images 10 images 2 images did not show sre

    < Pre> System.Drawing.Image objImage = System.Drawing.Bitmap.FromFile (System.Web.HttpContext.Current.Server.MapPath (@ "Images" "+ SImageFileName)); If (sImageFileName! = Null) {if (iThumbSize == 1) {dHeight = objImage.Height; DWidth = objImage.Width; DNewHeight = 100; DNewWidth = 100; ObjImage = objImage.GetThumbnailImage ((int) dNewWidth, (int) dNewHyight, new system.Drocking image.GetThumbnailImageAbort (callback), new IntPtr ()); }

    This code I am using, I am setting the size and width to size 100

    Any help would be great thanks

    I do not think what is the problem with your code, however, I instead have a graphics Using an object to suggest the object is an example:

      bitmap newImage = new bitmap (newwait, newhigh); Using (graphics gr = graphics.frame image (new image)) {gr.SmoothingMode = SmoothingMode.AntiAlias; Gr Interpolation mode = InterpolationMod. Highquite bibbic; Gr.PixelOffsetMode = PixelOffsetMode.HighQuality; Gr.DrawImage (srcImage, new rectangle (0, 0, NewWind, NewHead)); }  

    mysql - Questions on Auction Database Schema -


    I was considering the following and I had some questions about it. I'm sure this is a good design because the man is appropriately qualified behind it, although some things do not understand:

    1. Why did he separate the bidders and sellers? I thought that you will have users, and users can bid and sell items. In the context of the user table, you will have a bid table with reference to the user, and there will be an auction table. He is talking a lot in his tutorial to make sure that the models are scalable and ready for change (for example there is no status column, there are other tables and situations in context), so what is happening here ?
    2. Why their plans are like "date of planned shutdown" and "winner." This data is not repetitive, because the last bid time (for the action that uses entries, using the last bid) The date can be calculated and the winner is the last bid when the auction is closed ..?

    FYI: I am trying to make my own auction site scratch in PHP / MySQL and it is proving very difficult, so the tutorial will be great on this!

    Thank you!

    Why is it different from bidders and sellers?

    The specific columns for each of the tables are unique, so they keep them separate. I actually go with the user and the sub-type bidder and the seller to the user, such as: / P>

      Tables User (UserID (PK), ... All General Fields for Any User) Table Bidders (UserID (PK, FK) ... All Fields for Bidders) Table Vendor ( User ID (PK , FK) ... specific field for all vendors)  

    c# - How to add a Panel to SplitContainer? -


    I am using Split Container and it has only 2 panels but I need 3 (panel).

    Question:

    Is it possible to add Split Container to more panels?

      If yes, how? why not?  

    Thanks: -)

    Strictly speaking, it's not possible . However, you can use the second SplitContainer in one of the SplitContainer panel in the first to get similar results.


    c# picturebox memory releasing problem -


    I would like to refresh a GUI picture box in a newby I repeatedly worker thread in C #. The image has been obtained from a camera in which the driver has been voted with a gateimage method which retries to display the image. Even if I allot the bitmap by using the "use" director and I clearly call GC, the memory is never distributed.

    worker thread goes something like this:

      while (true) {// array of IR requested image (UInt16 with signal values) image = axLVCam.GetImage (0 ); Lut = axlvcam.GetLUT (1); Draw pictures (image, booty); //GC.Collect (); }  
    a

    while something like

      is the public zero DrawPicture (object image, object is limiting) <[...] // We image - Put it to the right type of system. UIInt16 [,] im = Image as System.UInt16 [,]; Float [] lutTempConversion = lut float []; Int lngWidthIrImage = im.GetLength (0); Int lngHeightIrImage = im.GetLength (1); Update image control // SetControlPropertyThreadSafe (tempTxtBox, "text", using String.Format (- (Bitmap bmp = new Bitmap (lngWidthIrImage, lngHeightIrImage)) {[... bitmap many operations on pixel ...] // Bitmap Ready for "{0: 0. #}", Latemap conversion [im [160, 100]]); //tempTxtBox.Text = string.Format ("{0: 00000}", IM [160, 100]); //System.Drawing.Image.FromHbitmap (bmp.GetHbitmap ()); Pic.Image = System.Drawing.Image.FromHbitmap (bmp.GetHbitmap ()); }}  

    Problems arise with

    pic.Image = System.Drawing.Image.FromHbitmap (bmp.GetHbitmap ());

    actually Commenting on the code of the line, that as garbage collection such works better, appears with the problem

    System is. Drawing Image FHTHMMAP (BMP GateHbitmap ())

    Any advice to solve this memory leak?

    Thanks a lot!

    Image tools IDisposable , so you < Code> Dispute should call each Image example, when it is no longer necessary to try to change this line in your code:

      pic.Image = System.Drawing.Image.FromHbitmap (bmp.GetHbitmap ());  

    with this:

      if (pic.Image! = Null) {pic.Image.Dispose (); } Pic.Image = System.Drawing.Image.FromHbitmap (bmp.GetHbitmap ());  

    This will resolve the previous image (if any) before handing it over to the new image.


    Hibernate Code Generator does not generate anything -


    I try to develop a wicket-based web application using a hibernate on a model layer with a post-grance db I am here.

    I have created all my tables manually and I am trying to reverse engineer the code from the tables downloaded from the hibernate code generator tool.

    I created hibernate.cfg.xml and hibernate.reveng.xml . In addition, I am able to browse tables from Hibernate perspective.

    When I provide the option to create a specified domain as well as hbm files then the code generator runs with the exporter settings package, it does not generate anything Does.

    Environment used:
    Eclipse 3.5 (Galileo)
    Postgrasses 8.3-604
    Wickets 1.3 Workspace

    All,

    I have worked / resolved the problem myself.

    The real problem was with the code generator tool [Hibernate tools-3.2.2GA-R200905070146-H18.zip] with Hibernate which does not produce HBM.xml and PiZo by reverse-angle method for Poster SQL DB. Does.

    I believe the tool does not reverse the Engeg support for Postgresql DB.

    Resolution / Resolution

    I changed my DB into MySQL and I was able to generate hbm.xml and pojo. I've tried Eagleps 3.5 Galileo and Eclipse Europa versions as well.

    Tips

    I have found a way to understand that the device has got support for DB that you use.

    Once the console configuration is built for your application, go to hibernate the perspective and extend DB. If you are able to see the DB column, then the device has got support to generate the code.

    The reason for this is that, when it was browsing for postgreSQL, it was not listing the columns of tables

    ~ Jegan


    math - How do I use the least squares approximation in MATLAB? -


    For homework work in linear algebra, I have solved the following equation using MATLAB's \ operator (

    which is the recommended way to do it):

     A = [0.2 0.25; 0.4 0.5; 0.4 0.25]; Y = [0.9 1.7 1.2] '; X = a \ y 

    which generates the following answer:

     x = 1.7000 2.0800 

    For the next part of the assignment, let me solve it less Using the same approximation of squares, the same equation (and then compare it to the former value to see how precise the exact estimate is).

    How do I get a way to do this in MATLAB?

    Earlier work: I got the function lsqlin , which is capable of solving the above type of equation, but I do not understand which logic It will neither provide nor in what order.

    mldivide , (" \ ") actually Does too According to:

    If a m-by-n matrix is ​​a matrix with a column vector or several columns with an ML components with m ~ = n and B, then X = A \ B is the solution of the least squares that understands under the equations- or a highly-defined system AX = B. In other words, the X standard (A * X-B) is minimized, the length of the vector AX-B is determined by the QR decomposition with the A-K column pivot (see algorithm for details). In the calculated solution, the maximum K ngezero element near the X is per column. If a & lt; N, this is usually not the same solution as x = pinw (a) * b, which gives solution of at least intersections.

    So in fact, what you did in the first assignment was to solve the equation using LSE.


    c# - Does static make it slow -


    Definitely how it works, but I have a question: - Can the static application be applied to the same variable The form slows down or the application is shared across the system, and using a request method or variable, while another has to wait for it to be released.

    No, it is not. Besides, .NET does not automatically lock the variable, because you Access them from different parts of the program at the same time. You have to lock yourself.


    .net - Word Count of .resx files -


    We will process our .resx files for translation. Since there is a lot to translate XML data in addition to strings in these files, I was looking for ways where we can translate words / strings. We have a Victorform Rex file

    Thank you.

      System Resources. Resource Resources Reader Reader = New System Resources. Rhesus Reciever (@ ".. .. .. ... form 1 .rex"); Foreach (system.collections.DictionaryEnterry de reader) {if ((string) de.Key.) (".text")) {System.Diagnostics.Debug.WriteLine (string.Format ("{0}: {1 } ", DK, D. Vale)); }}  

    visual studio - How do I avoid popping up an error dialog when my MSVS C++ app crashes -


    When my Visual Studio 2008 C + command line app crashes, it sometimes produces this dialog is.

    CommandProcessor.exe has encountered a problem and must close it.

    We are sorry for the inconvenience. If you were among some, then the information you were working on could be lost. For more information about this error, click here.

    I tried to release it and debug mode. (By the way, the debugger shows that divide it with a zero error.)

    If this is crashing, then I do not want to communicate that which blocks the application Does. How can I compile my application so that there is no communication from crash?

    Use catch (...) to catch all the exceptions with the EHA option Structured exceptions were included and writing console messages You can use VC ++ - specific __tray instead for structured exception handling, but this is a bit difficult for code.

    Although this will not protect you against situations when called by the C ++ runtime - like an exception during stack uniniling - you can call it set_terminate () and close it () Handler Also have to change.


    c - overwriting a specific line on a text file? -


    How do I write a specific file on a specific line in C.? I have values ​​in many variables that need to be written on the file.

    This works only when the size of the new line is the same:

    < Ul>
  • Open the file in a +
  • fseek () to start the file
  • Next line Before reading, use ftell () to keep the beginning of the line in mind
  • Read the line
  • Li>
  • If you want to Line, then use ftell () and fwrite () with the result from fseek () overwrite it
  • If line length changes, then you should make a copy of the file.


    iphone NSDate NSDateFormatter to a ceratin format -


    I want to convert my NSDate into a fixed format which is:

    "Wednesday, December , 2, 2009 "

    Do anyone know what the format string for the example of that date is?

    Appreciate your help!

    / html>

    Preventing WPF event tunneling -


    I will need to attract many WPF-paths I have set them for canvas children. The problem is that events have been tunneled in the path-object, it slow down the display. I know that overriding the preview method fixes the problem, but do I actually override all the preview methods.

    I think you can catch this incident in the canvas and e You can set it to right.


    c# - What is currently the best, free time picker for WPF? -


    I am looking for a simple time picker control for WPF. I have been found:

    But there are some issues examples in it " 00 ", the second zero will not appear.

    • Silverlight has one:

    but it is for not WPF .

    • There is a DatePicker in the WPF Toolkit, but a TimePicker is not by itself or is there a way to enter time and date in user WPFToolkit DatePicker? It has been selected in the return dated time, but I do not know how to choose the time with the user in this control.

    What is the best free WPF control allows users to enter time in HH: MM: SS format?

    You can roll yourself as easily as shown. And in this way, you really do what you want.


    html - Why does the "in" icon on my web page appear in the wrong place in IE8, but not firefox or chrome? -


    On, my link is a link to the profile that uses your icon. Under Firefox and Chrome, In place, the square is visible between a pair of brackets. However, under IE8 (I have not tried IE 7), a line appears below the icon brackets.

    I confirmed against w3.org and the valators, and it becomes clear from both.

    What gives

    This is the reason why IE is very awkward to debug Try with LI {padding: 0.0em}


    javascript - Connecting Node.js docker container to php container for use with Laravel 5 elixer -


    I am running several different Doc containers that include PHP, NGN and some other tools. I would like to use the new Alix facility but I do not know anything about node.js or node. How to connect to JS Container I

    All the tutorials I've read use the installation of nodes. Js on the same machine, not the one-way dock container or server, Should talk remotely to the other.

    I was hoping someone could tell me in the right direction because I do not know where to start from. I know that you can run the node as a server and can set variables such as hosts and ports, but I'm not sure if there is a need here if it is needed

    Such as PHP, NGNX, etc. will need to talk to the nodes remotely in their separate containers, but as I said the examples of Larrall site and other tutorials I have found only to tell that Sector Run command beginning with node on the same machine. I'm losing ..


    c++ - Macro expansion issue in Mingw GCC -


      # परिभाषित करें A2W_EX (lpa, nChars) (\ ((_lpa_ex = lpa) == NULL)? NULL: (\ _convert_ex = (lstrlenA (_lpa_ex) +1), \ FAILED (:: ATL :: एटल मैल्टिपली (& amp; _convert_ex, _convert_ex, static_cast & lt; int & gt; (sizeof (WCHAR)))) नल: \ ATLA2WHELPER (\ (LPWSTR ) _ATL_SAFE_ALLOCA (_convert_ex, _ATL_SAFE_ALLOCA_DEF_THRESHOLD), \ _lpa_ex, \ _convert_ex / sizeof (WCHAR), \ _acp_ex)))  

    मैं दृश्य स्टूडियो Int MingW से कुछ मैक्रो कॉपी और चिपक कर रहा हूँ निम्नलिखित त्रुटि प्राप्त हो रही है

    <पूर्व> सदस्य फ़ंक्शन में 'एटीएल :: सीसीओएमएरिएंट एंड amp; ATL :: CComVariant :: ऑपरेटर = (LPCSTR) ': C: \ ... / atlconv.h: 635: 11: त्रुटि:' से पहले प्राथमिक अभिव्यक्ति की उम्मीद है) 'टोकन (एलपीडब्लूस्ट) _ATL_SAFE_ALLOCA (_convert_ex, _ATL_SAFE_ALLOCA_DEF_THRESHOLD), \ ^

    इस समस्या को ठीक करने के बारे में कोई भी सुझाव?


    c - Changing GtkText input method -


    एक लोकेल विसंगतियों के कारण, " और ' प्रतीकों को प्रदर्शित किया जाता है Gtk- आधारित पाठ संपादकों में ¨ और ' के रूप में


    यह तय करने के लिए कि मेरे स्वयं के Gtk3 अनुप्रयोग में मैंने GdkEventKey < / कोड> यह पता लगाने के लिए कि उपयोगकर्ता इन बटनों को दबाता है और यदि ऐसा है तो सही वर्ण सीधे डालते हैं। मुझे अभी भी इन पुरानी प्रतीकों को प्रिंट करने की अनुमति नहीं देने का तरीका खोजने की आवश्यकता है और इसके लिए मैं इनपुट कोड को None < / Code> टेक्स्ट एडिटर से।


    मैं अपने प्रोजेक्ट की स्रोत फ़ाइल में none में इनपुट पद्धति कैसे बदल सकता / सकती हूं?

    आपको एक विन्यास फाइल की आवश्यकता है जो कि ऐसा कुछ पढ़ा: quote = 'doubleq = "

    सबसे आसान तरीका यह है कि gtk_init और gtk_main सेट ग्लोबल वैरिएबल जैसे कि key_quote से विन्यास फ़ाइल से लोड किए गए मूल्य के बीच शून्य के बीच लोड करना सबसे आसान तरीका है मौजूद। आपके प्रोग्राम में इसी बिंदु पर जो आप gdkkey ईवेंट का उपयोग कर रहे हैं, उसमें सिर्फ एक if स्टेटमेंट है

      if (key_quote & amp; दबाया गया == GDK_KEY_QUOTE)  

    jQuery contents method doesn't return iframe contents in Chrome -


    मुझे क्रोम को एक आइफ्रेम की सामग्री को jQuery contents () । फ़ायरफ़ॉक्स में अपेक्षित निम्न कोड काम करता है, लेकिन क्रोम शरीर की किसी भी सामग्री को वापस नहीं करता है। Iframe दस्तावेज़ मुख्य दस्तावेज़ के रूप में एक ही डोमेन में है और वास्तव में कुछ सामग्री है। (मैं आइफ्रेम दो बार दस्तावेज़ में शामिल करता हूं, प्रत्येक का उपयोग कर .eq (#) चयनकर्ता को भेद कर रहा है, जिसके कारण jQuery.fn.init [2] 2 तत्व दिखाता है।) के रूप में मैंने नोट किया, यह फ़ायरफ़ॉक्स में काम करता है।

      var $ iframe_contents = $ ("iframe")। सामग्री ();  

    क्रोम डीबगर से अंश

      $ iframe_contents: jQuery.fn.init [2] (दस्तावेज़ में 2 iframes हैं) 0: दस्तावेज़ यूआरएल: "के बारे में: खाली" सक्रिय एलेमेंट: शरीर सब: HTMLAllCollection [3]। .. बेसुरआई: "के बारे में: रिक्त" ... ** शरीर: शरीर ** ... बेसुरआई: "के बारे में: रिक्त" ... ** बाल एलेमेंटकाउंट: 0 बाल नोड्स: नोड लिस्ट [0] बच्चे: HTMLCollection [0] * * क्लासलिस्ट: DOMTokenList [0] ... डेटासेट: DOMStringMap dir: "" ... ** firstChild: null firstElementChild: null ** छिपा हुआ: झूठा आईडी: "" ** ** आंतरिक एचटीएमएल: "" आंतरिक टेक्स्ट: "" ** .. ** अंतिम चालीस: नल अंतिम एलेमेंट चाइल्ड: रिक्त ** लिंक: "" स्थानीय नाम: "बॉडी" ..... .....  

    मेरा मानना ​​है कि मैंने मेरी समस्या का समाधान किया है ऐसा प्रतीत होता है कि फ़ायरफ़ॉक्स अन्य ब्राउज़रों की तुलना में अलग काम करता है। यह iframes लोड करता है और फिर triggers .ready () जबकि क्रोम, सफारी और IE ट्रिगर .ready () iframe से पहले DOM में मौजूद है तो दूसरों के लिए, सुविधा मॉड्यूल को आरम्भ करने से पहले iframe लोड होने तक प्रतीक्षा करें।


    c++ - Find on list of map -


    Hello I'm working on a project and I'm starting in C ++

    I have a list of maps

      list & lt; Maps & lt; Int, double> & Gt; Voisin;  

    And I would like to know whether it is possible to check whether the element exists in my map or not. It's a C # code and can you tell me how to do it in C ++.

      var res = voisin [a]. Search (map  x)  

    thanks

    Take a look at it

    It should clean things.

      // map :: find #include & lt; Iostream & gt; # Include & lt; Map & gt; Int main () {std :: map & lt; Char, int & gt; Mymap; Std :: map & lt; Char, int & gt; :: Iterator; Mymap ['one'] = 50; Mymap ['b'] = 100; Mymap ['c'] = 150; Mymap ['d'] = 200; This mymap.find ('b') =; Mymap.erase (this); Mymap.erase (mymap.find ('D')); // print content: std :: cout & lt; & Lt; "Element in mammal:" & lt; & Lt; '\ N'; Std :: cout & lt; & Lt; "A = & gt;" & Lt; & Lt; Mymap.find ('a') - & gt; Second & lt; & Lt; '\ N'; Std :: cout & lt; & Lt; "C => & Lt; & Lt; Mymap.find ('c') - & gt; Second & lt; & Lt; '\ N'; Return 0; }  

    Output: element in mymap: a => 50c => 150


    css - Alignment of html pseudo-element after -


    How can I align my pseudo-element to the center? Like margin: 0 auto; For block elements.

      & lt; Div & gt; This is test text. This is test text. This is test text & lt; / Div & gt;  

    CSS code:

      div: after {position: absolute; Display area; material:""; Border color: # EAB920 Transparent transparent transparent; Border-style: solid; Threshold Width: 2.5 AM; Width: 0; Height: 0; }  

    This element looks like a simple triangle Margin of property: 0 auto; not working.

    If you want the pseudo-element to be centered horizontally centered relative text, You set the target element to display in inline-block so that the width becomes smaller to fit the content, then remove the full position from the pseudo-element and the margin : Auto will work as expected.

      & lt; Div class = "target" & gt; This test text is test text, it's test text. & Lt; / Div & gt; If you do not want to centrally orient the pseudo-element in horizontal form, then change the element to  inline-block < / Code> - 

    not set

    templates - Using hapi and handlebars, with the default layout support from hapi, can alternative layout be selected from with a page? -


    and the Happy AP indicates that Happy has made the layout in support of the bars while using bars, though it seems By default, to allow defining a layout in the configuration as the layout of the 'layout.html' layout,

    to use Handlebar layout support to do this within a page like this How Handler-Layout Is Used:

      {{Expand "Layout 2"}} {{/ Detail}}  

    When I'm able to use handlaw-layout, I use only that much stuff I would like to do that which provides hapi.

    Is it possible that the default layout is higher than that and select that layout in the page template? Maybe it happens:

      {{!!  

    / P>

    option - Alternate object to override the view manager configuration of the server for this response isCached , partial page , or helpersPath , which are only loaded initially.

    Here is an example:

    index.js:

      var handballbar = ('handlers'); Var Happi = Required ('Happy'); Var path = required ('path'); Var Server = New HAPI Server () server.connection ({host: '127.0.0.1', port: 8000}); Path.join (__dirname, 'views / layouts'), layout: 'default' (server: view) ({engine: {html: handlebars.create ()}, path: path.joined (__derenname, 'view' ), Layout path:}); Server.route ({method: 'GET', path: '/ default', handler: function (request, answer) {reply.view ('item', {title: 'item title', body: 'item body'} );}}); Server.route ({method: 'GET', path: '/ custom', handler: function (request, answer) {reply.view ('item', {title: 'item title', body: 'item body'} , {Layout: 'custom'});}}); Server.start ();  

    View / Layout / custom.html:

      & lt; Html & gt; & Lt; Body & gt; & Lt; H1 & gt; Custom layout & lt; / H1> {{{Content}}} & lt; / Body & gt; & Lt; / Html & gt;  

    view / layout / default.html:

      & lt; Html & gt; & Lt; Body & gt; & Lt; H1 & gt; Default layout & lt; / H1> {{{Content}}} & lt; / Body & gt; & Lt; / Html & gt;  

    view / item.html:

      {{body}}  

    when you visit It will use default.html . However custom.html .


    mule - MuleSoft - access data in db query in java component -


    Using MuleSoft to perform some data changes. This is relatively new and Java language itself. After many Googling attempts, I thought I would ask here.

    By dragging data from an 11G Oracle database, I have a database query that is being sent to a MuleMessage according to AnyPoint Studio, the DB query has a production list.

    I can successfully call the Java component as an event. To see the bit data, it was lost on the way to remove the payload content. In fact, I would like to add prices to another list map for further processing.

    Here's my DB:

      select the name country, from test_customer a, test_country B, where a.id = b.id  

    I want to capture the name and the country, and want to put it in my map. The map then goes to the list of maps.

      package org.mule.transformers; Import org.mule.api.MuleEventContext; Import org.mule.api.MuleMessage; Import org.mule.api.lifecycle.Callable; Import org.mule.api.transformer.TransformerException; Import org.mule.transformer.AbstractMessageTransformer; Import java.util.list; Import java.util.ArrayList; Import java.util.HashMap; Import java.util.Map; Public class myTransformer workable {@Override} Public Event On Call (MuleEventContext eventContext) applies {exception} {MuleMessage message = eventContext.getMessage (); Object payload = new object (); & Lt; Maps & LT; String, string & gt; & Gt; MyList = New Arrestist & lt; Maps & lt; String, string & gt; & Gt; (); // map list map & lt; String, string & gt; MyMap = New Hashmop & lt; String, string & gt; (); // Map holding string test; String Test 2; Payload = message.getPayload (); Test = message.getInboundProperty ("name"); Test2 = message.getInboundProperty ("Country"); MyMap.put (test, test2); MyList.add (myMap); Return my list; }}  

    I do not think there is a way to correctly reference the MuleMessage variable to drag this kind of data. The documentation is not useful, or I'm just reading the wrong stuff.

    Do I have to use Mel to do this? Or can I use it to use some Java functions?

    Any help would be appreciated!

    The results of the query (if you are using a database connector) are in payload and in inbound properties If not you are searching the results in the wrong place "."

    Maybe the result list & lt; Maps & lt; String, Object & gt; & Gt; is in the format, so you should do something like this:

      list & lt; Maps & lt; String, Object & gt; & Gt; Results = (list & lt; map & lt; string, object & gt; & gt;) message.getPayload (); Maps & lt; String, Object & gt; FirstRow = results.get (0); Test = firstRow.get ("name"); Test2 = firstRow.get ("Country");  

    However, you should debug your components and inspect what is the correct type of payload.


    xcode - iOS autolayout - gap between image and top of the screen, despite constraints set -


    I have an image that I want to put in the top part of the screen. I have set my mode to fit, because I want to preserve the original proportion. I 0:

    Enter image details here

    Despite the fact that the top barrier is set to 0, there is a lot of space between the image and at the top of the screen which is definitely not what I want:

    Enter image details here

    Only then when I call the top barrier " -100 "about what I want to achieve Something like:

    Enter image details here

    Can you please explain this kind of non-intuitive behavior and tell me what to do to keep the image at the top of the gap without any interval - as on the image above. / P>

    This is a try, if you still have this problem.

    Tap on your View Controller And then uncheck the properties below. See if this fixes the problem.

    Enter image details here


    java - How to set an image using a hash map -


    I want to set an image in a list view using a hash map, all data sets except the image is being done. How do I set an image using hash map? The images are stored in the Painting folder. Below is my code.

      // Make a list of maps & lt; String ,? & Gt; Object Arrestist & lt; Hashmap & lt; String, Object & gt; & Gt; Data = new arreelist & lt; Hashmap & lt; String, Object & gt; & Gt; (); (Attractions attraction: attractions) {Hashmap & lt; String, Object & gt; Map = new hashmop & lt; String, Object & gt; (); Map.put (Attraction_name, attraction .getName ()); Map.put ("img", String.valueOf (R.drawable.king)); Data.add (map); } // create the resource, from, and variable int resource = r. Late Latte_at; String [] from {{charm_name, "img"}; Int [] to = {R.id.name, R.id.img}; // Create and set the adapter simple adapter adapter - new simple adapter (from this, data, resource, with); AttractionListListView.setAdapter (adapter); AttractionListListView.setOnItemClickListener (this); }  

    You can use:

    In your adapter , Do something like this:

      imageView.setImageResource ((int) Hashmap.Gate ("IMG"));  

    However, I really recommend you to do such a thing instead of a Hash Map for a class, in this way you have a list of your class instead of a Hush Map (This is only an internal class that helps you organize). With this, you would want to avoid wearing the Hissapeat material from the intestine.

    But secondly, if you really want to use Hashp, then you can use the code written above.

    Regards


    ASP.NET / C# Respond.Redirect function -


    I would like to know after id = , i id user, i created query on another page

      SqlConnection con = New SqlConnection (ConfigurationManager.ConnectionStrings ["RegisterConnectionString"]. ToString ()); SqlCommand CMD = New SQL Commands ("Choose from ID where ID = @ bid", Kon); SqlDataAdapter APD = New SQL DataAdapter (CMD); Dataset ds = new dataset (); Cmd.Parameters.AddWithValue ("@bit", page request .QueryString ["ID"]. ToString ()); Con.Open (); Apd.phil (ds, "registration"); Cmd.ExecuteNonQuery (); Con.Close (); FormView1.DataSource = DS; FormView1.DataBind (); //  

    There is a query string -

      feedback. Redirect ("users.aspx? Id = & lt; some user for get ID;);  

    Here is the part that I want to know how it works

    My "project is": Whenever you are logged in as the user with id = 1 , do you have any page users.aspx? Id = 1 and you get information for user 1, if the user logs you 2 information you get information A2 etc.

    Normally when you pass an ID through a URL You can request the parameters of your request using URL. Param ["id"];

    Say that you want to display the user's information on the page, on page load, you have

      Int id = request. Param ["id"]; // Some data / user content to return / display user data from the database Sector more code  

    request. Param will basically have to check the URL for any parameter.

    Example:

    If you use

      Request.Param ["id"]; // it will return 1  

    and if you use the

      request .Param ["somethingelse"]; // it will return 27  

    jQuery find input value from parent siblings -


    मेरे पास नीचे दिए गए कोड जैसे html कोड का एक टुकड़ा है:

      & lt; div & gt; & Lt; div & gt; & lt; इनपुट आईडी = 'मार्ग' मान = '1' & gt; & lt; / div & gt; & Lt; div & gt; & Lt; चुनें id = 'selID' & gt; ... & lt; / select & gt; & Lt; / div & gt; & Lt; / div & gt;  

    अब, मैं एक बार चुनने के तत्व से कोई भी विकल्प चुनने पर इनपुट से मूल्य प्राप्त करना चाहता हूं, मैंने कुछ ऐसा करने की कोशिश की है, लेकिन फिर भी इसमें कोई सफलता नहीं है:

      $ (दस्तावेज़) .on ('change', '#selID', फ़ंक्शन (ईवेंट) {चेतावनी ($ (यह)। Parent ()। भाई बहन ('div')। बच्चों ('इनपुट')। Val ());});  

    क्या कोई मुझे एक समाधान दे सकता है? आप पहले से धन्यवाद!

    आप ऐसा कर सकते हैं -

      $ ("# SelID")। पर ('परिवर्तन', फ़ंक्शन () {var $ a = $ (this); अगर ($ a.val ()! = "") {चेतावनी ($ a.parent () .parent ()। ('इनपुट') खोजें। Val ());} वापसी झूठी;});  

    बेला:


    ember.js - Ember Simple Auth - always login -


    I am working on a closed system where you always need to log in. AuthenticatedRouteMixin does not work in Root (Astrouter) level.

    I think I can probably embed the login form and handle the login on the root page, but how would I go about redirecting the route route to the login path?

    Ideally I would like to route the route just like AuthenticatedRouteMixin

    The best solution is to add a / internal route and route it from root Redirect to if the user is logged in. You will be displayed in the AuthenticatedRouteMixin with the internal route login UI root route.


    character - Greek letters - JSON -


    I have a JSON file with a Greek name and letters. "21", "number": "15", "number": "15", "number": "Τ. Παπαγιάννης", "status": "Τερματοφύλακας", "age": "15 "," Photo ":" / papagiannis.jpg "," description ":" Ακαδημίες ΑΕΛ "}

    I call this file on Google Chrome browser (via a local server Which is called wamp) and it's a mess. JSON picture

    Is there a way to change it?

    Thank you.

    Fixed

    I used Notepad ++ then encoding-> Encoded went to UTF-8. This simple

    You should set the encoding in UTF-8


    ruby on rails - Could not find generator 'rspec:install' -


    I am not able to run the command RSPC in my terminal: install The error returns:

      The generator 'rspec: install' could not be found that you meant to run 'jquery: install' or 'devise: install' or 'responders: install' For more options to generate --help`  

    Here is my gemstone:

      Group: Development, testing gem 'pry' gem 'pry -remote '# on an IRB access exception pages Sol or & lt;% = Console% & gt; 'Web-Console', '~ & gt; 2.0 '#printing speed keeps its application running in the background. Read more: https://github.com/rails/spring Mani 'Vasant' # Local Dev Mani 'Rack-Corse' Mani 'Capibara' Mani 'RSPEC-Rail', '~ & gt; For the fonts etc., the curse allows. 3.0.1 'End'  

    I have suggested people putting the following line code in the application form. RB but I have tried to do this and it does not work:

      config.generators do | G | G.test_framework: rspec end   

    I installed the rp-rails and install the bundle but I still have generated rail Rspec: install

    Any other suggestions?

      gem 'rspec' 

    This has approved my problem, .. hopefully this will also help u ..


    Android options menu background -


    I have an option menu, which generates an action menu, which changes the item in an option menu if The device can not support all the actionboots.

    Example:

    Thanks in advance thanks!

    Solution

    Strong> (You drumbus and becomputer06 ):

    < P>

    mongodb - GMongo search within an embedded json in an object -


    मेरे पास निम्न ऑब्जेक्ट है:

    मैं सामग्री के उप-जेएसन में केवल प्रारंभिक और समाप्ति फ़ील्ड द्वारा कैसे खोज सकता हूं?

    मैंने कोशिश की:

      collection.findOne (सामग्री: [startDate: givenStartDate, endDate: givenEndDate])  

    लेकिन मुझे लगता है यह केवल तभी लौटाएगा जब प्रविष्टि में ये विशिष्ट तिथियां होंगी, लेकिन कोई रिक्त तिथि नहीं है, क्या मैं सही हूं?

    मैं प्रारंभिक और अंतिम तिथि के आधार पर कैसे पूछ सकता हूं?

    धन्यवाद!

    <पी> नीचे की तरह प्रयास करें आपको उप-दस्तावेजों के लिए ऑपरेटर का उपयोग करने की आवश्यकता है।

      संग्रह.फंडऑन ("content.startDate": दिए गए स्टार्टडेट, "content.endDate": दिए गए अंक)  

    statistics - Python package :MLE for Dirichlet distribution -


    I was thinking that someone knows about a dragon package that estimates the standards of a Dirichlet distribution to Meryl .

    Eric Suh has the package

     <$> $ pip install git + Https: //github.com/ericsuh/dirichlet.git  

    then:

      import numerical import diarchy a0 = numpy.array ([100, 299, 100]) D0 = numpy.random.dirichlet (a0, 1000) dirichlet.mle (D0)  

    Python/Matplotlib : convert Axis <=> Data coordinates systems -


    My question is quite simple: In matplotlib, how can I easily convert from data system to / from data system in Axis system (ideally I really have my exact problem: I have a matplotlib.patches I want to plot the .lipse / code> with its center in the Axis system but its size (width and length) in the data system. transforms.blended_transform_factory method does not work in this case .

    Regrettably!

    No immediate solution was found, it has to be written by itself:

    < Pre> def axis-data_cords_sys_transform (axis_obj_in, xin, yin, inverse = false): "" "reverse = false: axis => data = true: data => axis" "xim = axis_obj_in.get_xlim () Ylim = axis_obj_in.get_ylim () xdelta = xlim [1] - Exclamation [0] ydelta = ylim [1] - Ylim [0] If the inverse is not: xout = xlim [0] + xin * xdelta yout = ylim [ 0] + yin * ydelta else: xdelta2 = xin - xlim [0] ydelta2 = yin - ylim [0] xout = xdelta2 / Xdelta yout = ydelta2 / ydelta return xout, yout

    c# - Async Get in ASP.net Web API does not close the connection when there is a GetResponseAsync in it -


    Here is my code:

      public Async Task & lt; HTTPRPS Pormes & gt; () {Var url = "Here are some URLs"; String content; HttpWebRequest request = WebRequest.Create (url) as HttpWebRequest; / * 1 * / using (HttpWebResponse WebResponse = wait request.GetResponseAsync () HttpWebResponse AS) (StreamReader using {reader = new StreamReader (webresponse.GetResponseStream ())) {/ * 2 * / content = wait Reader.ReadToEndAsync (); }} Var response = this.Request.CreateResponse (HttpStatusCode.OK); reaction. Content = new string content (content, encoding. UTF8, "text / plain"); Return feedback; }  

    And my problem:

    I try to visit to get my IE, connected all the time is pending and has not shown anything Has been marked as. In Firefox, I can read a part of the data, and probably remembers some characters shown some Knk mark with tabs.

    I think it is not locked by me because the HTTP connection is not expressed by IIS (and flushed with some characters).

    I tried to modify my code in line 1 and 2. If I have a synchronous call change result in line code request. GetResponse () as HttpWebResponse everything works fine I work as expected, no mater what line in 2, ReadtoEnd () , async or sync.

    I can use one of the alternatives that only request.GetResponse () the phone does everything, but I want to know why this would happen.


    ios - Cut out a shape from a UIImage with a blurred edge -


    How do I cut a shape (indicated by brown outline in PIC A), with a blurred edge Can it be placed on another image? I prefer to use a schematicly described figure, rather than an image mask.

    gray cat face


    android - Tablet not enabled on Play store -


    I have searched and read all related docs on Google Play, I just "not enabled" for my app I have the resources for all the devices I want to support, which is basically API 8 +

    I do not even need those features that can not be pills and add everything to the support screen Received:

    manifest

    The Play Store says that My APK I search is compatible with every tablet:

    devices

    After that, Google Play still says I'm missing something:

    Playview

    If anyone has to do this work, please share, thank you.

    Similar Links: |

    Edit

    I'm still stumped on this, but I emailed to Google and today I came to know that in the store, all my devices Now show it as compatible; However, in the Developer Console, I still see the "lightbulb" signal.

    compatible device store


    python - Parse nested CSV columns into new CSV rows -


    I have a CSV file that contains 3 columns of CSV data "Nested inside" I have a To create a new row, I want to divide the contents of those CSV columns, add the sequence number for each item (which corresponds to the sequence of items in the sequence within the CSV column), and then the corresponding ItemID number that is from the CSV column That matches it Area was. I look like Table 1 below and it looks like Table 2.

    Table 1 (Original CSV file). The first row contains the column names:

      store id, date, store name, city, state, category 1CSV, category 2cv, category 3CSV 1051.2 / 16/2014, Easton, Columbus, Oh, "Flour, Yeast, Baking Powder", "Milk, Water, Oil", "Cinnamon, Sugar" 1425,1/14/2014, Crocker Park, Westlake, Oh, "Baking Powder , Yeast, four "," oil, milk, water " 

    Table 2 (CSV column b D) The first row has column names:

      store id, date, store name, city, state, item name, item rank, item category 1051,2 / 16/2014, Easton, Columbus, OH, floor, 1,1 1051,2 / 16/2014, Easton, Columbus, OH, Yeast, 2,1 1051,2 / 16/2014, Easton, Columbus, OH, Baking Powder, 3,11051, 2/16/2014, Easton, Columbus, OH, Milk, 4,2, 1051,2 / 16/2014, Easton, Columbus, OH, Water, 5,2, 1051/2 / 16/2014 , Easton, Columbus, OH, Oil, 6,2, 1051,2 / 16/2014, Easton, Columbus, OH, Cinnamon, 7,3, 1051,2 / 16/2014, Easton, Columbus, OH, Sugar, 8,3 1425,1 / 14/2014, Crocker Park, Westlake, OH, Baking Powder, 1,1 1425,1/14/2014, Crocker Park, Westlake, OH, Yeast, 2,1 1425,1 / 14/2014, Crocker Park, Westlake, OH, Flour, 3,11425,1/14/2014, Crocker Park, Westlake, OH, Oil, 4,21425,1/14/2014, Crocker Park, Westlake, OH , Milk, 5,2 1425,1 / 14/2014, Crocker Park, Westlake, OH, Water, 6,2  

    category 1CSV, Class 2 CV, and Category 3 CS label Le column 1 column item name table (example: dough),

  • The order of the item is item number
  • The most important aspect is that in the CSV list, and

  • The item is Category 1 or 2 or 3, depending on whether the data came from Category 1CSV, Category2CSV or Category 3CSV. Of these, the CSV is to maintain the order of objects from within the columns because they are divided into new lines. For example, in the StoreID 1051, the category "Flour, yeast, baking powder" has 1CSV content, they will map column names, item rank (sequence number), and item cadet, such as item name = dough, this item rank = 1 and Item Category = 1. This will be the first line in Table 2. In the second line, the item name will be = yeast, it is ItemRank = 2 and ItemCategory = 1, and does not end until you look like Table 2 above. In addition, you will see that the item rank numbering starts with the contents of category 1CSV, then the category 2 CV and finally the class 3 CSV is released.

    There are no items in all 3 CSV columns of all rows in the original CSV file. For example, in Store 1051 there were items in all 3 categories, but in Store 1425 there were only items in Category 1 and 2. Other stores can have items in only 1 category.

    My CSV file contains one two thousand lines. As a result the file may contain thousands of rows.

    How can I do this?

  • To indicate you in the right direction:

    • You are searching that the helper module of Python has a look at the docs for it - there are some good examples of running during the input file (any size and structure) and when converting to various python objects.
    • It's a pleasure, your 'empty line' object is a non-problem. The CSV module will recognize two commas (or whatever other delimiters you choose) as an empty string, as you would expect.

    As Daniel has indicated, I'm afraid I'm not completely clear that your worries are in the paragraphs of the clarification of your question, but I have full faith that if you If you play some time about the module, then you will hope that you can get it to work.