Posts

Showing posts from April, 2013

asp.net mvc - Using RenderPartial twice for same mvc view control in one page, get problems -

I am using the same partial view in the create.aspx view page, part of my code: & lt; % HTML RenderPartial ("LocationVerifyControl"); %> & Lt;% HTML.RenderPartial ("LocationVerifyControl"); %> In the MVC view user control, there was a button and test code for it: $ ('# btn Verify'). When I clicked the button, I saw the warning dialog twice, the main view page had content with the same IDs (function () {alert ("clicked by btnVerify");} How to solve this type of problems? To prevent the same ID in the main view page, do I use the html ID in the View data and pass them in partial view? If I ask my question Do not understand correctly, you want to add unique functionality to two different buttons with the same ID. Not really valid for being more than one element with the same ID If you have too many, then you should make it a single square, you want to run your markup in advance. Secondly you can do that, you can do a par...

asp.net mvc - Tree View In MVC -

is all how I can add a tree view to MVC. which has been around for a while. is quite descriptive and adds the extension to the HtmlHelper type TreeView. For example: & lt;% = Html.TreeView ("location", model location, L = & gt; L. infant location, l = & gt; l.Name) % & Gt;

reportingservices 2005 - Reporting Services error messages and navigate back to report -

I am working on SQL reporting services. I have a report where an invalid value is a part of the criteria for a report. As shown in the form, a new screen has been created with error message, there are no buttons on this screen so that the only way to navigate back to the report is to do this. Browse the backup button, in this case all search criteria already entered are lost. This error message screen has been prepared by Microsoft Reporting Services. My questions are, 1) Is it possible to add back button to this error page? 2) How to add back button to this error page? 3) How the parameters entered can be placed in some way (if I use the back button to return to the search criteria page)? Your help will be appreciated. Cheers Use the dropdown (as the slugger suggests). Deny it, I think that you have to understand a way to handle the mistake in SQL and in some way a dataset has to be returned, in which there is an error flag in which the parameter was on the fault. You c...

java - My ear which was build with maven does not generates its APP-INF/lib -

As I said in the headline that when I create the ear (war and EJB) it is copied within ear But APP-BBL is missing, and I do not know what the reason might be. This is a part of pom.xml: & lt; Plugin & gt; & Lt; ArtifactId & gt; Maven ear-plugged & lt; / ArtifactId> & Lt; Version & gt; 2.3.2 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; EarSourceDirectory & gt; $ {Basedir} / contentEar & lt; / EarSourceDirectory & gt; & Lt; DefaultLibBundleDir & gt; APP-INF / lib & lt; / DefaultLibBundleDir & gt; & Lt; Module & gt; & Lt; WebModule & gt; & Lt; Group & gt; My.webs & lt; / Group & gt; & Lt; ArtifactId & gt; Web & lt; / ArtifactId> & Lt; BundleFileName & gt; Web.war & lt; / BundleFileName & gt; & Lt; / WebModule & gt; & Lt; EjbModule & gt; & Lt; Group & gt; My.test.doc & lt; / Group & gt; & Lt; Arti...

compiler errors - how to compile an expression blend solution in visual studio -

We have installed XSC 2010 on our computer with our Expression Mix and Silverlight 4 tool with our development environment. We have a separate build box where we compile and build the entire project. I am getting errors while going through precompile which can not find references to the expression mix namespace. I think this is due to the fact that migratory mix is ​​not installed on the build box. What is the best practice to prevent this from occurring in the future? To present a solution, just had to place an expression mix on the build box, but I think that seems unnecessary. I have considered making a Lib Alert inside my project / solution files and then add all assemblies there. Then to add them to the reference directory, but point to the Lib directory within the project. I did this just because it seems that it is somewhat hacked because I'm basically making duplicate DLL, so no version or control When a DLL update is made etc. which may possibly lead to problems un...

sql server - Simple MS SQL count question -

मेरे पास यह एसक्यूएल है DECLARE @URL varchar (100) SET @url = Http://mysite.com/% 'SELECT [UserSessionSequenceID], [साइटआईडी], [रेफरर], [टाइमस्टैम्प], ROW_NUMBER () से अधिक (प्रतिभागी [रेफरर] आदेश द्वारा रेफरर डीईएससी) [एफटीएएम [टीबीएसएक्वेनेशन] से [ अभ्यर्थी] शून्य और [रेफरर] नहीं है @ रैल और साइटआईडी = 15 अनन्य रेफेरर की गिनती करना चाहते हैं - समस्या यह है कि यह एसक्यूएल सभी मैचों की वापसी करता है और एक-एक करके उन्हें गिनती करता है। यह कैसे करें? पाठ "आइटमप्रॉप =" पाठ "> का चयन करें [संदर्भकर्ता], गणना ([रेफरर]) के रूप में RefCount FROM [tblSequence] कहां [रेफरर] नहीं है और [रेफरर] नहीं @ सर्कल और साइटआईडी = 15 ग्रुप द्वारा [रेफरर] ऑर्डर वापस वापस करना (वास्तव में आवश्यक होना चाहिए) आपके सटीक आवश्यकताओं पर निर्भर करता है।

c - How to swap bit position value 12 34 56 78? -

ex: बाइनरी मान की तरह 1010 फिर स्वैप जोड़ी बिट स्थिति मान 0101 अहस्ताक्षरित चार स्वैप = ((मूल और amp; 85) & lt; & lt; 1) | ((मूल और 170) & gt; & gt; 1);

How to trigger an Outlook add-in outside of Outlook -

I have an Outlook COM add-in that is registered with Outlook and send the send event to trap the contents of the message Checks out. In the add-in exams, the content is to either reject or reject the content. The COM add-in is a standard VSTO add-in. I would like to write a C # cover around this COM add-in that will allow other processes to use this content scanning. My wrapper can load the COM add-in, but how do I go about triggering the event so that there is a COM add-in fire? Do I really have to use the Outlook Interop assembly to start sending send events to trigger the COM add-in? For procedures that do not have Outlook, I do not need to send the content, what I want to do is pass the COM add-in. Can anyone tell me in the right direction or if this is also possible? Your COM add-in registers for the event raised by Outlook and includes the event in which operators . COM does not add add-ins or any other Outlook events, so to trigger these events, you have to use the ...

c++ - How to speed up g++ compile time (when using a lot of templates) -

