Monday, 15 March 2010

c# - LINQ to SQL query not ordering properly, please help -


  var assetVisit.AssetID joining assetBundle in db.AssetBundles from assetVisit temp = (db.AssetVisits assetBundle equals the K Assetid join groupBundle in db.GroupBundles on assetBundle.BundleID is equal to join usergroup in db.UserGroups on groupBundle.BundleID groupBundle.GroupID userGroup.GroupID where assetVisit.CompanyID == companyID & amp; & amp; userGroup.UserID == userID new selection {assetid = AssetVisit.AssetID, Count = assetVisit.AccessCounter}). Specific (); IQueryable & LT; Assets & gt; Last = (temporarily include assets db.Assets on t.AssetID t equals asset.AssetID where asset.IsActive == true & amp; & amp; asset.AssetTypeID == assetType & amp; & amp; asset.ShowInResults == true & amp; & amp; (asset.CompanyID == companyID || asset.CompanyID == - + 12081 9 74) orderby t.Count select property descending) .Except (companyAssets db in db.Assets in .Assets on joining copiedAssets equals companyAssets.AssetID copiedAssets.OriginalAssetID where copiedAssets.CompanyID == companyID & amp; & amp; companyAssets.CompanyID == -12081974 & amp; & amp; copiedAssets.IsActive == True selection companyAssets); Return final Take (border);  

OK, it looks like the property is back T. Seems to be given on the basis of, but I think that it probably is not working. Because the amount is not actually part of the property that is getting selected, but I do not know how to fix it.

You can see there is an assetVisits table and a property table, and I can not get the propertyVisits.AccessCount but I need to get the property back in order to make it work, Hell? ?

You asked a few hours ago, and the answer is the same: after that You have selected the rows you want to order.

Change:

  return final .Take (limit); For  

:

  var get the last retirement = from the property to join the asset. Property in Db AssetVisits on Property Select assetVisit.AccessCounter property from assetVisit.AssetID order equal to AssetID; Return final order. Take (border);  

You can also remove premature 'orderbay' from your own code, because it is not doing anything.


php - Yahoo Weather API WOEID retrieval -


I'm creating an app that takes Yahoo's weather data from a free RSS feed and it's color Depending on the figures obtained from the RSS feed, I associate with Hex, getting a point of view or getting a code of YOED without manually getting the issue I am getting.

The YahooOS API sends back an RSS feed until you provide a WOEID->

Is there a moral way to do this? My initial knowledge tells me that I have to write a script that will search for Yahoo using the word and capture OOID first, but I would agree that Jehu does not want to do this by scripts and it seems that it is more complex ... if not, is there an alternative API which makes it easy on me?

Thank you!

Why not just use Yahoo! Geoplanet service to solve a place? Or use the YQL service to access Geoplanet through its tables?

  http://where.yahooapis.com/v1/places.q ('Barry CA')? APID = [your epidure]  

or

  http://query.yahooapis.com/v1/public/yql?q=select% 20 *% 20from% 20geo.places% 20 place% 20text% 3D% 22Barrie% 20CA% 22 & amp; Format = xml  

There is no scrapping requirement.

Cheers

G

(Appearance; I work for Yahoo and I am part of the group behind Voids and Geoplanet)

< / Div>

merge - Preparing a database in access? need help! -


I am working in a small law firm and my boss has given me the database to help me with outgoing mail. Put together There are 5 separate tables in the reach (applicants, attorneys, Leon contenders, employers and workers compensation boards) All tables contain only cards, each applicant has an advocate, one or more possibly a lien claimant, employer and nominated board. I need to create some types of databases which will allow me to create a mail merge for all applicants. Keep in mind that each applicant has different addresses, employers, etc. (There are about 500 applicants) I need to create a database, when I change / update an address in the table in the entrance, then all applicants (S) are related to doing this, instead of one place only one place one Try to update the new address. If someone can help, please tell me I am looking for the most effective and effective method of doing this.

The address should be included in one table and then in other tables so that when you update address It is reflected in all other places where it is used.

A table "Address" in which it has an ID in the "Applicant" table contains an ID that refers to the ID in the "Addresses" table.

Hope this makes sense for you. If not add comments and explain in more detail.


c# - How to return variable datatypes from a method -


I have a method whose callers need different datatapes. I can put all callers in callers and repeat the necessary changes a dozen times, but it seems more efficient in doing this once called method.

  public string myMethod (String myArg) {return DoSomething (myArg); } Public Int32 myMethod (String MyAg) {Return Convert toInt32 (DoSomething (myArg)); } Private string dooming (key) {return some list [key]; }  

If I have several ways that pull data from some of the Lists and use different data types, then I have to convert one type in each example sessions variable or query or form request or There can be a number of other things

I can say

  function myMethod (as myArg string) as variant myMethod = DoSomething (myArg) termination Function  

Sorry, original post too many Was not clear. I hope that will understand more than that.

Thanks

  public T MyMethod & lt; T & gt; (String MyRG) {// work here}  

USAGE

  PublicTime Muthoot & lt; T & gt; (String myArg) {Return (T) Convert. Change Type (Dozometing (MyArg), Typef (T)); }  

Maybe be a little engineered;)


c# - Is it possible to construct an object by reading source code? -


background

I have some scripts that run as part of my build process, which Generate various source code files and some other source code for me.

The script uses CodeDom to generate them, and they read .cs files using a normal text reader.

Question

is looking for a script to use the class class called PageMenuItem and its purpose is to create a static list of page menu items.

All this is read by reading .cs files and for the "PageMenuItem" attributes, it calculates the number of arguments and Trying to figure out which constructor is being used outside, it can separate different pieces of information.

There are 7 constructors for PageMenuItem with different parameters, so it is becoming very difficult to determine .cs source code which is the manufacturer And therefore to parse the information.

Rather than trying to parse the text, I would just like to create a PageMenuItem object in memory and use its properties.

Therefore, I need a way to declare a feature from the .cs file and create a new example from PageMenuItem .

Is this possible?


Another way to ask this question:

Looking at this string:

  string myCodeStatement = "[MyAttribute (\" asdf \ ", \" Foo \ ")]";  

How can I create this type of object MyAttribute so that I can work with that object? I define MyAttribute which has full access to the source code.

It seems you can self-relaunch the class files, or alternatively add a annotation to the constructor, which will make your parsing job easier. Aspect-oriented techniques can be helpful - every time a constructor is called, and as is, add items to your list.


java.lang.reflect.InvocationTargetException - determine actual error? -


I am using Method.invoke () to call the function in third party jar. Sometimes I'm thrown a java.lang.reflect.InvocationTargetException. How can you find out what the real exception was with this?

Innovation targeting. Common Exception Chaining Content introduced in GetCause (1.4)


html - How do I get this CSS text-decoration override to work? -


For a few days I swear that I am being mad, it is one of those days. I thought my CSS was quite straight forward, but it does not work right now. What am I missing?

My CSS looks like this:

  ul> Lee {Text-decoration: none; } UL & gt; Li.u {text-decoration: underlined; } UL & gt; Le & gt; UL & gt; Lee {Text-decoration: none; } UL & gt; Le & gt; UL & gt; Li.u {text-decoration: underlined; }  

And my HTML looks like this:

  & lt; Ul & gt; & Lt; Li & gt; Should not be underlined & lt; / Li & gt; & Lt; Li class = "u" & gt; Should be underlined & lt; Ul & gt; & Lt; Li & gt; Should not be underlined & lt; / Li & gt; & Lt; Li class = "u" & gt; Should be underlined & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

Still it comes like this:

image < / P>

text-decoration does not behave just like other font / text related style font-weight . By implementing the text-decoration , all nested elements will also be affected.

Check it out:

Excerpt:

The text of the inline box is prepared in whole element, their presence in elements of any lineage But they are not followed by any meditation. On the elements of the lineage, there will be no effect on the decoration of the property of 'text-decor'. . . . Some user agents have implemented text-decoration by promoting the decoration of the elements of the line in opposition to attracting decoration through elements described above. This was clearly acceptable with loose words in CSS 2.

I got the information from here:


Have you applied Game Theory on a project? -


I have not read, but it fascinates me that my intuition is that most of it is not used by "enterprise app" developers However, it is clearly relevant for large online sites (example recommendation systems), and there is a huge impact on SO.

Have you implemented any theory of game theory in your daily projects? If so, then what principle?

I'm sure that Google should have a strong taste of the game theory to work on auctions on Google. , Or at least micro economics of judgment under uncertainty ...


c# - Generate Image with Microsoft .NET Chart Controls Library without Control -


Generate images (JPEG, PNG, etc.) using any Microsoft Charts Control Library without a WinForm or ASP Is Net Control Class Possible? In all the examples I have seen the use of a control component. I need to create a library that includes simple methods that take data to plot and give a new chart image Example: Public Byte [] Generated Plate (ILIIT & LT; Serijdata & gt; Series) / JPEG Generate and Return JPEG Generate Plate (ILIIT and LT; Series Dta & G; Series, Stream Outputstream) {// Generate Jpeg and write on Stream}

It is not possible:

  1. Do you always ask the user to call the generated plate (call) method?
  2. Would you recommend?

Thanks

Yes, this is possible:

  By using the system.window.form.dataVisualization. Charting; Using System.IO; ... Public Zero GeneratePlot (IList & lt; DataPoint> series, stream output stream) {(var ch = New chart ()) {ch.ChartAreas.Add (New ChartArea ()); Var s = new series (); Foreach (var pnt in series) s.Points.Add (pnt); Ch.Series.Add (s); Ch.SaveImage (OutputStream, Chart Image Format .jpg); }}  

c - dynamic allocation/deallocation of 2D & 3D arrays -


I know about algorithms that have to be dynamically allocated / deployed 2D array, although I have 3d arrays I am not sure about the same.
Using this knowledge and a bit of symmetry, I came up with the following code.
(During coding I found a difficult time in 3D).

Please comment on the right and suggest any better option (skill wise or subtle), if any. Apart from this, I think these two 2D and 3D arrays normally have static arrays such as arr2D [2] [3] and
AR 3D [2] [3] [2] correct?

Code for 2D

  // A 2D array int ** assigns 2D (int rows, int cols) {int ** arr2D; Int i; Arr2D = (int **) malloc (rows * size (int *)); {Arr2D [i] = (int *) malloc for (I = 0; i & lt; rows; i ++) * Column * size (int)); }} // Delete a 2D array from zero 2D (at ** AR2D, int lines) {int i; For (i = 0; i  

code for 3D

  // assign a 3D array int *** allocated (int, int m, int N) {int ** * arr3D; Int i, j, k; Arr3D = (int ***) malloc (L * size (int **)); {Arr3D [i] = (int **) malloc (m * sizeof (int *)) for (i = 0; i & lt; l; i ++); For (j = 0; j & lt; m; j ++) {arr3D [i] [j] = (integer *) malloc (n * sizeof (int)); }} Return arr3D; } // Assign a 3D array zero deallocate3D (int arr3D, int l, int m) {int i, j; For (i = 0; i & lt; l; i ++) {for (int j = 0; j & lt; m; j ++) {free (arr3d [i] [j]); } Free (AR3D [ii]); } Free (arr3D); } You can also assign an array and calculate individual indices.  

You can also assign an array and calculate individual indices. This requires less allocated calls and results in less fragmentation and better cache usage.

  typedef struct {int a; Int b; Int * data; } Int2d; Int2d arr2d = {2, 3}; Arr2d.data = malloc (arr2d.a * arr2d.b * sizeof * arr2d.data);  

now becomes arr2d [r] [c] arr2d.data [r * arr2d.b + c] . Deallocation is an independent () distance. As a bonus you will always keep your dynamic array size with you.

Extrapoling for 3D:

  Type-e structure {int a; Int b; Int c; Int * data; } Int3d; Int 3D AR3 = {2, 3, 4}; Arr3d.data = malloc (arr3d.a * arr3d.b * arr3d.c * sizeof * arr3d.data); // arr3d [r] [c] [d] gets //: arr3d.data [r * (arr3d.b * arr3d.c) + c * arr3d.c + d];  

You should allocate allocation operations for these index operations (and for that (D-)) in a different function or macro.

(The names of r, c, And D could be better & mdash; I was going to row, column, and depth. While A, B, and C are the boundaries of their respective dimensions, you can choose something like N1, N2, N3 Or even use an array for them.)


c - simple client and server -


Simple client to run on Linux and server can link to C or C ++ code or direct me in a program

Requires that the message should be able to send and receive.

There is an excellent tutorial for understanding sockets and connections, plus it includes basic server client sample applications .


Using Blender/SketchUp Models in OpenGL -


I am creating a renderer using OpenGL. I am using Blender / SketchUp (I can easily exchange between the two I've created textured models in, and I want to be able to export those files to my renderer. My initial idea was to export raw face only and present those triangles, but I would like to make my texture files easy To make I would like to slice even in the coordinates.

That means, I mean that the shape of my model became clear in the triangle you can see (reproduced below) that my curves are 24 triangles, I would like to know what type of texture for each triangle To be used.

polygonal curved 3D object

Does any of the DAE files do this The easiest way? I am reading glasses for the format and it looks quite easy. I think I can parse XML and I can honestly recreate the model in OpenGL. I am thinking that there is no easy way (ie, which does not modify the wheel again).

If you If you are relaxing to parse the DAE-format, use it. However, if you are only interested in exporting the texture triangle, then I would consider using it which is very easy to parse. From I can tell both SketchUp and Blender that this format can export.


Infinity generated in python code -


I'm looking at some complex Python 2.6 code that sometimes creates infinity (at least one infinite serial Is being done by Jason Library - which checks w / math.isinf.)

What is particularly troubling is that the result of calculating Python (as far as I can) Countless should not be able to set up. Am I wrong with this assumption? I knew that you can only achieve infinity by constants:

  k = float ('inf') k = 1e900  

Floats exceeds the accuracy anywhere between 1e308 and 1e30 9, so if you are calculating the result above that limit, you will see

  & gt; & Gt; & Gt; 1e308 1e + 308 & gt; & Gt; & Gt; 1e309 inf & gt; & Gt; & Gt; Json.dumps (1e308, allow_nan = false) '1e + 308' & gt; & Gt; & Gt; Json.dumps (1e30 9, allow_nan = False) traceback (most recent call final): File "& lt; stdin>", line 1, & lt; Module & gt; File "/usr/lib/python2.6/json/__init__.py", line 237, dump ** KW) .encode (obj) file "/usr/lib/python2.6/json/encoder.py", line 367, encode in the divisions = list (self.iterencode (o)) file "/usr/lib/python2.6/json/encoder.py", line 304, _iterencode yield floatstr (o, manually / usr / Raise valueError (msg) ValueError: float value JSON not out of range are not compliant: inf>   

can handle decimal large numbers, but clearly a performance penalty (and it is not sorted with JSN Can be done only)

 > Decimal & gt; & gt; & gt; decimal ('1e 9 00') by decimal import / 10 decimal ( "1 e + 89 9")  

Here is an additional example that does not increase the overflow exception

 >  

A = 1e308>> A + an inf


c# - list? dictionary? array? -


I am trying to come up with a simple way to store boolean values ​​for each tab page in a tabcontrol . Each page has a text box, and I would like to store a bowel front page, if the tab 1 page has been saved, then bool1 is set to true, and so on.

Then when they close the program, it will go to all tabpages and see if each tab page has been saved or not. I should be able to create a list that I can search and manipulate.

I used the first tag properties for this, but for some reason it does not work properly.

Any help advice would be great; Y will be appreciated :)

Thanks,

Bull.

No array, nor list, and dictionary right to track the boolean state of the set of objects There is no data structure. This structure which does nothing else is hashaseet & lt; T & gt; is either in a T set, or it is not.

This is a dictionary & lt; T, bool & gt; because it actually holds two says: Whether the object is in dictionary or not, and if it is, its value is true or false.

This list & lt; T & gt; For two reasons: It is fast (though in your case, which will almost certainly be insignificant), and this does not mean there is some meaning in order of objects, because in order of objects, Hasheset & lt; T & gt; is unchecked.


sql - Comparing fields in an ORACLE view -


मेरे पास ORACLE तालिका है जिसमें निम्नलिखित फ़ील्ड शामिल हैं:

  FieldA1 NUMBER (10, 0) फ़ील्ड ए 2 VARCHAR2 (40 BYTE) फील्डबी 1 नंबर (10,0) फील्डबी 2 VARCHAR2 (40 BYTE)  

मैं एक ओरेकल दृश्य कैसे लिखूं जो तालिका से पढ़ता है और यदि निम्न शर्त है True:

FieldA1 मैचों FieldB1 या FieldA2 फ़ील्डबी 2 से मेल खाता है

वर्णों में से एक के रूप में 'Y' वर्ण को आउटपुट करता है और यदि उपरोक्त स्थिति सही आउटपुट 'N' नहीं होती है?

  दृश्य दृश्य देखें 'वाई' WHEN फ़ील्ड ए 2 = फ़ील्ड बी 2 तब 'वाई' ELSE 'N' END) column_alias से तालिका_नाम  

c++ - Pointer alignment -


Can someone explain (by giving an apppip link for example) What does the indicative alignment in C ++ mean? Thank you.

This is also good -

A memory address A, n -Byte coalition is called when n is the power of two and one is multi-byte bytes. In this context, one byte is the smallest unit of memory access, i.e. each memory address specifies a different byte.

In logging an en-byte, log2n will be less-important zero.

python - Using super() in nested classes -


यह कल्पना कीजिए:

  वर्ग ए (ऑब्जेक्ट): वर्ग बी (ऑब्जेक्ट): def __इनट __ (स्वयं): सुपर (बी, स्वयं) .__ init __ ()  

यह एक त्रुटि बनाता है:

 नाम त्रुटि: वैश्विक नाम बी परिभाषित नहीं है 

मैंने एबी की कोशिश की है, लेकिन फिर यह कहता है कि परिभाषित नहीं है।

अपडेट: < / Strong>

मुझे समस्या मिली है।

मेरे पास इस तरह से एक वर्ग है:

  वर्ग ए (ऑब्जेक्ट): वर्ग बी (वस्तु): def __init __ (स्व): सुपर (बी, स्व) .__ init __ () someattribute = B ()  

उस क्षेत्र में, ए अभी तक परिभाषित नहीं है।

मुझे यकीन नहीं है कि एबी क्यों आपके लिए सही तरीके से काम नहीं कर रहा है, जैसा कि यह होना चाहिए .. यहाँ कुछ शेल आउटपुट है वह काम करता है:

  & gt; & gt; & gt; वर्ग ए (वस्तु): ... वर्ग बी (ऑब्जेक्ट): ... def __init __ (स्वयं): ... सुपर (एबी, स्वयं) .__ init__ () ... def getB (स्व): ... वापस एबी () ... & gt; & gt; & gt; ए ()। GetB () & lt; __ मुख्य __. बी ऑब्जेक्ट 0x100496410 & gt;  

MS Office Excel Ribbon - Cannot change/hide Editing group in Home tab -


I have a net adin for Excel. Addin creates ribbon UI for Excel 2007 and reintroduces some existing commands like Cut, Copy, Paste, Sort etc. For the cut, copy and paste, I am overriding my on-line value to call when the button is clicked on its own but this case is slightly different for sort, sort ASC and sort decce. When any of the sort, sort ASC or sort diskette buttons are clicked, I want to notify and then want to call the default functionality. This is possible by calling the Execute () method on CommandBarControl in Excel 2003.

In Excel 2007, programming is an ExecuteMso () method to click on a ribbon element, but when OnAction is overridden, this ExecuteMso () method only executes its process and < Em> default functionality

So I thought I would be releasing the Sort button in the "Edit" group in the Home tab and click on your own sort, Sort ASC and Sort Desic Button. Buttons will call my procedure first, from which I will call the default behavior.

The problem now is that I am unable to change / hide editing group (idMso = "GroupEditing"). Is this underlying group not editable? Although I can wrap clipboards and other groups (but can not add buttons for them)

  & lt ;? Xml version = "1.0" encoding = "UTF-8" standalone = "yes" & gt; & Lt; CustomUI xmlns = "http://schemas.microsoft.com/office/2006/01/customui" & gt; & Lt; Ribbon & gt; & Lt; Tab & gt; & Lt; Tab idMso = "TabHome" & gt; & Lt; Group idMso = "group editing" view = "wrong" /> & Lt; / Tab & gt; & Lt; / Tab & gt; & Lt; / Ribbon> & Lt; / CustomUI & gt; I think the idM is wrong with regard to hiding the editing group. 

idMso = "Group Editing Excel"


Google Geocode: PHP Implimentation - character encoding issues -


I am working with UK address data and international address data.