This question is probably strange in some way, but how can I compile the G + time? My C ++ code heavily uses and promotes templates I already exits from header files and use the Jay-J option, but still it takes a while to compile (and link) it. Is there a tool that analyzes my code and tell the bottle neck for the compiler? Or can any one profile compile the running on my code? It would be really good, because sometimes I have the impression that I spent a lot of time on the compiler console log ... What is most useful to me: Creating a RAM filesystem is trivial on Linux. You can also copy (like precompile or actual .h file) of the same header files. RAM files can be placed on the system. I have a copy (major) library (like Boost, QT, Stadlib). Wherever possible, declaration rather than inclusion of classes is less dependent, thus the number of files is reduced which require reader when you change the header file. This usually helps on a case-by-case basis, but I ha...

iphone - accessing the navigation controller from separate delegate class -

I'm a tutorial follwing a book and there are different representative data source controller (MyViewController.m) [self setDataSource: [[MyViewDataSource alloc] [self setDelegate: [[MyViewDelegate alloc] in order to understand, I no longer representative of a controller pop to class (MyViewDelegate.m) - (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath {2ndViewController * controller = [[2ndViewController alloc]]; [[Nav NavController] pushViewController: Animated Controller: Yes]; Of course this will not work since the NIT controller sits in the app delegate. But how do I navacroller from delegate class I can use best? You can do something like Uaiawhiajintrniyntrk * Navientrolr = [(Mappelgate *) [[UIApplication ShareApp] Rep] navigation controller]; However, you do more with myself should ask is why you need to do and if better way to MVC (Model View Controller) and rules of Encapsulation. For example , UIVi...

security - What's the best way to implement password recovery from a usability perspective? -

I read other password recovery questions on SO and it seems that most people have the idea of ​​sending a password recovery link Which can only be used Now my question is, (I know that this is subjective, but I am looking for input that you may have received from your users) Is it comfortable for users Is it right? And by the users I mean that your grandmother is not a colleague. As a user, I like when I can choose a new password for my choice, After that I have an activation mail, which provides clickable links for new passwords to be effective. I do not like when a new password is sent to me, when I have to log in and edit it in my profile. The best, though, is to have an openID login, so I do not have to keep any password.

c++ - How do I call "operator->()" directly? -