I need the Geocode address information for use on Google Maps I'm using this HTTP service Ie / build a query string and give it to file_get_contents ($ TheURL).

I have been able to geocode 80% of the fully-known data, although in countries like Norway and Sweden there are special characters, they will not return a geocode. Returned codes are 602 (no addres can not be found).

Seeing the document, I can see that the string sent to Google should be UTF 8 encoded.

I have tried the following to ensure that the string is UTF 8 encoded / special characters.

1) Using UTF 8 encode on query string - it often shows results in distorted characters appearing on the screen.

2) mb_check_encoding reports that the string is correctly encoded

3) Using the function to replace special characters for your European Union (Google API Compatibility in Hope

Can any reason suggest that why my method is not working or what to do with encoding?).

You should go through system settings in every encoding aspect

  • And the encoding defines what encoding it contains. Mb_detect_encoding and projected work is not a good way here.

    You will have to check their encoding:

    • Database Connection
    • Database Table Insertions
    • Script files you work with

    If defective letters are generated, then it is likely that You are using ISO-8859-1 or any other non-UTF-8 encoding anywhere. When everything clean UTF-8 should go through the request.

    There is a very good article on the basics.


Multiple databases in Rails -


Can it be done? In a single application, which manages several projects with SQLite, I want to have a separate database for each project that is managing my app. So there are several copies of an equally structured database, but among them With different data, I will select a copy using the base on the parameter on the URI.

This is done for 1 security. I'm new to this type of programming and I do not want to get corrupted while working on any other project for some reason. Easy backup and archive of old projects

By default the tracks were not designed for multi-database architecture And in most cases, it does not understand at all. But yes, you can use different databases and connections.

Here are some references:


  • osx - Unable to start MySQL from the terminal -


    I'm quite new to Macintosh, I have Mac OS 10.6 installed.

    I have installed mysql-5.4.3-beta-osx10.5-x86.dmg file and all the files properly.

    I got the server started in system preferences.

    I now want to access MySQL from the terminal but I am unable to do this.

    I have tried the mysql -u root .

    This "-bish: mysql: command not found".

    How can I work it out?

    Is there any device for Mac?

    It seems that there are a few steps to check if you have a path problem in the current shell: / P>

    • Can you access the MySQL prompt from the installed location? Let's say you have set up MySQL in / usr / local / mysql . If you change the directory ( cd / usr / local / mysql / bin ), then you should be able to execute the mysql command: ./ mysql

    • Check the path settings in your current shell by using the env command. The code you are looking for is the value of PATH , where you want to do something with: PATH = / usr / local / bin: / bin: / usr / bin:

    • / usr / local / bin mysql Reset your current route to include: This can be done in the example of the current shell, in the form of export PATH = / usr / local / mysql / bin: / usr / local / bin: $ PATH

    • >

      Test that you can then access the MySQL binary from any path on your system.

    In order to access MySQL you can see it in the tool:


    -

    < / Html>

    sql server 2005 - how to query to create a grouping of sets -


    I have a common included table with two columns which are the key for other tables I for a range of records subscribers Are mapped.

      asset_map ----------- customer_id asset_id --------------- -------- 1 1 1 2 2 1 2 2 3 1 3 2 3 3 4 1 4 2  

    There are about 10 properties, each client can be mapped to any of what I would like to achieve , Something like this:

      grouping customer_id asset_id -------------------------- ------ ---- 1 1 1 1 1 2 1 2 1 1 2 2 - - - - - - - - - - - - - - - - - - - 2 3 3 2 3 1 2 3 2 - - - - - - - - - - - - - - - - - - - - 1 4 1 1 4 2  

    Note that customers 1,2 and 4 fall into the same group because they are property 1 And are mapped to 2. The customer is not in the group 3 as 1,2 and 3.

    with rows (customer_id, asset_id) (select 1, 1 Union Select All 1, 2 Select All Union 2, Select 1 Union 2, 2 Select Union All 3, Select 1 Union All 3, 2 Union Select All 3, 3 All Select Union 4, 1 Union All Select Selection 4, 2) (Select cast (asset_id +) as Vargar (10). '[[([Text]] from rows as rays again. Customer_id = ro.customer_id XML path by ORDER ( Property) for property) The sector as RA. * From (select different customer_ id from rows) RO RO ro.customer_id
    at RO RO RO ra.customer_id on RO

    How to configure hudson to ignore changes under specified SVN folders? -


    I am looking for a way to ignore the changes under the SVN folders specified in Hudson. This is the same thing except folders in TeamCity and filters in CC.Net. I have not found any configuration options under SVN GUI configuration.

    In Hudson 1.334, in the build configuration, subversion -> Advanced ..., the three exclusions boxes Are there. If voting is being made for changes, then Hudson will ignore those changes that match these exclusions while determining whether a construction is triggered. You can ask Hudson to ignore the files / folders (excluded areas), file by special users, or with a special classification correction.


    c# - I need to iterate and count. What is fastest or preferred: ToArray() or ToList()? -


    संभव डुप्लिकेट:

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

      शून्य फ़ोबार (स्ट्रिंग [] arr, डिक्शनरी & lt; स्ट्रिंग, स्ट्रिंग [] & gt;) {var t = arr.Intersect (dic.Keys)। ); //। Or ToArray ()? विदेशी मुद्रा (टी में विभिन्न आइटम) {..} var j = t.Count; // मुझे यह भी चाहिए}  

    किस पद्धति को पसंद किया गया है?

    मैं बिना किसी के भी जा सकता हूं लेकिन मुझे आकार जानने की आवश्यकता है और मैं कॉल नहीं करना चाहता हूं एन्युमेरेबल.काउंट & lt; T & gt; () - ऐसा लगता है कि अधिक कार्य करते हैं तो ऐरे & lt; T & gt; आकार या सूची & lt; T & gt; .Count । वास्तव में, वर्तमान एमएस कार्यान्वयन में गणना (IEnumerable) में एक शॉर्टकट की तलाश है अगर यह सही है? IEnumerable एक ICollection है और इस पर कॉल की गणना। इसलिए प्रदर्शन को गिनती करने वाले तत्वों के लिए तुलनीय होना चाहिए।

    ToList और ToArray कुछ समान हैं। यदि IEnumerable एक ICollection है, तो CopyTo विधि के बजाय कहा जाता है, जो थोड़ा तेज है।

    इसलिए, चुनें कि आपका कोड सबसे अधिक पठनीय और आपके उपयोग के मामले के लिए बेंचमार्क एक निश्चित उत्तर ।

    अपडेट: मैंने एक भोली बेंचमार्क किया है।

    एक ऐरे के साथ शुरू करना: var items = Enumerable.Range (1,1000)। ToArray ();

    • कॉलिंग टूलाइस्ट (): 25 एमएमएस / 10000
    • टूआरे को बुलाओ (): 23 एमएस / 10000

      एक IEnumerable के साथ शुरू करना : var आइटम = अनमोर। श्रेणी (1,1000);

      • कॉलिंग टूलाइस्ट (): 168ms / 10000
      • कॉलिंग टूअरे (): 171 एमएस / 10000

      इसलिए मूल रूप से आपको तुलनीय प्रदर्शन मिलता है।


    rails - how to override default views -


    By default, when I ask to / message the Rail Controller, it does

      df index response_to {| Fmt | | Fmt.html} and  

    and app / ideas / messages / index.html. ARB

    shows that there is a customer whose example to show the platform view (and the change can not be done with CSS only)

    I think the solution

    1. to create a directory app / view / # {custom name}, which has the same structure as the app / view , But there are only those views that override the default.

    2. which must be overridden (if not, they should load the default view)

        CUSTOM_VIEWS ["message"] = ["index", "show" "," Edit "]  

      from anywhere in the customer-specific config file

    3. All such actions have to be done in the administration

        to give DIF index feedback. Fmt | Fmt.html Include CUSTOM_VIEWS [parameter [: controller]]. (Parameter [: Action]) #override default app / view / message / index.html with app / view / customname / message / index.html. ARB render "# {customername} / # {params [: controller]} / # {parameter [: action]}" end and end  

    Or is there a better / faster solution / plugin to do this?

    It should help:


    How to add the UserId parameter to the query string of a XmlUrlDataSource in SharePoint? -


    I have an ASPX that returns XML data using query string parameter UserId. It should be UserId SharePoint current user.

    I create the data source and drag it to the page, but I do not know how to add the parameter to the data source so that it can send the current user id. I tried to add the parameter to the datasource parameter grid but when ASPX is always called it, it always uses the default value and not the current user id

    You should be able to do this by adding a parameter through the context menu of the control menu (like DataFormWebPart).


    Problem when mapping inheritance in web service for a Flex client -


    I have a problem while using the web service from the Flex app. I have a hierarchy in the backend, suppose I have an abstract class There are fruits and 2 implementations: Apple and Orange fruits have a property, name, color of property in apple, and a property radius in Orange. Again, I have a service that gives a collection of fruits when I consume it with Flex, then this collection returns those items which are fruits, with the property of its name; But I lose all the properties for the implementation classes (color or radius). So, the question is, does Flex support mapping legacy while using web services? If not, is there any work? I hope that would be clear enough I know if not thank you. George

    Is this a SOAP service implementation? Are you using FlashBuilder "import wsdl" feature, or something else?

    You can use Flash Maker to import WSDL and can generate AS classes dynamically. You should have imported derivative classes there. When your data comes, you will need to place the fruit object in their correct child classes. Make sure to check to make sure your WSDL is built properly - I do not know why sending such a collection will cause a problem for Flex.

    If you can provide more detailed information on Web Services architecture, please help us get more detailed answers.


    eclipse - Input values to a normal JAVA SE program -


    I am new to Java and I am currently trying both Netbeans and Eclipse.

    I 'My jaw is confused about inputting values ​​in the application. I think the output is displaying in the Eclipse on the output window ... but, I do not know the input values ​​... ??

    In these, a normal console application in .Net, we can input the input value through the console window (command prompt window), but I do not have any command prompt window when I run my java program I run in input values ​​or type anything. How do I

    thanks

    If I remember correctly, You can type in Eclipse's Java console and this standard input stream will be sent through System.in (perhaps based on the application's configuration of the application).

    Although the standard way to do this is to pass several strings on the command line, which will appear as the elements of strings for your app's main method Ing [] parameter.

    Alternatively, you can get the input through the flat files, through the socket from the database etc. Although it is, as you can expect, is very complex and will definitely not be considered for the application of "Hello World" type, for example Java web services, instead of command line, through network sockets Take input, because it will later limit them to some extent. ; -)


    php - How do I put into an array the items in a directory? -


    I have a directory that has approximately 2000 text documents and I can parsing the data again through every one Want to do How can I do this?

    scandivor () An array that will bring all filenames in.

    array scandium (string $ directory [, int $ sorting_order = 0 [, resource $ reference]])

       

    Bonjour Discovery in Javascript? Maybe? -


    So for a long time, I'll start with it.

    Is it possible / maybe to advertise HTTP services well in JavaScript?

    Why would this be useful? Imagine the local service caring for some data (such as your current lat / long), the data is exposed through a webservice and advertising by Bonjour Zeroconf A (Remote) website is probably your current latex / long Want to know that you are running MyGPSserverVersion2 , to use this site _Compatible_location_services._tcp and then continue after an IP address.

    If this is impossible (I think that's probably the case, Javascript is quite restricted), then what are the obstacles and somebody has any idea how to remove them?

    It is possible that using Chrome, but I only have one


    rss - Settings http headers in Java 6 SE httpserver -


    I try to publish an Atom feed (generated with ROM) using the Java 6 SE server server. I need custom headers for the right feed discovery in Firefox.

    This is my code:

      header header = e.getreuk header (); ArrayList & lt; String & gt; List = new ArrayList & lt; String & gt; (); List.add ("application / atom + xml"); Headers.put ("content-type", list); E.sendResponseHeaders (200, 0); Unfortunately the feed looks like XML (browser, what to feed, ask me) and sniffing with live httpheaders shows that there is no content-type feature.   

    You can set response headers like this:

      Header header = Exchange.getResponseHeaders (); Headers.add ("content-type", "application / atom + xml"); Exchange.sendResponseHeaders (200, 0);  

    c# - Change namespace of a deployed clickonce application -


    I made a namespace spelling mistake slightly and I want to correct it. My application currently uses the application to store a large store of user information. If I spell my namespace correctly, will the settings of the application be necessarily erased as it can not find a new namespace?

    I believe that ClickOnce will see it as a separate application, so yes, the app settings Will be "lost". I had to do it myself once, and I lost all settings, users had to install it as a new application and again had to set up my personal infrastructure.

    I have never said why it was, but this is my guess:

    If the click was treated otherwise, for someone with their own malicious person It will be very easy to change your app, so it is understandable from a security perspective,

    However, I may be wrong, you can try it, and see. If the settings are lost, you can always return (assuming you are using source control).


    c# - Silverlight 3 WCF Service `CommunicationException` Server returned error: NotFound -


    I have a Silverlight 3 application, which has been successfully requested data from 95% of the WCF service (same Vebpad ) And display it in

    It sometimes happens, usually if I bunch the service repeatedly, but sometimes it happens on a single request.

    Every once in a while, if I request multiple transactions in a short time, I get one of the two exceptions, they both have both the reference.cs file In EndMyMethod (System.IAsyncResult results) come in.

    There are a few ways, and there are exceptions to any of them. First, a Taimautaksepshn () that I think it makes sense, the second, which do not get me completely is " CommunicationException () was unchecked user By Code: Remote server returned an error: NotFound. "

    I blocked try..catch , press both . There is no use in handler for MyMethodAsync () and MyMethodCompleted , as the exception is generated in the Reference.cs file.

    Any help is greatly appreciated.

    Update

    context.cs - "Add Service" the reference "

      public system. Aisaiansiar results start toggle Krenggl (string id, string system. Async callback callback object asyncState) {object [] _args = new object [2 ]; _args [0] = id; _args [1] = toggle; System.IAsyncResult _result = base.BeginInvoke ( "TogglePicked", _args, callback, AsyncState),; Return _result;} public void EndTogglePicked (System.IAsyncResult result) { Object [] _args = new object [0]; // This is the line where the exception has been dropped. EndInvoke ("TogglePicked", _args, Results);}  

    Calling Code - selected ID is a list of strings, and to define a string event on top of the process handler select User ID mdc_TogglePIckedCompleted is empty at the moment.

      MapData Client MDC = New MyDataClient (); Mdc.TogglePickedCompleted + = New Event Handler & lt; System.ComponentModel.AsyncCompletedEventArgs & gt; (Mdc_TogglePickedCompleted); Foreign currency (string ID in chosen ID) {mdc.TogglePasyAsync (id, userIDSelecting, mdc); }  

    Update 2

    This "Inraksashn" communication Ikspasn: System.Net.WebException: Remote server error Return: NotFound.

    Not sure if this is more helpful because it is not giving any additional details. As I said, every time I call the service system, it is embedded. I would also like to say that only one call will work and not others, I am thinking that this issue is because IIS has failed to answer my call, answer the ideas?

    Update 3

    When I mean interim, I mean the triple intimate. It can only happen at the user's session at the same time, and it can only be on one of the fifty sessions, it is not an all-in-one thing. The calling application is hosted as WCF service in the same "website", so I do not think there is a clientexololicy.mmm problem, but I could be wrong.

    The message you are receiving is probably a red herring: - (

    < P> When an internal WCF service exception is thrown, it will always appear as an exception in the Silverlight UI not found server , because the HTTP response type is 500. David Boyz - (It was written for SL2, but the concepts are still for SL3. For example, "never", using the service reference features from VS - you do not have to follow all of them ;-))

    However, back to your question, you Need to change the response type to 200 and purse the exception in the message. This can be done using an inspector (in service and in the SL app).

    • There are quite a few articles on how to do this on the net. An example of a work can be downloaded from CodePlex: (page "Message Inspector" below the download link)

    Some of these approaches may seem quite challenging. Let's take some time to understand it - the concept is important for WCF & lt; -> SL application, and it is understood after receiving it: -)

    We have used it with a lot of success since the beginning of this year, so if you Need help with this now and help me tell me


    asp.net mvc - Can a partial view be used to do Ajax item updates? -


    I have a table built from a list of fault tables.

    Can each part of a row be loaded with the submit sub-table item button?

    Sample table:

      & lt; Table & gt; & Lt; Tr & gt; & Lt; Th & gt; Code & lt; / Th & gt; & Lt; Th & gt; Details & lt; / Th & gt; & Lt; Th & gt; Affect your customers & lt; / Th & gt; & Lt; Th & gt; Impact for your colleagues & lt; / Th & gt; & Lt; Th & gt; Save & lt; / Th & gt; & Lt; Th & gt; Save Errors & lt; / Th & gt; & Lt; / Tr & gt;  

    Where the first 2 columns come from the lookup table, and the next 3 columns are a form, so that the user can set the values ​​or update them with previous values.

    Can I embed 3 TD items in the form of a line as a hidden value with a private AGX form code ID? What will be my exact type of footage? External layer IEnumerable & lt; DefectDTO & gt; Will there be an aspiration of , and partial ideas will be succes to the AssessmentDTO type?

    Here is the real table that I am trying to work with:

      & lt; Table & gt; & Lt; TR & gt; & Lt; Th & gt; Code & lt; / Th & gt; & Lt; Th & gt; Details & lt; / Th & gt; & Lt; Th & gt; Document & lt; / Th & gt; & Lt; Th & gt; Required customer contact for resolution & lt; / Th & gt; & Lt; Th & gt; Associate Diversity & lt; / Th & gt; & Lt; Th & gt; Shareholder diversity & lt; / Th & gt; & Lt; Th & gt; Consumer diversity & lt; / Th & gt; & Lt; Th & gt; Regulatory Diversity & lt; / Th & gt; & Lt; Th & gt; Root reason & lt; / Th & gt; & Lt; Th & gt; Investor Requirements * & lt; / Th & gt; & Lt; / TR & gt; & Lt;% foreach (different items in model model) {%> & Lt; TR & gt; By using & lt;% (Ajax.BeginForm ("Create", New AjaxOptions ()), {%> & lt; TD & gt; & lt;% = Html.Encode (item.Code)% & gt; & Lt; / td> gt; & lt;% = html.encode (item description)%> & lt; / td> & lt;% html.reenderpartial ("create ", Blank, viewdata);%  <%}%> <> & lt; / tr & gt; & lt;%}% & Lt; / table & gt;  

      & lt; % Foreach (different items in the model. DefectCodes) {%> using <%> & lt; tr & gt; <(Ajax.BeginForm ("Create", New AjaxOptions ()) {%> & Lt This should be easy! - & Gt; & lt;! - ur codeid -> <% = Html.HiddenFor (modelItem = & gt; item.coidid)%> gt; & lt; TD & gt; & lt;% = Html.Encode (Item.Code)% & gt; & lt; / TD & gt; & lt; TD & gt; & lt;% = Html.Encode (item description)%> & lt; / td & gt; Lt;% HtmlRenderPortial ("Create", blank, Viewed);% & gt; & lt ;! - This is where the form is - & gt; & Lt;%}% & gt; & Lt; / TR & gt; & Lt;%}% & gt; & Lt; / Table & gt;  

    Its just fixes its hidden value! Problem ..

    You do not need to put it in a TD because it has to be hidden, so it will still get value for u, but will not show in the form In the table or in the view .. In this way you can put 3 TD and you can get more value than shown on the form.


    mediaplayback - WPF wmv/mpg files skipping and jumping -


    I am trying to run some WMV / MPG files using the Media Element Control and for some reason, the video files They jump and leave, they are playing.

    I have played them out of the WPF application and they want to play fine, so why can it be?

    I will scale them so much that they are small, can this be a problem?

    Also, if you think that it has a codec problem, then I can download an app to see what encoding it is? I have 1 (and only) video file that plays perfectly, so I want to copy it one.

    EDIT: I tried to use only one of those Vista videos which is a "sample video" folder and it's also bouncing ... I do not know why its a WMV file.

    For some reason, I can get a video file to run properly, which is a MPG file (in fact it only stops once and it is hard work), It is curious that its a MPG file ..

    Thank you very much! Mark

    I do not know the full reason why this is happening, but to help me Tip: Troubleshooting: If you are looking for information in depth about a media file, then I would recommend - I've found that this is a very good metadata which is relatively easy to view. Hope this will help.


    Proper layout of a C++ header file -


    What is the correct layout of C ++ .h file?

    What do I mean Header Guards include, typefefes, enomoys, structures, function delivery, class definitions, classes, templates etc ..

    I have an old code base for 10 years Older and going to a modern compiler from Covverier 8, things are looking at all the places because it is proving interesting. I can not find the name of one type of errors, without any kind Stopping on Oshit, etc.

    There is no silver bullet in relation to organizing your headers. Although an important rule is that to remain consistent in this project, all the people involved in the project should know what to expect.

    Typing and defining my titles is usually at the top of the file, but it can not be considered as a rule, then class / template definitions come.

    A rule that I follow for C ++ is a header per class, which usually does not hold the top authors enough to rob content and find things too much scrolling.


    Java ResourceBundle Performance -


    I am using ResourceBundle and Locale to view property values. Quite simply, the code looks like this:

      public static string getPropertyValue (local locale, string resource name, string key) {ResourceBundle Resource = ResourceBundle.getBundle (resource name, locale); Return resource .getString (key); }  

    My question is about performance, by accessing the asset files on the cashpath can the caching approach be quick or better implementation? I understand that the display of resource bundles is generally very good.

    Attribute file (in this case) is less than 30 lines (i.e., add ~ 30 key / value).

    I question performance because we can use the same approach on high-load pages, and the look-on-demand approach can be costly.

    According to:

    Resource bundle example getBundle < / Code> are made by factory methods are cached by default, and are returned in factory methods only. Resource bundle example is cached several times.

    So you do not have to caching yourself. But if you need corrective control for caching behavior, then you can use surcharge and can be optimized.


    performance - SQL Server 2008 extremely slow using FTS on joined tables -


    मेरे पास दो टेबल हैं

      उत्पाद (id int, brandid int, name nvarchar (1000) )) 2+ मिलियन पंक्तियां ब्रांड (आईडी इंट, नाम नैवर्चार (1000)) 20k पंक्तियां  

    पूर्ण पाठ अनुक्रमणिका दोनों तालिका के नाम फ़ील्ड पर सक्षम है।

    अगर मैं करता हूं एक खोज जैसे

      SELECT count (*) से उत्पाद पी में ब्रैण्ड बी को पी। ब्रेंडैड = बी.आईडी जहां शामिल है (b.name, 'calvin')  

    सुपर फास्ट (एक सेकंड से कम) चलाता है। पी.नाम फ़ील्ड के खिलाफ दौड़ते ही एक ही परिणाम।

    लेकिन यह क्वेरी

      SELECT count (*) से उत्पाद पी में ब्रैण्ड बी में पी। ब्रेंडैड = बी.आईडी WH जहां शामिल हैं (बी.एन.एन., 'केल्विन') या इसमें (पी। नाम, 'कैल्विन')  

    एक मिनट (वास्तव में कई मिनट) लेता है यदि या में बदल दिया गया है और यह भी सुपर फास्ट है।

    मैं यूनिअन या कंटेस्टेबल का उपयोग नहीं कर सकता क्योंकि मैं नाइबरनेट का उपयोग कर रहा हूं।

    मैं सुझाव है कि आप पढ़ा।

    OR के साथ कोई भी प्रश्न प्रदर्शन समस्याओं का एक संभावित स्रोत है। शामिल होने के दो तालिकाओं के बीच एक या, जो कि आपदा के लिए निमंत्रण जैसा है, क्योंकि ऑप्टिमाइज़र ने मूल रूप से किसी भी जानकारी को खो दिया है जिसमें शामिल होने का अनुकूलन करना है। पूर्ण पाठ की स्थिति में फेंक दें, जो कार्डिनिलिअटी भविष्यवाणी (स्थिति से मेल खाने वाली पंक्तियों की संख्या) को सर्वश्रेष्ठ में एक जंगली अनुमान देगा और आप खुद को एक सही तूफान प्राप्त करेंगे।

    OR से छुटकारा पायें अवधि। अपनी आवश्यकताओं को संशोधित करें, मध्य पुरुष (ORM परतों) को त्यागें


    autocomplete - AutoCompletion with the editor -


    I know that automatic completion is a mixed blessing with programming editor, sometimes it correctly guesses , Or, when pre-typed, many options can come from, it moves towards the next logical point, and writes the next required letter and moves it in the right direction. Really sweet when it works right.

    However, it often creates the wrong key word and progresses all the way to the end, forcing a backspacing process that does not definitely connect to coding efficiency. Is there a way to return the word word-by-word, or is the cursor returned at that point, so that it went ahead? This will definitely help.

    Thanks in advance for any help.

    John Donor

    Ctrl + Backspace

    In most editors, it backs up a logical term, which is using camel cas or under-sea notation.

    You Ctrl + Left and Ctrl + right Can also use a time.


    javascript - How to call a servlet from a jQuery's $.ajax() function -


    I am trying to call servlet from jQuery's .jax () function.

    At this time I do not think I call the servlet or passing it to the parameter, although a lot of Googling has not helped. any idea?

    This is my html:

      & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = ISO-885 9-1" & gt; & Lt; Script type = "text / javascript" src = "jquery.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Function Login () {$ ("# Loading") Hide (); Var email = document.nameForm.email.value; $ .ajax ({type: "GET", url: "processform", data: "email =" + email, success: work (results) {warning (result);}}); } & Lt; / Script & gt; & Lt; Title & gt; My AJAX & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; This time it's going to work & lt; / P & gt; & Lt; Form name = "nameForm" id = "nameForm" method = "post" action = "javascript: login ()" & gt;  

    Email loading

      & lt; / Body & gt; & Lt; / Html & gt;  

    and my web.xml

      & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Web-app xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: web = "http: //java.sun.com/xml/ns/javaee/web-app_2_5.xsd "xsi: Schema Location =" http://java.sun.com/xml/ns/javaee http: //java.sun Com. / Xml / ns / javaee / web-app_2_5.xsd "id =" WebApp_ID "version =" 2.5 "& gt; & Lt; Display-name & gt; Ajaxtry & lt; / Display-name & gt; & Lt; Welcome-file-list & gt; & Lt; Welcome-file & gt; Index.html & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Index.htm & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Index.jsp & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Default.html & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Default.htm & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Default.jsp & lt; / Welcome-file & gt; & Lt; / Welcome-file-list & gt; & Lt; Servlet & gt; & Lt; Servlet-name & gt; ProcessForm & lt; / Servlet-name & gt; & Lt; Servlet category & gt; Com.ajaxtry.web.ProcesFormServlet & lt; / Servlet category & gt; & Lt; / Servlet & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; ProcessForm & lt; / Servlet-name & gt; & Lt; URL pattern & gt; / ProcessForm & lt; / URL pattern & gt; & Lt; / Servlet-mapping & gt; & Lt; / Web application & gt;  

    Servlet is currently just a template:

      package com.ajaxtry.web; // Import Public Segment ProcessFormServlet {Public Zero doPost (HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {response.setContentType ("text / html"); PrintWriter out = response.getWriter (); Println (request.getParameter ("email")); }}  

    Here are some problems:

    Again Calling .out.println, which is currently sending output to the standard - not the browser. Just try to replace "system.out.println" in "out.println"

    It seems that you have defined doPost () in your topmost code, but using your Javascript "GET" method Repeat DoGost (), or define both.

    That is being said, you probably should not bother with javascript until you are actually getting servlet work, it is simple to keep it. You should be able to check it by loading / process email = testing in your browser and see some output. Once you receive it, you can start worrying about the front-end code.

    Hope that helps you get started.


    How to implement proximity search with postcode? -


    I have to use proximity search with postcode for Australia some links like

    I know Let's see if I'm not mistaken, then I have to manage the post code with latitude and longitude. But I can not get it to apply. Can someone suggest me how to do this with php or give some links so that I can see more about it.

    Thanks in advance

    Edit:

    I have edited my question:

    Can I use the Google API for the given category I have found a link which is for Doppel, can I use the Google API to get the postcode only? The link has been followed

    You must find a database that has longitude and latitude of each postal code. Once you have longitude and latitude, to calculate the distance between the points you will use the whwayen formula () To find proximity, you have to calculate the distance from your starting point to all points of your dataset. You can consider using a bounding box and then you can search for points within that bounding box. A geographical spatial database such as PostGIS has built in functions that can help with everyone.


    smartsvn - svn : Can not Parse lock / entries hashfile -


    Whenever I try to lock or unlock any file in the project, I get an error:

    svn

    Some clues: 1. We have migrated from one URL to another url.

    Is there any way that I reset the repository lock file Can i do In the migration it is possible that your repository has been damaged (although check the copy of the job first, as suggested -)

    Unless you have any other options, do not mess with your repo resident). If so, you can & lt; Root & gt; By removing the / db / locks folder, all the locks on the repository "can end manually".

    This will not affect the contents of your repo, but will delete all data. Also keep in mind that, if your repo locked data Has become corrupted, it is entirely possible that other data is as equally possible. Place around pre-migration backups.


    php - How to develop a MVC framework from scratch? -


    The view is different from MC,

    but how to separate M and C? The difference seems a bit unclear to me.

    I am using PHP.

    The "model" portion of the MVC refers to the data access layer, so you can read / write from the database Should create a class for Often this is a model "unit" per unit, therefore, say, a class for articles, a class for categories, as well as a simple database class is a good idea.

    The "controller" part is the general argument, and usually the entry point here, you check the input and requested page, use the model to find the right data and in the variable for the view.

    As you said the "scene" part is quite easy. Simply include a file from the controller that contains most HTML but outputs to your PHP variable.


    .net - Is there a better way to implment Equals for object with lots of fields? -


    See also

    I have a lot of data transfer objects (DTOs) I have many simple fields in each I need to implement equivalent on all of them (so I can write some unit tests for some WCF transport for them).

    The code I am using is:

      public override Bull equivalent (object rhs) {RequestArguments other = rhs as requested requests; Other Return! = Null & amp; Amp; other. M_RequestId.Equals (RequestId) & amp; Amp; other. M_type Eckels (M_type) & amp; Amp; other. MO Parameter. E.L. (M_Parameters) & amp; Amp; Other.m_user.Equals (m_user); }  

    Should be a better way! ... (Listing all areas is asking for errors and maintenance problems)

    Example We have the object to help with cloning () Clon () from membership, but I can not find anything to help with equals, we are in full faith, so a reflection based solution is an answer, but I do not want to change the wheel again. >

    (Sorry, we domain-specific Do not generate DTO from language, otherwise this kind of thing will be easy! I am also unable to change the build system to add another step)

    Funny you should ask, I recently published some code to do this. Check me to see if it meets your needs.

    It is very easy to use and very efficient too. It uses the IL-Fest to run the entire equivalent and GetHashCode function for the first time (once for each type of use). This compares the object used by the default parity comparison for each item (private or public) compared to that type (equity compar. Default). We are using it for a while in production and it feels stable, but I will not give any guarantees =)

    It takes care of all those edge-edge cases, you rarely When you think of rolling equal to your own method (i.e., you can not compare your object with taps unless you box it in an object and close too many blank-related issues. Give).

    I mean to write a blog post about it, but it is not found around it yet the code is a bit undocumented, but if you like it, I can clean it a little bit .

      Public override int GetHashCode () {return MemberwiseEqualityComparer & lt; Foo & gt; .Default.GetHashCode (this); } Public override baul par (object obj) {if (obj == faucet) return false; Return equal (obj as fu); } Public Override Bull Iqlus (Fu Other) {Return Membership Features Consistency & lt; Foo & gt; Default. Ecloss (this, others); }  

    MemberwiseEqualityComparer is issued under meaining, you can do anything you want to do with it, give it a little license to use it in proprietary solution Including without using.


    flexbuilder - why my Flex Builder wouldn't show errors? -


    I installed Flex Builder 3, it never shows an error, I need to run an appliction to see the errors Is the problem builder with it? Need to install any additional plugins?

    You will have to create a project to view the errors - click the project to do this Create or Build (Ctrl-B) option in the Project menu.

    Whenever you save the associated file in the project, then automatically create automatically option in the Project menu.

    >

    bytecode - Byte code to java -


    Is it possible to convert a .class file to a .java file? If yes then how? What is the correctness of code removed from this option?

    This is possible. To do this, you need a Java decampler.

    Most of you will do this amazingly good job which you will get is a valid .java file that will be compiled from the .class file but it The .java file will not necessarily be the same as the basic source code, things like looping construction can vary, and anytime compile, such as generic and reproduced in the form of annotations will not be done.

    You may have a problem if it is a process that changes class files so that it becomes difficult to decompile. For example, the class and variable name change to all, so that you will end up with the code like aa.a (ab) instead of employee.setName (name)

    I remember to do this, but I do not think it has been actively maintained, so it can not work with any versions of Java. A will give you many options.


    Is Network Up? C++ Fedora/Unix -


    Does anyone have a snippet of their code, it checks whether the network is enabled on the machine and the active IP address.

    I have a networking software that connects to other client machines, though it works, when the machine is connected, but if I unplug the cable or disable the network It throws a whole remix of exceptions.

    It would be good to put an inquiry at the top: D

    Thanks in advance

    The network is always in a dynamic position, at the beginning of the run, a simple test is not enough for the right operation. Unfortunately, you have to check the state's success for any network operation.

    Not for the program that started with the network disconnected state ... Please consider that your program has started automatically after the crash or the power failure or if any other component It has done something like this, or a mess it is surprisingly often, and restarting the program on the n + 1 computer, because some DVB has stumbled on the network cable is very upset.

    The network To check the general availability of the King, if you do not always respond to "ping-c-1 127.0.0.1", the return value is 1. It should be in startup script, it should be unnecessary for the code in the application.


    c# - When is it better practice to explicitly use the delegate keyword instead of a lambda? -


    Representative In relation to the explicit use of the keyword, there is no best practice regarding coding style: a lambda Instead of using

    example

      new thread ((=) = {// work item 1 / work item 2}). New thread (rep () {// work item 1 / work item 2}). Start ();  

    I think lambda looks better if lambda is better style, compared to the fact that lambda is in existence before it is applied, besides a representative keyword?

    The lambda syntax is more generalized, and designers have said that they want to remove the old overlapping syntax (no quote, but maybe it is Eric Lipton or John) < / P>

    };

    Versus Speaking:

      object.Event + = (Sender, Args) => {};  

    That can be very useful in large logic lists and / or to make the code more flexible for refactoring.

    Edit: As mentioned in another answer (now unfortunately deleted), a very streamlined use of this trick is to provide a default hander for an event using the Null Object pattern. For: -

      class MyClassThatFiresWithoutTheTrick {Public Event EventHandler MyEvent; // implicit = null // One method is required to keep this dry because each fire requires a redundant check - see the Abrams and framework design guidelines. Virtual zero overview () {// is required to be protected. // See C # 3 version P664-5 through CRL Reason Why this work is / var handler = MyEvent; // But this preferred version is Var Handler = Interlock Compressed Exchange (Ref: MyAvent, blank, blank); // This check is required because it can not be override if (handler == blank) return; Handler (this, EventArgs.Empty); }} Category MyClassThatFiresWithTheTrick {Public Event EventHandler MyEvent = delegate {}; Protected Virtual Zones OnMyEvent () {MyEvent (This, EventArgs.Empty); }}  

    (Although you can often do that which is an inline method of OnMyEvent , the code is even smaller again.)


    javascript - Is this the right way to preload images? -


    Is the correct way to preload this image below?

    I have a table that changes the background once 'Choose Options' has changed. In the body of my page, I have this:

      & lt; Body onload = "preload ();" & Gt;  

    and in my form on the same page:

      & onchange = "swap ();" & Gt; & Lt; Option bla bla & gt; ; & Lt; / Select & gt;  

    and JS:

      function preload () {image = new image (720, 65); Pic.src = '../picture.jpg'; } Function swap () {document.getElementById ("table_id_here"). Style.backgroundImage = '../picture.jpg'; }  

    function in swap () I think the picture. The JPG file has already been loaded already, right?

    Really Cached (Preloaded)?

    Thanks

    Use something like Firebug's network device

    I think your code should work, however it is a popular script that has been used for Dreamweaver image preloading:

      function MM_preloadImages () {// v3.0 var d = document; If (D. Ingers) {if (! D.MM_p) d.MM_p = New Array (); Var i, j = d.mm_p.length, a = MM_preloadImages.arguments; For (i = 0; i & lt; a.length; i ++) if (a [i] .indexOf ("#")! = 0) {d.MM_p [j] = new image; D.MM_p [j ++] Src = a [i];}}} MM_preloadImages ('img1.gif', 'img2.gif'); // Add more if necessary  

    C#: capture screen from Windows service -


    I have to capture a screenshot of the desktop after every second. This is running fine in the Winform application but after capturing the code in a Windows service it is not capturing screenshots. Why is not any idea doing this?

    Here is the code

      Public partial class screencapture service: servicebase {system. Tires Timer Timer = New System. Timer (); Public Screencake Service () {Initial Group (); This.timer.Interval = 1000; This.timer.Elapsed + = New System Timers.ElapsedEventHandler (timer_Elapsed); } Zero timer_executed (object sender, System.Timers.ElapsedEventArgs e) {CaptureScreen (); } Turn on Safe Override Zero (string [] ARG) {If EventLog.SourceExists (this .ServiceName, Environment.MachineName)} {EventLog.CreateEventSource (New Event Source DataData (This. ServiceName, Environment.MachineName)); } EventLog.WriteEntry (this.ServiceName, "OnStart Event has been called"); This.timer.Enabled = true; capture screen(); } Protected Override Zero Ontop () {EventLog.WriteEntry (This service name, "Ontop incident has been called"); This.timer.Enabled = false; } Fixed int calculation = 1; Private Zero Capture Screen () {bitmap prinsscreen = new bitmap (screen. Premiere screens.bounds, screen, premiumscreen.bound.height); Graphics Graphics = Graphics.Frame Image (Printscreen as Image); Graphics.CopyFromScreen (0, 0, 0, 0, printscreen.Size); PrincScreen Save (@ "C: \ Printscreen" + Count ++ + ".jpg", Image Format.jpg); EventLog.WriteEntry (This. ServiceName, "Screenshot Capture"); }}  

    Do you allow service to interact with "desktop" "Checked service property)?


    algorithm - Calculate discrete logarithm -


    सकारात्मक integers b, c, m जहां (b & lt; m) दिया गया है यह सच है यह एक सकारात्मक पूर्णांक ऐसा खोजना है

      (b ** e% m == c) सच है  < / प्री> 

    जहां ** exponentiation है (उदाहरण के लिए रूबी, पायथन या कुछ अन्य भाषाओं में) और% मॉड्यूलो ऑपरेशन है।

    उदाहरण:

    बी = 5 को देखते हुए; सबसे प्रभावी एल्गोरिथ्म (निम्नतम बड़ी-ओ जटिलता के साथ) क्या है? c = 8; मी = 13 इस एल्गोरिथ्म को ई = 7 मिलना चाहिए क्योंकि 5 ** 7% 13 = 8

    यह isn बिल्कुल एक साधारण समस्या नहीं है इसे गणना करने के लिए कहा जाता है और यह किसी के लिए व्युत्क्रम ऑपरेशन है।

    ज्ञात कोई कुशल एल्गोरिदम नहीं है। यह है, यदि एन एम में बिट्स की संख्या को इंगित करता है, तो सभी ज्ञात एल्गोरिदम ओ (2 ^ (एन ^ सी) में चलते हैं) जहां सी> 0।


    javascript - i need script in jquery that make the page as your default home page website in the browser -


    I need a script in jquery / javascript that creates a specific site in the browser as a homepage,

    thanks

    itemprop = "text">

    Internet In Explorer 7 and earlier it is possible to use

      document.setHomePage ("http://www.mywebsite.com/");  

    However, this is not possible in recent versions (this is considered a security risk) and was never possible in other browsers such as Firefox.

    The best fallback is actually to direct the user how to change the home page rather than programming to complete it.

    In Firefox (I'm not sure about other browsers) It is possible that the user should drag a link and leave it on the Home button, and thus changing the start page (after confirmation) . You can give the user instructions for dragging an image (which is inside an anchor tag linking to your website) and leave it on the Home button.


    GitHub git remote add origin git@github.com:username/ProjectName a one time process? -


    If I have two GIT projects with two different projects on my machine then

    I can manage code in this type of two directories

      / foo1 $ git to add remote git@github.com: username / ProjectName-1 / foo2 $ git Remote add original git @ github Com: username / projectName -2  

    Is it being stored in the system or in the GIT config file?

    In each repository (project), the .git / config file Is stored in.

    Yes You are doing the right thing by adding different remote repositories


    c++ - Detach a pointer from a shared_ptr? -


    संभव डुप्लिकेट:

    मेरे इंटरफ़ेस का एक फ़ंक्शन ऑब्जेक्ट के लिए एक सूचक देता है। उपयोगकर्ता को उस ऑब्जेक्ट के स्वामित्व लेना माना जाता है। मैं बूस्ट को वापस नहीं करना चाहता। शेयर्ड_पीट्रर, क्योंकि मैं ग्राहकों को बढ़ावा देने के लिए मजबूर नहीं करना चाहता हूं। आंतरिक रूप से हालांकि, मैं अपवाद के मामले में मेमोरी लीक को रोकने के लिए एक साझा आईपीटीआर में सूचक को संचित करना चाहूंगा। एक साझा सूचक से सूचक को अलग करने का कोई रास्ता नहीं है। कोई भी विचार यहां है?

    आप जो खोज रहे हैं वह एक रिहाई फ़ंक्शन है ; shared_ptr में एक रिलीज़ फ़ंक्शन नहीं है। :

    क्यू क्यों साझा नहीं किया गया एक साझा रिलीज़ () फ़ंक्शन?

    ए Share_ptr स्वामित्व को तब तक नहीं दे सकता जब तक कि यह अनूठा () न हो, क्योंकि अन्य प्रतिलिपि अब भी वस्तु को नष्ट कर देगी।

    विचार करें:

      shared_ptr & lt; int & gt; एक (नया इंट); shared_ptr & LT; पूर्णांक & gt; बी ० ए); // a.use_count () == b.use_count () == 2 int * p = a.release (); // अब कौन पी मालिक है? बी अभी भी अपने डिस्ट्रिक्ट में उस पर डिलीट करेगा।  

    इसके अलावा, रिटर्न () से लौटा संकेतक भरोसेमंद ढंग से डीलोक करना मुश्किल होगा, क्योंकि स्रोत shared_ptr कस्टम डिलीवर के साथ बनाया जा सकता था।

    दो विकल्प जिन पर आप विचार कर सकते हैं:

    • आप std :: tr1 :: shared_ptr का उपयोग कर सकते हैं, जिससे आपके उपयोगकर्ताओं को सी ++ लाइब्रेरी कार्यान्वयन का समर्थन करने की आवश्यकता होगी TR1 या बूस्ट का उपयोग करने के लिए; कम से कम यह उन्हें दो के बीच का विकल्प देगा।
    • आप अपना खुद का boost :: shared_ptr - साझा साझा सूचक लागू कर सकते हैं और अपने बाह्य इंटरफेस पर इसका उपयोग कर सकते हैं।

    आप इस प्रश्न के बारे में भी चर्चा कर सकते हैं।


    xcode - Core Data Relationship Fault -


    Tracking a family relationship in core data (1 parent unit + 2 types of children, one of which is recurring) Trying to create a drop-menu in the interface builder that lists the parents' names, so that users can choose to associate as a parent to edit. I have got all the binding sets, but when it runs, the following error in the first slot of the menu generates the following error text:

    ( & lt; NSRelationshipDescription: 0x100143ed0 & gt; ( ), warnings ( ), versionHash modifier (using null). ), name parent, isOptional 1, isTransient 0, Unit family, renamingIdentifier parent, ), destination unit family, inverse relationship, subfimures, minimum 0, maximum 0 0x10025c850

    I have A little bit has been read around, and it appears to do this with the fact that many relationships have been established to me (as a parent can have many children, but I can not have children I want to limit only one parent). I am trying to find a way to reconstruct the data model to not have multiple relationships on a model that should be called in such fashion, but I am stuck in an attempt to understand how Any thoughts on the possible ways to solve the problem for kids to track?

    One mistake in core data is not an error, it simply means that whatever you reach It is not recovering from that database yet. If you do something like [fetchResults valueForKey: @ "name"] then it will set a fire and you should get what you should expect. This should not be a problem in your relationship model.

    By the way, "minCount 0, maxCount 0" looks strange. Do you really want this? The maximum number of 0 and the maximum number of 1 should be understood more


    java - xstream > backwards compatibility when making an abstraction in the model -


    मेरे पास है

     class A {@xstreamalias ("obj1"); वस्तु obj1; @xstreamalias ( "obj2"); वस्तु obj2; } और मैं वर्ग एब्स्ट्रेट ए {{Xstreamalias ("obj1") में बदलना चाहता हूं; वस्तु obj1; } वर्ग ए में एब्स्ट्रेट ए {0xstreamalias ("obj2") फैली हुई है; वस्तु obj2; } 


    obj1 की सामग्री को खोले बिना।

    वर्तमान में मुझे पुराने xml को पढ़ने में कोई परेशानी नहीं है, इसके अलावा मैं obj1 की सामग्री ढीली कर सकता हूं। क्या यह किसी तरह एक्सस्ट्रीम में समर्थित है? मेरा मतलब है कि मॉडल परिवर्तन में अमूर्तता एक सामान्य बात है। Xstream वास्तव में परवाह नहीं करता है कि ए एक उप-वर्ग है या नहीं, जब तक कि XML अभी भी नहीं है फिट बैठता है।

    मेरा सुझाव: पुरानी एक के साथ नई कक्षा ए के क्रमबद्धकरण के परिणाम की तुलना करें (वे समान होना चाहिए)। यदि नहीं, तो यह आपकी समस्या का स्रोत है।


    oracle10g - How can I remove table partitions from an Oracle table? -


    I've found that the partitions used on a particular table are affecting the query execution and removing the partitions from the table Want to Is there an easy way to do this? There are 64 divisions in the table in question, on the basis of some initial investigation, I have come up with the following options, is there any better way?

    1. Copy the data to any other table, leave all the partitions, then copy the data back to the original table
    2. Copy the data to another table, Original table, then rename the new table and recreate the index
    3. Use the merge portion to merge all the partitions into one partition

    Thoughts ?

    Personally, I think that one type is the best way on option 2.

    1. Create a new table as * from the old table *
    2. index the new table (*)
    3. Old name To change the table slightly,
    4. Rename the new table with the old table name
    5. Switch any foreign key barriers from the old table to the new table Perhaps (

    (*) possibly a non-partition table might transfer any grants, synonyms etc.

  • Separate one needs to be indexed separately if you are specifically associated with index names, then you use syntax after ALTER INDEX ... RENAME TO ... 6 can do.

    The advantage of this approach is that it reduces your downtime (basically steps 3, 4 and 5)


  • apache - Replace a trac site with a basic redirect page -


    We have track track site for listening on / tracproj /, it quickly passes through mod_python control and some python Does magic (I 'a php coder: - p);

    Anyway. I have a project on / tracproj / {projectname} and I want to replace all the requests for that URL with another page that redirects them elsewhere (we are transferring one track to another bug tracking system) < / P>

    The easiest way is to add a new entry in httpd.conf to listen to the DIR and redirect, but it is a bit messy: - D; I also do not seem to be able to work it: -P

    Is there any way - as part of the inside or trac - which I do after that?

    What efforts have you made in Apache that is not working? It seems like the simplest route for me.

    I will suggest some of these lines:

      redirection / tracproj / whatever http: //another.bug/tracking/system  

    To do this within Trac, I believe, a track plugin will need to be added or written.


    visual studio - What is the shortcut to skip all break-points in VS? -


    When I am on a breakpoint and if I want to ignore all the breakpoints and want to move forward, let me know Disable all breakpoints "

    debug menu.

    Continue with this and then F5 .

    You can call it Tools / Options Set as a keyboard shortcut under / keyboard Are spun.


    c# - OData Post returns basic entity without navigation properties -


    I have a POST request for an Odita controller whose unit is attached with Navigation Properties, and I would like to all these After solving the posts, they will come back. Instead, the only attribute for the unit that holds the column in the DB table indicates that unit.

    I am calling this method:

      // POST: public / ASCNC work in Odata / Link & lt; IHttpActionResult & gt; Post (link link) {link.ImageId = HelperModule.GetThumb (link.WebsiteUrl, 400, 300); Link.CreatedOn = DateTime.Now; Db.Links.Add (link); Wait db.SaveChangesAsync (); / * We now have the link saved in the link that we need to add to the enclosed views / foreach (link link in the link .broad link) {bl.LinkId = link.LinkId; Bl.IsActive = True; Db.BoardLinks.Add (BL); } Wait db.SaveChangesAsync (); Return made (link); }  

    Here is the unit:

      Public category links {public date time? Created {Received; Set; } Public string description {get; Set; } Public String ImageId {get; Set; } [Key] Public Link Link ID {Received; Set; } The name of the public string {get; Set; } Public string website url {get; Set; } /// & lt; Summary & gt; /// Last modified time for this object. /// & lt; / Summary & gt; [Timestamp] Public Byte [] Timestamp {Receive; Set; } Public identification & lt; LinkGrade Level & gt; Linkgrad Levels {Get; Set; } Public icon & lt; LinkCategory & gt; Link categories {get; Set; } [NotMapped] public list & lt; BoardLink & gt; Board Links {Get; Set; }}  

    Here is the table for the unit:

    Link Table

    When I set a breakpoint on the return of the post method, I can see that the linkgrad level, link category, and board links are set in. These three above mentioned items are the navigation properties Are there. I have configured them in the EDM model as you can see below:

      /// & lt; Summary & gt; /// odata creates models for end points. /// & lt; / Summary & gt; /// & lt; Returns & gt; IEdmModel for Odeta & Lt; / Returns & gt; Private Static IEdmModel GeneratedAdam Model () {var Builder = New ODataConventionModelBuilder (); Builder.EntitySet & LT; Board & gt; ("Boards"); Builder.EntitySet & LT; BoardLink & gt; ("Boardlinks"); Builder.EntitySet & LT; Category & gt; ("Categories"); Builder.EntitySet & LT; GradeLevel & gt; ("Gradelevels"); Builder.EntitySet & LT; Link & gt; ( "Link"); Builder.EntitySet & LT; LinkCategory & gt; ("Linkcategories"); Builder.EntitySet & LT; LinkGradeLevel & gt; ("Linkgradelevels"); Return Builder GetEdmModel (); }  

    When the link is returned from the client side, it does not have any navigation property from it and only created in it, description, image id, link id, name, website URL and timestamp Why is it like this? Do I have to do something special so that she can return everything to POST request?

    Edit: I have to tell that I have made a return method a link and it did not work and whatever I mentioned is back. I have also tried to return the following at the end of my existing POST method:

    return (link);

    It was not working too, this I returned the same thing as I listed above.

    If you request data from the ODATA provider, then you may include the referenced resource inline $ extension can include it can be implicit or explicit (see).

    According to the post data, the server "... is sending the last state of the resource back to the customer." And "the entry being made may have links to other entries in the service."

    I think that Microsoft reads that the information being returned is only the object, again to regain the full object, you will have to recover the data again with GET.


    Print outputting objects to a .txt file in java -


    मेरे पास यह कोड है:

      अरेरेलिस्ट & lt; कर्मचारी & gt; ArrEmployee = नए अर्रेलिस्ट & lt; कर्मचारी & gt; (); // कर्मचारी वस्तुओं के लिए सरणी {स्कैनर txtIn = नया स्कैनर (नया फ़ाइल ("/ उपयोगकर्ता / पैट्रिकबुइ / दस्तावेज / कार्यस्थान / COMP 249 - असाइनमेंट 3 / src / payroll.txt")); के लिए (इंट I = 0; i & lt; ArrEmployee.size (); ++ i) {जबकि (txtIn.hasNext ()) {// payroll.txt फ़ाइल के माध्यम से पाशन और उसके डेटा से कर्मचारी वस्तुओं को बनाने का प्रयास करें {long EmployeeNumber = TxtIn.nextLong (); स्ट्रिंग कर्मचारी नाम = txtIn.next (); स्ट्रिंग अंतिमनाम = txtIn.next (); डबल घंटे काम किया = txtIn.nextDouble (); डबल घंटावार पहुंच = txtIn.nextDouble (); अगर (एरेमॉपीबी.टेट (i) .getHourlyWage ()> 10.35) {नया इंपुटमिसमेट अपवाद (); // अपवाद फेंकता है यदि प्रति घंटा मजदूरी 10.35 डॉलर से कम है ArrEmployee.add (नया कर्मचारी (कर्मचारी संख्या, कर्मचारी नाम, अंतिम नाम, घंटे काम, घंटावारी)); } पकड़ (InputMismatchException n) {// payroll.txt में लंबे, स्ट्रिंग और डबल्स को पकड़ना जो मान्य नहीं है PrintWriter txtOut = नया प्रिंट Writer ("/ उपयोगकर्ता / पैट्रिकबुइ / दस्तावेज / कार्यस्थान / COMP 249 - असाइनमेंट 3 / src / payrollError ।टेक्स्ट"); TxtOut.println (कर्मचारी। कर्मचारी संख्या + + "" + कर्मचारी कर्मचारी का नाम + "" + कर्मचारी। अज्ञात + "" + कर्मचारी कर्मचारी। काम + + "+ कर्मचारी कर्मचारी।); txtOut.close (); }}}  

    और मैं एक तरह से पता लगाने की कोशिश कर रहा हूं जैसा कि आप देख सकते हैं, मेरे पकड़ने (InputMismatchException n) के लिए चर लिखने के लिए EmployeeNumber, [ ...], पेरोलएरआरटीटीटीपीटी नामक एक फाइल में हर घंटे वाउज करें

    मैंने कई बार कोशिश की है लेकिन पेरोलएररैट.टी. फाइल को कुछ नहीं हुआ ... मेरे कोड में कुछ गड़बड़ होनी चाहिए लेकिन मैं कर सकता हूँ यह पता लगाना नहीं है

    मैं टिप्पणी करूंगा, लेकिन प्रतिष्ठा मुझे नहीं देती ...

    निम्न कोड मेरे लिए काम करता है:

      सार्वजनिक वर्ग टेस्ट {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) इंटरवर्टेड एक्सपेशेशन फेंकता है, IOException {file f = new file (" test.txt "); f.createNewFile (); PrintWriter txt = नए PrintWriter ("test.txt"); Txt.println ("परीक्षण, परीक्षण, 1 2 3"); txt.close (); }}  

    ssl - s_client certificate validation fails in Windows for login.live.com -


    I downloaded it and put it on the default location C: \ OpenSSL-Win32 . I copied the file into C: \ openSSL-Win32Bin and participated:

      C: OpenSSL-Win32 \ bin> gtc; Openssl s_client -connect login.live Com: 443 -Suffy CA-bundle Verification of the certificate chain with the CRT  

    message fails:

    Confirm the return code: 20 (Get the local issuer certificate disabled)

    Using the same command with the same file on Debian VG with OpenSSL Version 1.0.1e:

    Verify the return code: 0 (OK)

    If I change the hostname to api.onedrive.com (the same command) then return me to return code and Receive Pas is: 0 (right) both Windows and Linux.

    Am I doing something wrong or is there a known bug? How can I work for it on Windows for login.live.com ?

    (Initially, I stumbled upon this problem, but now it looks like an OpenSSL issue.)

    s_client has an undocumented property (or perhaps a longer bug), if you give the option -Cafile , it was not only provided The CA will investigate against the file itself, rather than the default system (even on Debian at / usr / lib / ssl / certs ). If you use the files during verification, you will see the following code:

      $ strace - If you set the  openssl s_client  to  strace < Open with open / code> openl s_client -connect login.live.com:443 -Cafeail ca-bundle.crt ... open ("ca-bundle.crt", O_RDONLY) = 3 ("/ usr / Lib / ssl / cert.pem ", O_RDONLY) = -1 ENOENT (no such file or directory) ... open (" / usr / lib / ssl / certs / 415660c1.0 ", O_RDONLY) = 4 open (" / Usr / lib / ssl / certs / 415660c1.1 ", O_RDONLY) = 4  

    With this output you can see that it is only CAF Does not use IEL, but it also tries to use / usr / lib /ssl/cert.pem (does not exist) and then the subject hash 415660c1 / usr / lib / ssl / certs . Eventually he finds the original CA, which he is looking for in 415660c1.1 :

      $ openssl x509 -in / usr / lib / ssl / certs / 415660c1 1 -text ... Issuer: C = US, O = VeriSine, Inc, OU = Class 3 Public Primary Certification Authority ... Subject: C = U.S., O = VeriSign, Inc, OU = Class 3 Public Primary CERTIFICATION AUTHORITY  

    Because of the OpenSSL (this can not use the Windows CA store) any system default on Windows At the same time, the verification there will fail.

    As for api.onedrive.com : There is another trust chain in it and can be fully verified with the given CA bundle. Output from stress shows that it is / usr / lib / ssl / certs . /


    php - can logged LDAP user login to internal web portal? -


    I am an internal web portal using WordPress and windows. Active Directory-based users can enter the internal web portal.

    The client is now asking if the users are likely to log in through Active Directory, then it is possible that the user will automatically log in to the web portal entering the username and password. Could it?

    Is this possible? Any help and guide greatly appreciated.

    Thank you in advance.


    performance - construct a structured matrix efficiently in fortran -


    After leaving Fortran for several years, now I have to pick it up and start working with it again.

    I would like to create the matrix with the entry (i, j) form as the f (x_i, y_j) , where f < / Code> is a function of two variables, such as, f (x, y) = cos (xy) . In Matlab or Python (Numpy), there are efficient methods to control such a specific issue. I wonder if there is such optimization in Fortran or not.

    BTW, is it also true in Fortran that the operation with a vector is faster than Do / Four Loop (as it is in Matab and Nampi)?

    If you mean the same by vectors as you say in Matlab and Python, then the short form you Do not call the entire array, no, these forms are often slow, because they are hard to adapt to simpler loops, what happens faster when the compiler actually uses the CPU's vector instructions, but it does not And for the simple loop, use the compiler for them San.

    Fundamental works , concurrent , forall and where build in Fortran, And the array constructor is. There is no repetition here, they have been described many times in this tutorial or on this site.

    Your example is most commonly done using a loop

      do j = 1, ny do i = 1, nx entry (i, j) = f (X (i), y (j))  

    In a small way, you will probably have vectoring, full-array operation like Python, e.g.,

    < Pre-> a = cos (b) c = a * bd = f (a * b)

    and similar functions (called on each element of the array) , Should be original . These operations are not necessarily efficient, for example, the last call may require a temporary array, which will be avoided when using the loop.


    python - Using tetgen or triangle (or meshpy) to create a hollow dome -


    I am using Tetan to try to make a hollow dome. I was using the triangle and then triangulating a circle and z equation z according to sqrt (abs (r ^ 2 - x ^ 2 - y ^ 2)), but i have to raise the z values Pulling was very bad.

    So I just want to generate a bunch of this dome number and then I would like to trap it without filling it. Titz basically gives it to me by giving the .node and .faces files, but the problem is I'm still going down and I'm not sure how to get rid of it. I am very new to Tetan and Mashupi, so if someone can give me a work flow for this, I would greatly appreciate it. The answer can actually be very simple. For example, I am able to make points around the bottom of the circle with a simple task:

      def gen_pts_on_circle (num_pts), radius): point placement for i in np.arange For the use of theta via pnts = [] theta = 360.0 / num_pts # loop (0, 360, theta): x = radius * np.cos (np.radians (i)) y = radius * np. Sin (np.radians (i)) z = 0.0 pnts.append ((x, y, z)) return np.array (pnts)  

    then

      def gen_random_pts (num_pts, radius): for points = [] I in xrange (num_pts): q = np. Random.random (I generate random digits on the dome using the function) * (np.pi * 2.0) r = np.sqrt (np.random.random ()) x = (radius * r) * np.cos (cue ) Area equation with stomach value to create y = (radius * r) * np.sin (cue) # gom z = np.sqrt (stomach (r ** 2 - x ** 2 - y ** 2)) Returns ((X, Y, Z)) np.ar Ray (pts)  

    Then I just slapped the header from .node file and. Run tetgen to get file file. The only problem with this approach is below, when I need it to be an open dome.

    I will use more Messy, but these points have to be created and then feed it in the spinach so that nothing returns ....

      from meshpy.tet Import MeshInfo, generating all of the points using pts_circ = gen_pts_on_circle # build (100, 5) digits = np.vstack ((pts_circle, gen_random_pts (500, 5))) #tet mesh_info = MeshInfo () mesh_info .set_points (building with digits) Mesh = build (info)  

    Print np.array (mesh.facets) and print np.array (mesh.points) are now just empty arrays.

    Do anyone have any ideas about using meshpy without using this build method to install all aspects as well or to make aspects like command line tetan? It really does not get rid of my problem that is not open under the dome though, but I am trying to do some work. Any help would be greatly appreciated. Thanks!

    Just looking for this answer for someone else, so I have met the creator of meshpy. By default you will have to override the options to get rid of the default 'pq' commands. Then

      meshpy.tet is import option from MeshInfo, opt = option from it, overriding 'pq' with an option or flags mesh_info = MeshInfo, creating options ("") # () net = Construction (mesh_info = Opts)  

    Hope that helps someone who can stop this problem.