For some strange reason, I need to call operator-> () method directly. For example: class A {public: void foo () {printf ("Foo"); }}; Class ARF {Public: A * operator-> () {Return; Protected: A * A; }; If I have an arm object, I can call Fu () by writing: aref-> foo (); However, I want to get an indicator for protected member 'A' How can I do this? aref.operator-> (); // Returns A * Note that this syntax also works for all other operators: // One overloaded operators A * aref1 = / / ... A * aref2 = // ... aref1.operator * (); Aref1.operator == (aref2); // ... For cleaner syntax, you can apply a received () function or * to the operator Can overload the and & amp; * Aref as recommended for .

struts - Check empty string in jsp -

How to check empty string / null string in struts-JSP page Struts tag - not working Does it? See below: & lt; C: If test = '$ {empty param.whatever}' & gt; ... and & lt; / C: if & gt;

c# - Is there a faster way to copy a file other than File.Copy -

A takes approximately 2 minutes to file. Copy (src, dest); 1.6GB file to folder B from folder A to the same drive. To do this, C # /. There is a fast way in .NET code (W / O hardware) - something with the stream, threading etc.? Will a movie get faster? How about a class that ends a file using a Threadpool, and reads a range of bytes / reads a range of bytes [which seems like a great way to corrupt the file, but Integrity is not a priority here, its speed :-)] I searched but everyone uses the file. Copy, but it is slow (Slow as a copy of Windows) - I do not want to use any third party tool. Here are some answers to some questions: Comparison of time: & gt; C #: 2.15m & gt; Windows Explorer: 2.53m & gt; Terracopy: 2.26m & gt; Fastcopy: 2.24m OK, these are not average and I know they can change a bit in later run, but I really thought that a quick copy of the file The method would be because I had assumed that Windows was investigating additional secu...

C++ Pass by Reference Program -

IBM tells C ++ pass from the reference in the example given below (in the source). If I change from zero self I ... to zero swapnam (int i, nti j) , will it pass by value ? // Pass Reference / Writer - Include IBM # lt; Stdio.h & gt; Zero swapnum (int and i, int and j) {int temp = i; I = J; J = temp; } Int main (zero) {int a = 10; Int b = 20; Swapanem (A, B); Printf ("A% d and B is% d \ n", a, b); Return 0; } any Swapping If you pass by value then only are affected or appear within the function, they are not in the calling code. Also, once you return to the main you will see that A and B were not swap. This is the reason that when you want to pass swaping numbers to the referee. If you are just asking if this will be said, then yes, you are right, you are going through the price. Here's an example: #include & lt; Stdio.h & gt; Zero swapnum (int and i, int and j) {int temp = i; I = J; J = temp; } Void swapByVal (int i, int j) {int...

syntax - Delphi: Closing Brackets Optional? -

I have seen many times that syntax errors such as exits (push (ASBDD) ( Aspixmap, _ScriptSavePixmap (script, PMRGBEdz (_ScriptGetPixmap) (script, RGS [0]. Indexes, adparam))); Actually compiled. Note that a closing bracket ) is missing (definitely if I add this missing class then it is compiled!) Is this a document feature? Additional information: The statement given in the question is the last statement in a code block. Including any statement after this statement will cause the compiler to report the correct ")" error to the compiler. It will appear that the compiler loses the track of missing "missing" error when at the end of the block. This is the most compiler bug. It seems that this discrepancy has been around for a long time. do not count on it.

objective c - how to get the user list those who are access my facebook application through my iphone apps -

I am creating an iphone app that uses Facebookon details to enter the app as a group on iPhone app They are in GroupOn, they are using FBCNnect, which they can enter on Facebook, depending on the success of the admission, they are allowing me to reach out to my deals. I used the FBInet package, the application API to follow my questions, to use the user details to access What's the way Is my Facebook app registered to use APIs? Advanced thanks! Check the readme file shown below the source directory It looks like That you are talking about two things. First of all, you want your app to have extended permission from your users, so you can get your specific information. Second, after the permission, you want to query Facebook for that information. Once you have permission, you can make specific Facebook API calls.

design - What is the best way to handle the restriction of an API? -

So far our main domain has been given an abstract name by name, whose name is first name, last name, middle initial etc. Is with the methods. As we are expanding the domain for Spain, we thought that they only talk about names, first names, aliases and others. Name or mid-secondary etc. have no significance for them. At present, the API is present and a person's interface is being used at many places in Spain. The same place should also be used, therefore, the name of my choice is Spain, name from PersonName. But, if I do this then I will first expose the API for name, middle, initial etc. which are not applicable to Spain's domain. My question is, are we still maintaining backward compatibility, existing segregation? Any refactoring or design tips are highly appreciated. I'm also not sure what your question is "to expand SpainPersonName from PersonName", Do you mean to make Spain or to make a successor from a person's name? In any case, let me ...

winapi - Call StrFormatByteSize64 function from within C# -

How do I call the StrFormatByteSize64 function from Win API from Win API? I'm trying the following code, but without success: [DllImport ("shlwapi.dll")] static extern zero StrFormatByteSize64 (Ulong qdw, four [pszBuf], uint cchBuf) ; Four [] temp = new cell [128]; Ulhone Size = 2000; StrFormatByteSize64 (size, temp, 128); Console.WriteLine (Temporary); The documents of the function can be found here: Thanks! This works, however this may not be the safest way: Using the system; Using System.Runtime.InteropServices; Using System.Text; Public Class Test {[DllImport ("shlwapi.dll")) Static Externis Zero StormTormat Files 64 (Ulleung QW, StringBuilder Builder, UIT CCTF); Static zero main () {ulong size = 2000; Stringbuilder builder = new stingbuilder (128); StrFormatByteSize64 (size, builder, builder. Capability); Console.WriteLine (Builder); }} I am afraid that I do not know much about the interop - it may be that you do not have to specify t...

Deploying django under a sub-URL with Nginx/Fastcgi -

I can not understand how the DJJenja site can be used as a non-root location for NGN / Fastcassi, e.g. Instead ; All the examples that I have seen are either Apache or grow in the root of the site. Here is the relevant part of my nginx.conf : server {8080; Server_name localhost; Location / myproject / {fastcgi_pass 127.0.0.13030 with fastcgi server to host and port; Fastcgi_param QUERY_STRING $ query_string; Fastcgi_param REQUEST_METHOD $ request_method; Fastcgi_param CONTENT_TYPE $ content_type; Fastcgi_param CONTENT_LENGTH $ content_length; #fastcgi_param SCRIPT_NAME $ fastcgi_script_name; Fastcase_param pathhinfoofro $ fastcgi_script_name; Fastcgi_param REQUEST_URI $ request_uri; Fastcgi_param DOCUMENT_URI $ document_uri; Fastcgi_param DOCUMENT_ROOT $ document_root; Fastcgi_param SERVER_PROTOCOL $ server_protocol; Fastcgi_param GATEWAY_INTERFACE CGI / 1.1; Fastcgi_param SERVER_SOFTWARE nginx / $ nginx_version; Fastcgi_param REMOTE_ADDR $ remote_addr; Fastcgi_param REMOTE_POR...

bind - C++ binding question -

क्या boost :: bind काम std :: fill ? मैंने निम्नलिखित की कोशिश की, लेकिन यह काम नहीं करती: boost :: bind (std :: fill) , X.begin (), x.end (), 1); समस्या यह है कि std :: fill एक है टेम्पलेट फ़ंक्शन टेम्पलेट फ़ंक्शंस वास्तव में मौजूद नहीं हैं, ऐसा कहने के लिए, जब तक वे तत्काल नहीं हो जाते आप std :: fill का पता नहीं ले सकते क्योंकि यह वास्तव में अस्तित्व में नहीं है; यह समान फ़ंक्शंस के लिए केवल एक टेम्पलेट है जो विभिन्न प्रकारों का उपयोग करते हैं यदि आप टेम्प्लेट पैरामीटर प्रदान करते हैं, तो यह टेम्पलेट के एक विशिष्ट तत्काल संदर्भ देगा, और सब कुछ ठीक हो जाएगा। std :: fill फ़ंक्शन के दो टेम्प्लेट पैरामीटर हैं: फ़ॉरवर्ड इटरेटर टाइप , जो कंटेनर के लिए एक इटरेटर का प्रकार है, और डेटाटाइप , जो कि कंटेनर का प्रकार है आपको दोनों को प्रदान करने की आवश्यकता है, इसलिए संकलक आपको std :: fill टेम्प्लेट का उपयोग करना चाहता है। std :: vector & lt; int & gt; एक्स (10); बढ़ावा :: बाइंड (std :: fill & lt; std :: vector & lt; int & gt; :: iterator, i...

python - Splitting a list -

I pressed different resources and could not understand how to do a simple operation. Now, I have the following types of list: li = [['a = b'], ['c = d']] I want to change it as: li = [['a', 'b'], ['c', 'd']] As I understand, the partition ("=") only applies to string types. - DAN

Class design 'dilemma' -

I have never designed a proper class, so bear with me. Let's say we have the project class. So suppose we have a project group class, which has members like project class, as well as of project s There is a list. Must be a super class of Project Group Project or Project Group Project should be specialization and prior Should be a subclass of the latter? I will not bother you with the theory , because you get quick answers Are in a hurry. So here it goes: If your two classes are actually mentioned then they should be related to heritage, then from project group to project class Should get. How would it be like the C #: the public class looks like a project group: Project ... if they are not, but they belong to some common class Uses members (which defines their state and some functionality in that situation), I will write an interface and apply it in both classes. C # code again: public interface ICMMST ... Public Sector Project: ICMMS Tate ...

c# - InvalidCastException, QueryInterface call failing on COM component -

First of all, I'm totally new to the COM view so that I'm bare with me. I am currently trying to use the PCAnywhere's wet automation in a pure application (VS 2010, C #). PCA 12.5 comes with some TLB files, when I use VS I try to add as a reference, then I could not add 'a reference to both' E: \ Dev \ PCole \ Erem 32.tlb '. Please make sure the file is accessible, and it is a valid assembly or COM component. ', So what I did is generate an interop assembly using tlbimp.exe and managed to import the created DLL as no problem in the references. Fine. Even I have the code so far: Thread Piketi = new Thread (delegate () {CRemoteDataManagerClass Mng = new Kromotdetamanegrclas (); Rimotdetaaks class data = null; data = ( Rimotdetaaksclas) Manji. data (data == nULL) data = (Rimotdetaaksclas) MngkCreateObjectEx ( "Tempkchf"); data. connection type = "TCP / IP"; retrieving data ObjectEx ( "temp.chf", ( Brief) 2, blank); .phoneN...

.net - Get ItemId of next email given ItemId of current email, using Exchange Web Services (EWS) Managed API -

To read an email from mailbox, write a method in the C # that uses the Exchange Web Services (EWS) managed API The requirement is given to itemId / UniqueId of the current e-mail, returns the itemId / UniqueId to the next email in the inbox after the existing email. Besides, for various reasons, I need to become a static stateless method, i.e., it can not rely on any member / global variable which continues through the call. In this way I can not only store a reference for an example of FindItemsResults object and every time the method is called, then go to the next item. I tried to apply the method using the following code (only simple examples, no error checking): Microsoft. Exchange. Using web services; Using Microsoft.Exchange.WebServices.Data; ... ... public string GetNextEmailId (string currentItmid) {// Set Up Exchange Web Service Connection Exchange Service Service = New ExchangeService (ExchangeVersion.Exchange2007_SP1); Service.AutodiscoverUrl ("example.user@c...

Why are my pages linking to 404 pages using WordPress? -

I created some pages in Wordpress and displayed navigation so that users could click to visit those pages. When you click any link, in addition to the home link, it will not find a 404 page and will display a message below: The requested URL / New_mtt / About-us-2 Not found on this server. I realized that I had a page. Do not have a php file. Do I need this to see pages other than the index? Why are my pages not working properly? Your Wordpress-directory should have an .htaccess-file. There should be a rule for URL reconstruction. The problem may be: that file is missing, the file is corrupted or mod_rewrite is not allowed.

video capture - Importing real world models into a game engine -

What are the necessary hardware and software tools to import physical worlds into the game engine? Can I use an HD camera to do this? What is the support of popular game engines? As far as I know, there are no tools that take images of real world objects and You certainly import them into the game engine (of course, not such a commercial device). There are tools available that help the process, in order to recreate the physical objects in the tool, most game developers use the tool with teams of artists like 3D Studio Max or Maya. For example, motion captures can be used to capture animation data, how a person performs the trick, but the use of a speed capture studio is usually very expensive (only a few minutes of capturing animation Thousands of dollars for)

c# - How do I truncate a file X bytes from the end? -

Let's say that there is a file that is 150 bytes long and I want to shorten it to the previous 16 (or any number) Wish me from the end ... Is there any other way than writing the whole file again? Update: SetLength should do this, but unfortunately NotSupportedException has been thrown using (file stream fsFinalWrite = new FileStream (FileName, FileMode Open, File Access. Read-White, FileShare. Read-White)) {FSFANl World. Sec (16, Siocone. And); FsFinalWrite.Write (SwappedBytes, 0, 16); Debug Witterite ("FSFinalWrite =" + Debug FSFinal WorldCart. Wrightite ("FsFinalWrite can write =" + FsFinalWrite.CanWrite); fsFinalWrite.SetLength ((long) lengthOfFile);} Both prints are true! But still it throws a NotSupportedException. How does anyone handle it? About FileStream.SetLength () ?

how to add new field (such as user@domain) in Contacts on Android API 2.1 -

Hello I'm new to Android, I hope that people will help me achieve my requirement. I am using an Android API Level 2.1 I need to create a new area such as the user @ domain, as an e-mail format for every contact No. So I need to create a new mime type, now I have come to know how to create this MIME type. Please help me apply the new MIM type in the Contacts app. You can not apply your own custom mime type to show in the handler default contact application. It will not appear there but it will appear in your application if you do so. To store custom fields in contacts, see Other two connected questions

sql server 2005 - remove time from sql -

Please tell me how I can extract part of time from SQL dates. I have already read articles of 100 and most of them take time but leave 00:00:00, which I do not want, I do not even know that I can convert these zeros into curvature but unfortunately A datetime column in the database Always will be both a date part and a time part. SQL Server 2008 presents only the dates or types that only store the time, but, as long as the time of the column type date, you have to admit that part of the time is present, and you can do it in your application (suitable formatting By applying) can ignore. You can add a check barrier in the table to ensure that all the entries in the column are always at the same time part (i.e. 00:00:00).

winapi - Why the DrawItem method of my owner draw listbox can't be called -

I try to write the owner draw list box with the wtl my code looks like this Template & lt; Class T, Class TBZ = CLISBox, Square TWINTRAITS = CControlWinTraits & gt; Class ATL_NO_VTABLE CMyListBoxImpl: Public CWindowImpl & lt; T, Tables, Twintrats & gt ;, Public Condor Draw & lt; T & gt; {... BEGIN_MSG_MAP (CMyListBoxImpl) MESSAGE_HANDLER (WM_CREATE, OnCreate) MESSAGE_HANDLER (WM_DESTROY, OnDestroy) MESSAGE_HANDLER (WM_ERASEBKGND, OnEraseBackground) MESSAGE_HANDLER (WM_SIZE, OnSize) MESSAGE_HANDLER (WM_DRAWITEM, OnDrawItem) CHAIN_MSG_MAP (COwnerDraw & LT; t & gt;) DEFAULT_REFLECTION_HANDLER () END_MSG_MAP () ... Zero Init () {... ModifyStyle (0, BS_OWNERDRAW | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS); ...} Zero DrawItem (LPDRAWITEMSTRUCT lpdis) {... I have also added REFLECT_NOTIFICATIONS in the parent message loop, and the owner draws the property In the bed sheet is fixed. But I still can not get the message then I used the Spy ++ to get the mes...

php - Unit testing facebook applications -

Unit testing What are the good practices of Facebook canvas applications? Let's say that you have an MVC application that is the controllers using the local Facebook library which provides access to the graph API, FB session. All your applications must be certified before moving forward after the Facebook Authentication Mechanism (depending on OAuth and Facebook Connect ). You can use the unit tests for controllers How will you go with One thing comes to my mind - having a Facebook library with 'testing' mode and fake sessions can be a job, any idea is appreciated. When I had this problem, I just created a Facebook Library Call Lip (or Functions Function One set), and unit tests that used to mimic the object.

.net - Convert C# classes (class library) to SQL DDL (tables) -

I want to convert a set of C # classes (class library) into SQL table by SQL Server, so that the data stored in the database Can be done and manipulated through the database. The problem is that the number of these classes is large (over 1000 square), and manually enough time to setup such database schema (tables, indexes, stored procedures, etc.) manually I do not need to maintain to mention the class hierarchy. So, the question is: Is there a tool that will help me in creating a database schema, a C # Class Library? I am not looking for the right tool (but I would be very happy if this is the device), but for a device that will help me make at least one starting point. Please note that I would prefer to refer you to the recommended solution to the version 2.0 of the NAT Framework, and create traditional practices (T-SQL code like: tables ... ), although every suggestion is welcomed. If you can use the Visual Studio 2010 v4.0 framework for something new to generati...

c# - MP3Gain like volume analyzer software for WAV files -

Coding language: C # # Framework: .net We have created a software, many of which Other things combine MP3 files. We are using software called MP3 Genes in our software. Now we are adding "wav" files too. Same is the same software that analyzes and adjusts wave files so that they have the same volume. Regards, Navenz Here is a related question (some answers to useful links With):

mysql get current date and row date -

On what day is it possible to query SQL and get today's row for the date column? Say that today is 25th July, I have the date table sales, date of the column name, date = timestamp in the date of the transaction. I need all the rows that the date of sale is similar to the current date and it is also possible price as GMT + 5? This will get you all the rows for today's date: SELECT * (GMT +5) as the date (now ()) = DATE (DATE_ADD (sales_view, interval 5 hours)) order by sales_transon Does the sale date mean with +5 hours or today -5 hours? EDIT: To add 5 hours to the date of sale, on the updated date column, I use the back-tiex to indicate that this is the name of a column. Select `date` from the sale such as I did not know how to work back-tick on the date field. But you should get this idea. Wrap your column names with `

What is the best way for a programmer to approach learning a new language? -

I know that this is quite subjective, but this is something I have struggled with so much. I was not too hesitant to try to learn a new language due to the framework below if it stops, I think that I will just smile and bear it but this is something I would like to address. When I go to learn a new language, it seems that the most learning resources are new programmers. Then I finish reading the "verbose" tutorial or some boring text. I think I was wasting a lot of time how a variable works, how the data type works and other basic things are all these important things, but I can handle technical vocabulary and things like me for beginners There is no need to break. I also think that I will dive into a project, I will learn bad habits and learning a new language does not get all the benefits of profit. So, my question is, what strategy you have got the most useful to get the most profits, I will do anything using the things I already know and make them new I am hacki...

php - How to pull data from xml and break it in pages (pagination) -

All of us, I am using simple XML to pull data from an external XML source. I have also found the prices to limit the number of results that I see. I thought I could paginate with some simple things like "end page = 2" with a simple query within the URL, but it is not possible to show this document. I have downloaded a paging MYSQL query tried to use the VERS output from XM but the output is loading the entire result of XML and the URL is not specified within the Vars. I think what I can do, count the results first and then confirm, which I am trying to do. Can you see anything in this code that can be improved? Sorry, if this is not clear, but maybe it's a discussion with some coders, I can see a little light at the end of the tunnel and make a little better. So here's the code: // See that I am already defining the maximum number of rows within the URL. Does it mean that the proper way to move it forward is to start moving forward? $ all = New simp...

Sort XML file based on XSD format in .Net -

itemprop = "text"> I need to generate XML, validate against XSD and (if valid), then XML Send. My problem is that creating the nodes of the XML file in the correct order (as the XS defines it) is very difficult with my current scenario, manually correcting nodes To add code, there will be a lot of code to write code, as well as an update, if XSD changes (which it now comes later) XSD is quite complex Element Reforms & Groups Sequences within the issues and complex types. Unfortunately, I can not add an example because XSD (and XML) is considered "company secrets". What I would like to know is that there is no way to sort nodes in XML according to definitions in XSD? Nobody has ever heard or seen about such a ceremony. Net world or otherwise? Does anybody have any idea where to solve this problem? Without knowing more, this is a bit difficult to say, but here's how I The problems are addressed in the past. Run through the console, p...

What are some alternatives to using a cursor in SQL Server 2008? -

I am importing that uses SSIS to import data into a temporary table, then one of the stored procedures In order to process data and insert information into 3 different tables, a data with a cursor is complex in the first 2 tables because if there is a record that already exists with the same data, then record Not created. Whether a record has been inserted or the ID of the record or mailing record in the first 2 tables has been refunded for use on the third table. Is there any alternative to using the cursor? Without looking at your current code it is difficult to know that it would be appropriate but I Look at the statement ("when matched", "target does not match", "if not match source, allows to specify tasks for different cases") and Sections (allows you to obtain new update records for processing).

java - How to generate a bar chart in JFreeChart with default components' size? -

I'm trying to create a bar chart, but by calculating the size of the label from my domain axis width and is forced to control the height and cause problems when they are too big (to get in the middle of the column at the beginning of 'values ​​chart). Do you have any suggestions? Thank you. You can change the renderer on the chart by the graphics repaints a custom painter; The Painter code is not displayed correctly. GradientXYBarPainter xyBarpainter = new GradientXYBarPainter () {@Override public void paintBar (Graphics2D G2, XYBarRenderer renderer, int I have a widthMultiplier used row, int column, RectangularShape time, RectangleEdge basis) {Rectangle2D rect = bar.getFrame (); Raktksetrekt (Raktkgets (), Raktkgeti (), Raktkgetvidth () * Vidthamultipliar, Raktkgetheigt ()); Bar.setFrame (Rect); Super Paintbar (G2, Renderer, Row, Column, Bar, Base); }}; StackedXYBarRenderer rend = new StackedXYBarRenderer (); Rend.setBarPainter (xyBarpainter);

ruby on rails - How to manage translations as they are added by release? -

I work on a ROR website which is translated into several languages ​​for each release "What's new to translate "This is a real pain to manage, we have to collect all the new keys and send it to the translation team in the spreadsheet. So, my question is: How do people make their local files and add new keys, so that the transitions in the translation team are easy to transmit and painless? This is really awesome, though your language translation is Will not organize in the hierarchical structure. This will include the word "unavailable", where necessary and remove orphaned entries. You may also wish to see the textmate bundle.

c# - Constrain type to specific types -

Is it possible to disrupt a common method on specific types? I have to write something like this: public T getValue & lt; T & gt; (String _attributeValue) where T: float, string {return default (t); // Some other things in reality} I'm mostly trying to avoid a huge switch statement inside the method or throw exceptions to specify an invalid type is. EDIT: Ack I knew that the string is not the value type I'm sorry to start with the first two numerical types. You do not use normal barriers to express the boundaries you are interested in Can do Generics are not meant to express variations on different types - they are meant to express variation that is integrated on type hierarchies (or implementing some interfaces). You have some alternative options, however whatever you choose depends on the exact nature of what you are trying to do. Use different named methods to express each operation. I use this approach when each method is really differe...

python: what happens to opened file if i quit before it is closed? -

मैं एक सीएसवी फ़ाइल खोल रहा हूँ: def get_file (start_file): #open मूल फ़ाइल, डेटा में पंक्ति के लिए खुले (start_file, 'rb') के साथ सरणी में पढ़ता है: डेटा = सूची (csv.reader (f)) शीर्षलेख = डेटा [0] counter = collections.defaultdict (int): काउंटर [ पंक्ति [10]] + = 1 रिटर्न (डेटा, काउंटर, हेडर) क्या फ़ाइल मेमोरी में रहती है अगर मैंने प्रोग्राम को with लूप में छोड़ दिया? प्रोग्राम के अंदर आम तौर पर चर का क्या होता है जब मैं प्रोग्राम को NULL ? मेमोरी में संग्रहीत फ़ाइल डेटा (जैसे चर, पायथन बफ़र्स) होगा - = "पोस्ट-पाठ" itemprop = "text"> ऑपरेटिंग सिस्टम स्वचालित रूप से किसी भी खुली फाइल डिस्क्रिप्टर बंद कर देगी। खो जाओ। ऑपरेटिंग सिस्टम में बफ़र किया जा सकता है डेटा को डिस्क में फ्लाई किया जा सकता है जब फाइल पर असम्बद्ध रूप से बंद हो जाता है (इन-कर्नल के गंदे बफ़र्स के सटीक शब्दों की जाँच करना शैक्षणिक होगा, हालांकि आपको उस पर भरोसा नहीं करना चाहिए)। आपकी प्रक्रिया समाप्त होने पर आपकी वैरिएबल समाप्त होती है।

javascript - jquery temporary unbinding events -

Maybe I'm missing out on something completely handling jQuery, but this is my problem . Let's assume that any event is binding, such as $ (element) .bind ("mousemove", somefunc); Now, I want to start a new musicminding which does not override the previous one, but temporarily out (Unbland) in other words, when I bind my work , Then I should be sure that unless I restore them, no other work will ever be executed for that event. I am looking for something: $ (element) .bind ("mousemove", somefunc); // Somefunc has been regularly saved binary = $ (element) .getCurrentBinding ("mousemove"); $ (Element). Unbind ("mousemov"). Dam ("Mausomov", Myfung); $ Myfunc instead of $ (element). Unbund ("mausomov", myfunk). Bund ("mousemov", saved binding); Of course, some control is not in my control, or it will be useless :) Is it possible to pair multiple tasks in the same event, and those tasks Execution...

branch - How to prevent a file from automatically merging when switching branches in Mercurial? -

Assume that I have two branches default and newfeature . I have a file named readme.txt in both the files I am working on the newfeature branch and I make a change on readme.txt. If I run hg up default without changes, Mercurial automatically merges into the version of readme.txt in newfeature in default . > How can I change this behavior? What I'm worried about, developers before they are committed before switching the branches, thus doing whatever they are doing is merged. How this process looks: C: \ source \ branchestest \ Main & gt; HG branch exams C: \ source \ branchTest \ main & gt; Hg position M readme.txt c: \ source \ branchTest \ main & gt; Hg up default merged readme.txt 0 files updated, 1 files merged, 0 files removed, 0 files unresolved, C: \ source \ branchTest \ Main & gt; Note the automated merge as I have not changed the readme.txt. Boring does not warn me that it will happen. Any suggestions? Use hg up -c (lowe...

mobile - Error while running a midlet in Eclipse: no class found -

I am using and iDEN SDK for MOTODEV SDK and J2ME (MIDP2.0). In the midlet debuggin receptacle error: got a class Anyone can help me determine the source of this error Login org.eclipse.mtj.?! Core 4120 2010-08-05 04: 26: 53.009 message could not be connected to the virtual machine 0 JavakiokIOException ads: Debugger launch went beyond the time-out org.eclipse.mtj.internal.core.launching . MidpkEmulatorRunnerkwaitForRemoteDebugger (Unknown Source) at org.eclipse.mtj.internal.core.launching.midp.EmulatorRunner.createVirtualMachine (org.eclipse.mtj.internal.core.launching.midp.EmulatorRunner.runInDebug unknown source) ( unknown source org.eclipse.mtj.internal.core.launching.midp.EmulatorLaunchConfigDelegate.launch (org.eclipse.mtj.internal.core.launching.midp.EmulatorRunner.run (unknown source) at an undisclosed source)) organization. eclipse.debug.internal.core.LaunchConfiguration.launch Org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch (DebugUIPlugin.java:866) (laun...

c++ - Why is it dangerous to get rid of volatile? -

सी ++ में, अस्थिर उसी तरह व्यवहार किया जाता है const है: अस्थिर संशोधक एक संकलन त्रुटि को ट्रिगर नहीं करना चाहता है जो किसी फ़ंक्शन को डेटा वाष्पशील करने के लिए एक पॉइंटर गुजर रहा है। int foo (int * bar) {/ * snip * /} Int main () {volatile int * baz; foo (baz); // त्रुटि: 'अस्थिर int *' से 'int *'} के लिए अमान्य रूपांतरण यह खतरनाक क्यों है? यह const संशोधक के लिए स्पष्ट है जो इसे हटाने से const सहीता को तोड़ सकता है; लेकिन क्या " अस्थिर शुद्धता" जैसी कोई चीज है? मैं समझ नहीं सकता कि सूचक को अस्थिर करने के लिए एक पॉइंटर कैसे गुजर रहा है, क्योंकि पॉइंटर गैर-वाष्पशील डेटा से समस्या पैदा कर सकता है। संपादित करें बस आप लोग जानते हैं कि मैं क्यों प्रयोग कर रहा था अस्थिर पहले स्थान पर: मैक ओएस एक्स के कई ओएसएटॉमिक फ़ंक्शन ऑफ़ फ़ॉक्ट्स (परमाणु वेतन वृद्धि, घटाता, अतिरिक्त, घटाव, तुलना और स्वैप आदि) के लिए अस्थिर तर्क। न केवल संकलक गैर-वाष्पशील चर तक पहुंच का अनुकूलन कर सकता है, यह भविष्यवाणी / अचंभित रूप से अपडेट कर सकता है, जब तक...

ruby on rails - More Advanced Control Over Delayed Job workers retry -

So I'm using a delay :: :: on the job workers (on Heroes), after a certain user Makes the model. The case of a common use, however, it is revealed, users have to make something, then immediately remove it (possibly because they made a mistake or something). When this happens, the laborers are fired, but as long as they ask for a hand model, it has already been removed, but due to the auto-retrieve facility, it is malicious 25 times the job, and certainly never work Is there any way I can catch some errors and, when they are there, then again, with the effort, stop that particular work. , But if this is not an error, will this be the future Will try again somewhere? Check in the call function with summary delays to carry forward the desired job or to get your desired job forward. Do and either work on that job or return success.

python - How to use simplejson to decode following data? -

I get some data from a URL, and search online for detecting data in Jason Data Format, but When I tried to use Simplejson.loads (data), this would increase the exception. The first deal with Jason Data, any suggestions for decoding the data? Thanks ================ Result = Simple. Load (data, encoding = "UTF -8") file "F: \ My Documents \ My Dropbox \ Stokdetadaunloder \ Srljasn__init __. PE", line 401, the load returns class (encoding = encoding ** KW). Decoded (files), file "F: \ My Documents \ My Dropbox \ Stokdata Daunloder \ Srljasn \ decoder" line 402, decoded in Oz, end = Swkro_dekod (S, Aidiaks = _w (S, 0) Kend ()) file "F: \ My documents \ My Dropbox \ Stokdataunloder \ Srljasn \ decoder", line 420, can not be decoded a JSON object JSONDecodeError ( "in Raw_decode is" S, Aidiadi) simplejson.decoder.JSONDecodeError: a JSON The object can not be decoded: line 1 co 0 (four 0) === ================================== dat...

Facebook Connect Graph API - Why Can't I Retrieve All User's Details? -

I think every other question I ask about is related to Facebook Connect - which is a lot about their API Says. Anyway, this is politics, I interrupt .. I am trying to pull back user details from the graph API for use in my application (which is an FBML external website - for authentication Javascript sdk). Email Ul> This works, and allows me to post to the user's wall, and gets my email from the graph API. But when I make an HTTP GET request to the following URL: (where UID = User ID of the user is trying to get details I am, and oat = oath token). All the JSONs come back in. This is the User ID (which is already there, since the IM was put into the URL), and the e-mail. Why can not I get things like name, last name, locale? Am I using the wrong URL? Is my out token wrong? I am getting the token from here: UPDATE: It seems that this problem is my othe token. Because when I go to Docs: and use a sample OAuth token for it Does anyone...

javascript - Is there a way to abort a SlickGrid asynchronous render? -

I have a search page with the result given in SlickGrid. This is an Ajax search which is onkeyup , So search can be done, slim. Grid insions can be called render , and the second result comes back before the first asynchronous render is complete. I would like to cancel the initial render as soon as the second ajax request comes back so that there are no two calls to the same code at the same time. Edit with an example : I am here with a warning to track execution order. Function Setup Grid () {slickDataView = New Slick.Data.DataView (); Slimgrid = new slim Grid (Slimgriddiv, Slickdata. Rosho, Slachgrid Column, Slimgrid Option); SlickDataView.onRowsChanged.subscribe (function (rows) {slickGrid.removeRows (rows); slickGrid.updateRowCount (); slickGrid.render ();}); SlickDataView.onRowCountChanged.subscribe (Functions) {slickGrid.updateRowCount (); slickGrid.render ();}); } Function performSearch () {jQuery.get ('searchPage.php', {MODEL_ID: userInputField.val (...

visual studio 2010 - setting up GLEW windows? -

I have Visual Studio 2010 and I want to set glew.h on it. I have this step but I still have the linker error: 1. Download Glew Pack 2.Copy .h files C: \ Program Files (x86) \ Microsoft SDKs \ Windows \ v7.0A \ Include 3.Copy .lib files to C: \ Program Files (x86) \ Microsoft SDKs \ Windows \ v7.0A \ Lib 4.copy glew32.dll C: \ Windows \ SysWOW64 5. Finally, go to your project properties by link-> Add input glew32.lib, glu32.lib, and opengl32.lib for additional dependencies but I still have this error: Error LNK2001: Unsolved external application __imp ____ glewBlendEquation I have only one problem today, even though If I have a month late for the answer, just add the GLEW_STATIC to the definitions of your preprocessor.

MySQL prepared statements vs simple queries performance -

I did some tests, first with my statement ready with mysql, $ pdo-> test () and $ insert_sth-> Executed for 10k inserts () (if this is the case with the nominated parameter), and it took 301 time. After that I created a simple insert query and every 10k for inserting, and it took 303 seconds then I would like to know: whether the ready statements actually Do performance benefits? Because my tests have not shown it, or do I have to customize the version of my prepared statements so that they can be fast? I can give my source code if needed. INSERT s is likely to be binding, because they are generally But these are not very complicated in terms of SQL - just a column and data list for putting them in. In this way, the query that you use to use is not as important as the amount of data that you fill in the database, how fast you can get data on the DB server, and how fast DB The server can store it.

c# - Session object with WCF? -

Is it possible to use session objects with WCF to store session-related data? If yes, how can you describe it? Thanks You can set the instance mode for each session and then Your object session object that applies the Operation Contract is created.

Big problem with booking system PHP + SQL -

I am now making a new booking system, part of the private room and now I am a part of the dorm. The system works like this: Skip to Day + Day + How many people in the hostel The system checks DB (by the way MESQL) if the free room is now how does it check? There is a number of dates in DB - a date person. For example, we have a hostel with dates: 05/08, 05/08, 05/08, 05/08, 06/08, 06/08, 06/08, 06/08, 07/08, 07 / 08, 07/08, 07/08 - Therefore Dorm 05/07/08 has 4 people. For example, if this room is 4 out of 10 with 10 people. Now if you include 7 people you do not have. (This will be 11 out of 10) The system returns the available rooms. Now I want to talk further: if there is 2 hostels. All of them have space for 10 people, all of them 10 out of 10 people. Now 4 people are coming and they want to register. Do not give them this because they check the dorm-dorm. I want to do this that the system will calculate free places (10-8 + 10-8 = 4 in 2 dorms) Edit: P...

java - What is the most "expensive" for a server: connections opened, send/receive messages or connections/deconnections? -

What is the most expensive for the server (using the Java NiO selector and socket channel, but I think To get many messages While keeping many client connections open and many more messages from customers Answering customers When the execution problem is resolved, do not believe in any conjecture Do or Always try to "general knowledge" always always try to skeptify the profile skepticism in the case of applications which only points in a question (it is usually easy to do), and you will be surprised again and again.

mongodb - How to implement references in map-reduce databases? -

I am starting to study the database to reduce how I can apply a context in a map - the database Can reduce, such as couchdiby or mangodibi? For example, suppose I have a driver and a car, and I have to remember that some drivers drive. There is something like this in SQL: select viewer_id, driver by car, car where driver .car = car.car_id (That is, if my memory Works right - I have not programmed in SQL for some time.) There are references in languages, it is sometimes easier: an example of a person can point to examples of the car. What is the map of this kind of relationship? You will write a map in CouchDbie / reduce the output of all cars and drivers with a complex key , And then use the major categories to choose both. For example, suppose that your documents look like these two ... ": "...", "_rev": "...", " "Driver" _id "" driver "_id" "driver" _id ":" driver "_id...

how to write a c program that runs on a mobile phone? -

I want to write a program that runs on a mobile phone. Just to learn the purpose I think it is possible but I do not know how to start with it and where is the library available for it. I have also planned to write a game that runs on mobile phones. Help me do this. Thanks in advance. I do not know any mobile platform where its SDK is confirming again using pure C . Last time I knew that the old Palm platform was. But you can write C / C ++ with QT because the GUI library for memos, megos, and possibly other Nokia devices. Qt object is oriented, so its not functional as you wish. I know of 1 platform where Pure C is possible. This is the Windows Mobile version & lt; 6.5 Using Win32 api but this is not something I personally recommend because C # .net makes it easy to develop applications for that platform, I also believe that pure C / XOS / CSS With the use of WebOS PDK is possible but I can be wrong here. If you want to write for mobile devices using your kn...

javascript - Bypassing authentication for localhost in order to implement search in Etherpad -

I am trying to implement the Nutch + Solr based search engine in my Etherpad installation. My main issue is that neither does it support post authentication. Etherpad and nach are installed on the same machine, so bypassing authentication for a clear solution localhost Find a way out This is where I got stuck I do not know the etherpad codebase very well, I have made cosmetic changes so far. Can someone tell me where should I look, or a possible solution? I've got some interesting bit code that work together with codebase, but it's javascript, so there is no clear way to check if the request is hosted localhost . Edit: I got the code that handles the authentication policy, and checks it with a simple state so that it always returns true Authentication can be bypassed which prevents me from my initial problem: How can I determine if Host is in localhost javascript? if (guestPolicy == "allow") {return; } leaves me with my initial problem: ...

django create dates list from queryset -

I want to make a list of different month / year prices based on the date fields in my DB. So for example in my table I have id. Date_added | Title 1 | 01/06/2010 | Line 2 | 02/09/2009 | Line 3 | 24/08/2009 | Line 4 | 15/06/2009 | Line 5 | 16/06/2009 | And this table is from the model article How do I create a list of: ['June 2009 ',' August 2009 ',' September 2009 ',' January 2010 '] I believe that you need ['June 2009', 'August 2009', 'September 2009', 'Jan 2010'] for display purposes in your templates. If so, you can do something like Article.objects.values_list ('date_added', flat = true) A list of dates about something like {{"specific" for your requirement, "FI"}} for something like {% your_dates_list_that_you_passed_to_the_template%} {% Endfor%} [edit] Please see

updatin xml in php -

Hello every one I have an XML file and I want to update my code & lt; Gallerylist & gt; & Lt; Record & gt; & Lt; Film & gt; Video / 15Avatar_HD.flv & lt; / Film & gt; & Lt; Title & gt; Avatar1 & lt; / Title & gt; & Lt; Desc & gt; It runs any video file that supports Flash Player & lt; / Desc> & Lt; Preview & gt; Video / Preview / 6avatar.jpg & lt; / Preview & gt; & Lt; Imgplaylist & gt; Video / imgplaylist / 14p1.jpg & lt; / Imgplaylist & gt; & Lt; Category & gt; Action & lt; / Category & gt; & Lt; / Record & gt; & Lt; / Gallerylist & gt; and my php function is as follows: function xml_update_video ($ id, $ searchString) {$ res = $ this- & gt; Selection Video ($ id); $ SearchString = $ searchString; $ Doc = new DOMDocument; $ Doc- & gt; FormatOutput = TRUE; $ Doc- & gt; Protected WhiteSpace = FALSE; $ Doctor & gt; Load ('../play...

ArrayList of Hashtables in C# -

itemprop = "text"> I have to place an ArrayList where it contains hashtables. I have a hashtable and add value I then added it to ArrayList. Changed the values ​​and added it to the array list again. It does not save the first values ​​and eliminates the repeated value, which were similar to the last values! Any suggestions? Here is my code NamesValueState {Internal class class 1 {public static ArrayList StartList = new array list (); Public stable hashtable start = new hashtable (); Static zero main (string [] args) {start ["active"] = true; ["Name"] = "prog1" start; Start ["Path"] = @ "C: \ Program Files \ prog1"; Start ["parameter"] = string Empty; StartList.Add (start); Start ["active"] = false; ["Name"] = "start 2"; Start ["Path"] = @ "C: \ Program Files \ prog2"; Start ["Parameter"] = "/ q"; StartList.Add (start); (HT ["active...

algorithm - Draw a point a set distance away from a base point -

I am trying to remove an algorithm to find a random point which is a fixed distance from a base point. For: It is just basic mathematics and my brain can not work yet (I'm sorry, I have not yet coffee :)), but I have gone This is trying to work on paper and I am not getting anywhere. radius R and center (xc, yc): x = Xc + r * cos (a); Y = yc + R * sin (A); Changing the value of 0 to 2 * PI can give you any point on the perimeter.